*Fix a bug that gohello is called twice for goober.

--HG--
branch : trunk
This commit is contained in:
megamage
2009-05-01 15:01:07 -05:00
parent 77bd6f148a
commit 4fb815a9b8
+2 -4
View File
@@ -2818,6 +2818,8 @@ void Spell::SendLoot(uint64 guid, LootType loottype)
return; return;
Script->GOHello(player, gameObjTarget); Script->GOHello(player, gameObjTarget);
sWorld.ScriptsStart(sGameObjectScripts, gameObjTarget->GetDBTableGUIDLow(), player, gameObjTarget);
gameObjTarget->AddUniqueUse(player); gameObjTarget->AddUniqueUse(player);
gameObjTarget->SetLootState(GO_JUST_DEACTIVATED); gameObjTarget->SetLootState(GO_JUST_DEACTIVATED);
@@ -2831,10 +2833,6 @@ void Spell::SendLoot(uint64 guid, LootType loottype)
if(uint32 trapEntry = gameObjTarget->GetGOInfo()->goober.linkedTrapId) if(uint32 trapEntry = gameObjTarget->GetGOInfo()->goober.linkedTrapId)
gameObjTarget->TriggeringLinkedGameObject(trapEntry,m_caster); gameObjTarget->TriggeringLinkedGameObject(trapEntry,m_caster);
// activate GO scripts
Script->GOHello(player, gameObjTarget);
sWorld.ScriptsStart(sGameObjectScripts, gameObjTarget->GetDBTableGUIDLow(), player, gameObjTarget);
return; return;
case GAMEOBJECT_TYPE_CHEST: case GAMEOBJECT_TYPE_CHEST: