Scripts/Serpentshrine Cavern: Fixed "The Lurker Above" achievement and removed hacks for the event

--HG--
branch : trunk
This commit is contained in:
Shauren
2010-12-26 16:35:29 +01:00
parent 821c0f6c42
commit 79070ca820
6 changed files with 436 additions and 355 deletions
+8 -5
View File
@@ -2631,12 +2631,19 @@ void Spell::EffectEnergizePct(SpellEffIndex effIndex)
void Spell::SendLoot(uint64 guid, LootType loottype)
{
Player* player = (Player*)m_caster;
Player* player = m_caster->ToPlayer();
if (!player)
return;
if (gameObjTarget)
{
// special case, already has GossipHello inside so return and avoid calling twice
if (gameObjTarget->GetGoType() == GAMEOBJECT_TYPE_GOOBER)
{
gameObjTarget->Use(m_caster);
return;
}
if (sScriptMgr->OnGossipHello(player, gameObjTarget))
return;
@@ -2662,10 +2669,6 @@ void Spell::SendLoot(uint64 guid, LootType loottype)
gameObjTarget->TriggeringLinkedGameObject(trapEntry,m_caster);
return;
case GAMEOBJECT_TYPE_GOOBER:
gameObjTarget->Use(m_caster);
return;
case GAMEOBJECT_TYPE_CHEST:
// TODO: possible must be moved to loot release (in different from linked triggering)
if (gameObjTarget->GetGOInfo()->chest.eventId)