Jump to content

Recommended Posts

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 :

euSwAzx.png

Line 88 in item.h :

		DWORD		GetVnum() const		{ return m_dwMaskVnum ? m_dwMaskVnum : m_dwVnum;	}

input_main.cpp --> line : 4368

e9vnpAn.png

Cheers :)

Edited by Metin2 Dev
Core X - External 2 Internal
Link to comment
Share on other sites

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

Acum 9 minute, Abel(Tiger) a spus:

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 by Metin2 Dev
Core X - External 2 Internal
Link to comment
Share on other sites

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 :)

 

  • Love 1
Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

Announcements



×
×
  • 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.