Permalink
Browse files

FIXED: If we don't despawn a GO after loot, it should become lootable…

… for others. Mi scusi
  • Loading branch information...
dfighter1985 committed Feb 26, 2012
1 parent f383a25 commit 9169a9b8ee6864e58ef302c6c90967d0cbfa2f2a
Showing with 10 additions and 11 deletions.
  1. +10 −11 src/arcemu-world/MiscHandler.cpp
@@ -496,6 +496,9 @@ void WorldSession::HandleLootReleaseOpcode(WorldPacket & recv_data)
{
if( despawn )
pGO->Despawn(0, (sQuestMgr.GetGameObjectLootQuest(pGO->GetEntry()) ? 180000 + (RandomUInt(180000)) : 900000 + (RandomUInt(600000))));
else
pGO->SetByte( GAMEOBJECT_BYTES_1, 0, 1 );
return;
}
else if(pLock->locktype[i] == 2) //locktype;
@@ -504,7 +507,7 @@ void WorldSession::HandleLootReleaseOpcode(WorldPacket & recv_data)
if(pLock->lockmisc[i] == LOCKTYPE_MINING || pLock->lockmisc[i] == LOCKTYPE_HERBALISM)
{
//we still have loot inside.
if(pGO->HasLoot())
if(pGO->HasLoot() || !despawn )
{
pGO->SetByte(GAMEOBJECT_BYTES_1, 0, 1);
// TODO : redo this temporary fix, because for some reason hasloot is true even when we loot everything
@@ -528,40 +531,36 @@ void WorldSession::HandleLootReleaseOpcode(WorldPacket & recv_data)
}
else
{
if(pGO->HasLoot())
if(pGO->HasLoot() || !despawn )
{
pGO->SetByte(GAMEOBJECT_BYTES_1, 0, 1);
return;
}
if( despawn )
pGO->Despawn(0, sQuestMgr.GetGameObjectLootQuest(pGO->GetEntry()) ? 180000 + (RandomUInt(180000)) : (IS_INSTANCE(pGO->GetMapId()) ? 0 : 900000 + (RandomUInt(600000))));
pGO->Despawn(0, sQuestMgr.GetGameObjectLootQuest(pGO->GetEntry()) ? 180000 + (RandomUInt(180000)) : (IS_INSTANCE(pGO->GetMapId()) ? 0 : 900000 + (RandomUInt(600000))));
return;
}
}
else //other type of locks that i don't bother to split atm ;P
{
if(pGO->HasLoot())
if(pGO->HasLoot() || !despawn )
{
pGO->SetByte(GAMEOBJECT_BYTES_1, 0, 1);
return;
}
if( despawn )
pGO->Despawn(0, sQuestMgr.GetGameObjectLootQuest(pGO->GetEntry()) ? 180000 + (RandomUInt(180000)) : (IS_INSTANCE(pGO->GetMapId()) ? 0 : 900000 + (RandomUInt(600000))));
pGO->Despawn(0, sQuestMgr.GetGameObjectLootQuest(pGO->GetEntry()) ? 180000 + (RandomUInt(180000)) : (IS_INSTANCE(pGO->GetMapId()) ? 0 : 900000 + (RandomUInt(600000))));
return;
}
}
}
}
else
{
if(pGO->HasLoot())
if(pGO->HasLoot() || !despawn )
{
pGO->SetByte(GAMEOBJECT_BYTES_1, 0, 1);
return;
}
if( despawn )
pGO->Despawn(0, sQuestMgr.GetGameObjectLootQuest(pGO->GetEntry()) ? 180000 + (RandomUInt(180000)) : (IS_INSTANCE(pGO->GetMapId()) ? 0 : 900000 + (RandomUInt(600000))));
pGO->Despawn(0, sQuestMgr.GetGameObjectLootQuest(pGO->GetEntry()) ? 180000 + (RandomUInt(180000)) : (IS_INSTANCE(pGO->GetMapId()) ? 0 : 900000 + (RandomUInt(600000))));
return;

0 comments on commit 9169a9b

Please sign in to comment.