mirror of
https://github.com/mangosfour/server.git
synced 2025-12-14 16:37:01 +00:00
[9204] Move remaining handling of GO from SendLoot to GameObject::Use
Signed-off-by: NoFantasy <nofantasy@nf.no>
This commit is contained in:
parent
f7de2ce1d7
commit
16c0ff3ef7
3 changed files with 25 additions and 14 deletions
|
|
@ -3112,20 +3112,13 @@ void Spell::SendLoot(uint64 guid, LootType loottype)
|
|||
return;
|
||||
|
||||
case GAMEOBJECT_TYPE_CHEST:
|
||||
// TODO: possible must be moved to loot release (in different from linked triggering)
|
||||
if (gameObjTarget->GetGOInfo()->chest.eventId)
|
||||
{
|
||||
sLog.outDebug("Chest ScriptStart id %u for GO %u", gameObjTarget->GetGOInfo()->chest.eventId,gameObjTarget->GetDBTableGUIDLow());
|
||||
player->GetMap()->ScriptsStart(sEventScripts, gameObjTarget->GetGOInfo()->chest.eventId, player, gameObjTarget);
|
||||
}
|
||||
|
||||
// triggering linked GO
|
||||
if (uint32 trapEntry = gameObjTarget->GetGOInfo()->chest.linkedTrapId)
|
||||
gameObjTarget->TriggeringLinkedGameObject(trapEntry,m_caster);
|
||||
|
||||
gameObjTarget->Use(m_caster);
|
||||
// Don't return, let loots been taken
|
||||
default:
|
||||
break;
|
||||
|
||||
default:
|
||||
sLog.outError("Spell::SendLoot unhandled GameObject type %u (entry %u).", gameObjTarget->GetGoType(), gameObjTarget->GetEntry());
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue