I have a big crash problem and I think somebody has playing with my codes with an exploit.
i dont have this problem in the past , the problem appeared usually at peak hours when there are many players only on the core from channel1 map1.
Bitte melden Sie sich an, um diesen Link zu sehen.
item_manager.cpp
Code
- void ITEM_MANAGER::DelayedSave(LPITEM item)
- {
- if (item->GetID() != 0)
- m_set_pkItemForDelayedSave.insert(item);
- }
- void ITEM_MANAGER::FlushDelayedSave(LPITEM item)
- {
- TR1_NS::unordered_set<LPITEM>::iterator it = m_set_pkItemForDelayedSave.find(item);
- if (it == m_set_pkItemForDelayedSave.end())
- {
- return;
- }
- m_set_pkItemForDelayedSave.erase(it);
- SaveSingleItem(item);
- }
- void ITEM_MANAGER::SaveSingleItem(LPITEM item)
- {
- if(!item)
- {
- sys_err("item from SaveSingleItem is NULL!!!");
- //return;
- }
- //if(!item->GetID())
- // return;
- if (!item->GetOwner())
- //if (!item->GetOwner() || !item->GetCount())
- {
- DWORD dwID = item->GetID();
- DWORD dwOwnerID = item->GetLastOwnerPID();
- db_clientdesc->DBPacketHeader(HEADER_GD_ITEM_DESTROY, 0, sizeof(DWORD) + sizeof(DWORD));
- db_clientdesc->Packet(&dwID, sizeof(DWORD));
- db_clientdesc->Packet(&dwOwnerID, sizeof(DWORD));
- sys_log(1, "ITEM_DELETE %s:%u", item->GetName(), dwID);
- return;
- }
- sys_log(1, "ITEM_SAVE %s:%d in %s window %d", item->GetName(), item->GetID(), item->GetOwner()->GetName(), item->GetWindow( ));
- TPlayerItem t;
- t.id = item->GetID();
- t.window = item->GetWindow();
- t.pos = t.window == EQUIPMENT ? item->GetCell() - INVENTORY_MAX_NUM : item->GetCell();
- t.count = item->GetCount();
- t.vnum = item->GetOriginalVnum();
- #ifdef TRANSMUTE_SYSTEM
- t.look = item->GetLook();
- #endif
- t.owner = (t.window == SAFEBOX || t.window == MALL) ? item->GetOwner()->GetDesc()->GetAccountTable().id : item->GetOwner()->GetPlayerID();
- thecore_memcpy(t.alSockets, item->GetSockets(), sizeof(t.alSockets));
- thecore_memcpy(t.aAttr, item->GetAttributes(), sizeof(t.aAttr));
- db_clientdesc->DBPacketHeader(HEADER_GD_ITEM_SAVE, 0, sizeof(TPlayerItem));
- db_clientdesc->Packet(&t, sizeof(TPlayerItem));
- }
- void ITEM_MANAGER::Update()
- {
- TR1_NS::unordered_set<LPITEM>::iterator it = m_set_pkItemForDelayedSave.begin();
- TR1_NS::unordered_set<LPITEM>::iterator this_it;
- while (it != m_set_pkItemForDelayedSave.end())
- {
- this_it = it++;
- LPITEM item = *this_it;
- // SLOW_QUERY 플래그가 있는 것은 종료시에만 저장한다.
- if (item->GetOwner() && IS_SET(item->GetFlag(), ITEM_FLAG_SLOW_QUERY))
- continue;
- SaveSingleItem(item);
- m_set_pkItemForDelayedSave.erase(this_it);
- }
- }
- void ITEM_MANAGER::RemoveItem(LPITEM item, const char * c_pszReason)
- {
- LPCHARACTER o;
- if ((o = item->GetOwner()))
- {
- #ifdef __NEW_PET_SYSTEM_SCALING__
- if(item->GetVnum() >= 53041 && item->GetVnum() <= 53048 && o)
- {
- CScalingPetSystem* petsys = o->GetScalingPetSystem();
- if(petsys->GetScalingPetActor())
- {
- petsys->Unsummon();
- }
- }
- #endif
- char szHint[64];
- snprintf(szHint, sizeof(szHint), "%s %u ", item->GetName(), item->GetCount());
- LogManager::instance().ItemLog(o, item, c_pszReason ? c_pszReason : "REMOVE", szHint);
- if (item->GetWindow() == MALL || item->GetWindow() == SAFEBOX)
- {
- CSafebox* pSafebox = item->GetWindow() == MALL ? o->GetMall() : o->GetSafebox();
- if (pSafebox)
- {
- pSafebox->Remove(item->GetCell());
- }
- }
- else
- {
- o->SyncQuickslot(QUICKSLOT_TYPE_ITEM, item->GetCell(), 255);
- item->RemoveFromCharacter();
- }
- }
- M2_DESTROY_ITEM(item);
- }
item.cpp
Bitte melden Sie sich an, um diesen Link zu sehen. Reveal hidden contents
db when crash , appear this item...
Bitte melden Sie sich an, um diesen Link zu sehen.
i see this same problem exposed by PiNGUin from m2dev but i dont have the instant pickup items (ctrl+z) only the GREAT Offline shop .
Who really know , please contact me here or discord valentindeian#7623