Jump to content

Denizeri24

Member
  • Posts

    188
  • Joined

  • Last visited

  • Feedback

    0%

Everything posted by Denizeri24

  1. if (Windowed) { m_isWindowed = true; RECT workArea; SystemParametersInfo(SPI_GETWORKAREA, 0, &workArea, 0); const UINT workAreaWidth = (workArea.right - workArea.left); const UINT workAreaHeight = (workArea.bottom - workArea.top); const UINT windowWidth = m_pySystem.GetWidth() + GetSystemMetrics(SM_CXBORDER) * 2 + GetSystemMetrics(SM_CXDLGFRAME) * 2 + GetSystemMetrics(SM_CXFRAME) * 2; const UINT windowHeight = m_pySystem.GetHeight() + GetSystemMetrics(SM_CYBORDER) * 2 + GetSystemMetrics(SM_CYDLGFRAME) * 2 + GetSystemMetrics(SM_CYFRAME) * 2 + GetSystemMetrics(SM_CYCAPTION); const UINT x = workAreaWidth / 2 - windowWidth / 2; const UINT y = workAreaHeight / 2 - windowHeight / 2; SetPosition(x, y); } else { m_isWindowed = false; SetPosition(0, 0); }
  2. you said; c = new CItemCache; //crashes here... and your core said "c" variable is fucking NULL (0x0) ; you cant create new pointer. check your fucking system libraries(freebsd and compiler(gcc or clang)) and optimization flags.
  3. nevermind... just try this; find; if (!c) { if (g_log) sys_log(0, "ITEM_CACHE: PutItemCache ==> New CItemCache id%d vnum%d new owner%d", pNew->id, pNew->vnum, pNew->owner); c = new CItemCache; //crashes here... m_map_itemCache.insert(TItemCacheMap::value_type(pNew->id, c)); } and change; if (!c && c != NULL) { if (g_log) sys_log(0, "ITEM_CACHE: PutItemCache ==> New CItemCache id%d vnum%d new owner%d", pNew->id, pNew->vnum, pNew->owner); c = new CItemCache; //crashes here... m_map_itemCache.insert(TItemCacheMap::value_type(pNew->id, c)); } this is will fix the crash but you probably take new problems.
  4. DO NOT USE EXTERNAL DOWNLOADED GCC LIBRARIES!
  5. c = 0x0 (null) ------ check CItemCache * CClientManager::GetItemCache
  6. delete d3d8.dll in game binary folder. windows already support old directx versions(system32/d3d8thk.dll)
  7. just debug, we dont need pdb for d3d8 library. we only need to find the broken code..
  8. visual studio ---> c/c++ --> command line add; /D _HAS_STD_BYTE=0
  9. if app.IsPressed(app.DIK_LCONTROL) and chr.IsGameMaster(player.GetMainCharacterIndex()):
  10. Several objects have been added (4942 item) (several)
  11. bHPPercent = MINMAX(0, reinterpret_cast<uint64_t>((static_cast<int64_t>(TargetPacket.icurHP * static_cast<int64_t>(100)) / static_cast<int64_t>(TargetPacket.iMaxHP)), 100)); edit : uint64_t limit = 18,446,744,073,709,551,615 ALSO BIG NOTE; int MINMAX(int min, int value, int max) { int tv; tv = (min > value ? min : value); return (max < tv) ? max : tv; }
  12. i make a gm command; ACMD(do_sqltestlog) { char arg1[256]; uint64_t count = 0; one_argument(argument, arg1, sizeof(arg1)); if (*arg1) { str_to_number(count, arg1); } else { count = 1; } count = MIN(100000000, count); for (uint64_t i = 0; i < count; ++i) { DBManager::instance().Query("INSERT INTO log.log (type, time, who, x, y, what, how, hint, ip, vnum) VALUES('ITEM', NOW(), '%u', '%u', '%u', '%u', '%s', '%s', '%s', '%u')", 1, 555, 666, 10000000, "GM", "FORSQLTEST", "192.168.1.1", 00); } ch->ChatPacket(CHAT_TYPE_INFO, "%u adet sorgu gonderimi tamamlandi", count); } i did 10 million row insert in log.log and its take 660 second. i give my local server 12 cpu cores ( i7 8700k ) and 6 gb ram. i using mariadb; I can insert log table ~11.500 row per second but i have question, this performance is good or bad?
  13. actually, he have a another problem; he can't open gold chest with gold key xd try debug your codes with gdb; char_item.cpp; case ITEM_TREASURE_KEY --> if (item->GetValue(0) == item2->GetValue(0))
×
×
  • Create New...

Important Information

Terms of Use / Privacy Policy / Guidelines / We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.