emanuel 18 Posted June 10, 2018 Share Posted June 10, 2018 (edited) Hello guys. After i install that fuckin special storage i get a crash core from function destroyitem If i destroy or i drop a item,i dont get instant crash core,but sometimes,and i dont know why,i pay for who can fix that for me. Crash core : Line 88 in item.h : DWORD GetVnum() const { return m_dwMaskVnum ? m_dwMaskVnum : m_dwVnum; } input_main.cpp --> line : 4368 Cheers Edited August 25, 2022 by Metin2 Dev Core X - External 2 Internal Link to comment Share on other sites More sharing options...
M.Sorin 282 Posted June 10, 2018 Share Posted June 10, 2018 Post DestroyItem function. Link to comment Share on other sites More sharing options...
emanuel 18 Posted June 10, 2018 Author Share Posted June 10, 2018 Acum 6 minute, M.Sorin a spus: Post DestroyItem function. bool CHARACTER::DestroyItem(TItemPos Cell) { LPITEM item = NULL; if (!CanHandleItem()) { if (NULL != DragonSoul_RefineWindow_GetOpener()) ChatPacket(CHAT_TYPE_INFO, LC_TEXT("°*E*A¢A≫ ¿¬ ≫oAA¿¡¼*´A ¾ÆAIAUA≫ ¿A±æ ¼o ¾ø½A´I´U.")); return false; } #ifdef NEW_PET_SYSTEM if (GetNewPetSystem()->IsActivePet() && item->GetVnum() >= 55701 && item->GetVnum() <= 55706) { ChatPacket(CHAT_TYPE_INFO, "You can't do that. "); return false; } #endif if (IsDead()) return false; if (!IsValidItemPosition(Cell) || !(item = GetItem(Cell))) return false; if (item->IsExchanging()) return false; if (true == item->isLocked()) return false; if (quest::CQuestManager::instance().GetPCForce(GetPlayerID())->IsRunning() == true) return false; if(m_pkMyShop) { bool isItemSelling = m_pkMyShop->IsSellingItem(item->GetID()); if (isItemSelling) return false; } if (item->GetCount() <= 0) return false; SyncQuickslot(QUICKSLOT_TYPE_ITEM, Cell.cell, 255); //SyncQuickslot(QUICKSLOT_TYPE_ITEM, Cell.cell, 1000); ITEM_MANAGER::instance().RemoveItem(item); ChatPacket(CHAT_TYPE_INFO, "<Delete item> You deleted : |cFFc9ff00|H|h[%s].", item->GetName()); return true; } nothing wrong here bro..i have no ideea why Link to comment Share on other sites More sharing options...
Active+ Member Abel(Tiger) 1198 Posted June 10, 2018 Active+ Member Share Posted June 10, 2018 (edited) https://metin2.download/picture/ghEnrp660gVUMk6ndcFhBJSP0uB1wP13/.png Edited August 25, 2022 by Metin2 Dev Core X - External 2 Internal 1 Link to comment Share on other sites More sharing options...
Premium WeedHex 635 Posted June 10, 2018 Premium Share Posted June 10, 2018 Problem is from a null item deleted with this function. if (item->GetCount() <= 0) return false; change this in: if (!item || item->GetCount() <= 0) return false; 1 Link to comment Share on other sites More sharing options...
emanuel 18 Posted June 10, 2018 Author Share Posted June 10, 2018 (edited) Acum 9 minute, Abel(Tiger) a spus: https://metin2.download/picture/ghEnrp660gVUMk6ndcFhBJSP0uB1wP13/.png Whatt is wrong here tiger ? why the function must be a little down ? Acum 9 minute, WeedHex a spus: Problem is from a null item deleted with this function. if (item->GetCount() <= 0) return false; change this in: if (!item && item->GetCount() <= 0) return false; how can that make my server crash core if it's original function from : Can you explain me whatt is a null item ? Edited August 25, 2022 by Metin2 Dev Core X - External 2 Internal Link to comment Share on other sites More sharing options...
Premium WeedHex 635 Posted June 10, 2018 Premium Share Posted June 10, 2018 In the function you do at the end: ITEM_MANAGER::instance().RemoveItem(item); But if for some reason someone arrive on this function but !item, it should made the crash. You do before the check and you'll be more sure. 1 Link to comment Share on other sites More sharing options...
emanuel 18 Posted June 10, 2018 Author Share Posted June 10, 2018 Acum 1 minut, WeedHex a spus: In the function you do at the end: ITEM_MANAGER::instance().RemoveItem(item); But if for some reason someone arrive on this function but !item, it should made the crash. You do before the check and you'll be more sure. i make changes how tiger says,and i change in this : if (!item && item->GetCount() <= 0) return false; Let's see if i get crash core next days ,thank you tiger and you 1 Link to comment Share on other sites More sharing options...
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now