Hi.. I have a little problem with OfflineShop.. Sometimes when I create offlineshop, items which I selected to sell stays in invetory and when I teleport then its kick me out of game.. and when I login back items finally disappear from inventory...
GIF
Bitte melden Sie sich an, um diesen Link zu sehen.
I have this is SYSSER:
item_manager.cpp
Code
- #ifndef DEBUG_ALLOC
- void ITEM_MANAGER::DestroyItem(LPITEM item)
- #else
- void ITEM_MANAGER::DestroyItem(LPITEM item, const char* file, size_t line)
- #endif
- {
- if (item->GetSectree())
- item->RemoveFromGround();
- if (item->GetOwner())
- {
- if (CHARACTER_MANAGER::instance().Find(item->GetOwner()->GetPlayerID()) != NULL)
- {
- sys_err("DestroyItem: GetOwner %s %s!!", item->GetName(), item->GetOwner()->GetName());
- item->RemoveFromCharacter();
- }
- else
- {
- sys_err ("WTH! Invalid item owner. owner pointer : %p", item->GetOwner());
- }
- }
- TR1_NS::unordered_set<LPITEM>::iterator it = m_set_pkItemForDelayedSave.find(item);
- if (it != m_set_pkItemForDelayedSave.end())
- m_set_pkItemForDelayedSave.erase(it);
- DWORD dwID = item->GetID();
- sys_log(2, "ITEM_DESTROY %s:%u", item->GetName(), dwID);
- if (!item->GetSkipSave() && dwID)
- {
- 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));
- }
- else
- {
- sys_log(2, "ITEM_DESTROY_SKIP %s:%u (skip=%d)", item->GetName(), dwID, item->GetSkipSave());
- }
- if (dwID)
- m_map_pkItemByID.erase(dwID);
- m_VIDMap.erase(item->GetVID());
- #ifdef M2_USE_POOL
- pool_.Destroy(item);
- #else
- #ifndef DEBUG_ALLOC
- M2_DELETE(item);
- #else
- M2_DELETE_EX(item, file, line);
- #endif
- #endif
- }
char_item.cpp
Code
- #ifdef ENABLE_DELETE_ITEMS_SYSTEM
- bool CHARACTER::DestroyItem(TItemPos Cell)
- {
- LPITEM item = NULL;
- if (!CanHandleItem())
- return false;
- if (IsDead() || IsStun())
- return false;
- if (!IsValidItemPosition(Cell) || !(item = GetItem(Cell)))
- return false;
- if (true == item->isLocked() || item->IsExchanging())
- return false;
- if (quest::CQuestManager::instance().GetPCForce(GetPlayerID())->IsRunning() == true)
- return false;
- if (item->IsBind() || item->IsUntilBind())
- {
- ChatPacket(CHAT_TYPE_INFO, LC_TEXT("RUHA_BAGLI_NESNELER_SILINEMEZ"));
- return false;
- }
- // EXTRA_CHECK
- int iPulse = thecore_pulse();
- if (iPulse - GetSafeboxLoadTime() < PASSES_PER_SEC(g_nPortalLimitTime)
- || iPulse - GetRefineTime() < PASSES_PER_SEC(g_nPortalLimitTime)
- || iPulse - GetMyShopTime() < PASSES_PER_SEC(g_nPortalLimitTime))
- {
- ChatPacket(CHAT_TYPE_INFO, LC_TEXT("Please wait a second."));
- return false;
- }
- if (GetOfflineShopOwner() || GetExchange() || GetMyShop() || GetShopOwner() || IsOpenSafebox() || IsCubeOpen() || IsAttrTransferOpen())
- {
- ChatPacket(CHAT_TYPE_INFO, LC_TEXT("거래창,창고 등을 연 상태에서는 귀환부,귀환기억부 를 사용할수 없습니다."));
- return false;
- }
- // EXTRA_CHECK
- #ifdef ENABLE_NEW_PET_SYSTEM
- if (GetNewPetSystem()->IsActivePet())
- {
- ChatPacket(CHAT_TYPE_INFO, LC_TEXT("pett-yolla"));
- return false;
- }
- #endif
- #ifdef ENABLE_SUPPORT_SYSTEM
- if (GetSupportSystem()->IsActiveSupport())
- {
- ChatPacket(CHAT_TYPE_INFO, LC_TEXT("saman-yolla"));
- return false;
- }
- #endif
- if (item->GetVnum() >= 71220 && item->GetVnum() <= 71239)
- {
- return false;
- }
- #ifdef ENABLE_NEW_PET_SYSTEM
- if (item->GetVnum() >= 55701 && item->GetVnum() <= 55710)
- DBManager::instance().DirectQuery("DELETE FROM new_petsystem WHERE id = %d", item->GetID());
- #endif
- #ifdef ENABLE_SUPPORT_SYSTEM
- if (item->GetVnum() >= 8383 && item->GetVnum() <= 8384)
- DBManager::instance().DirectQuery("DELETE FROM new_support WHERE id = %d", item->GetID());
- #endif
- ChatPacket(CHAT_TYPE_INFO, LC_TEXT("%s has been deleted successfully."), item->GetName());
- ITEM_MANAGER::instance().RemoveItem(item);
- return true;
- }
- #endif
I'm willing to pay for fix
Someone know where is a problem?