aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authormegamage <none@none>2009-05-26 19:55:41 -0500
committermegamage <none@none>2009-05-26 19:55:41 -0500
commit9624f6e09975100e18b01adc8c1dd215b5bd445e (patch)
tree3040a690a9dae8084e38f92864a94f932fd72ec5 /src
parentfa9bfed91f4792d397e1ff9c879ab8d86ad2e23c (diff)
*Fix a typo in Thaddius script that make he not berserk.
*Update Heigan script so that players outside the room will be teleported in when eruption happens. Thanks to cryingcloud. --HG-- branch : trunk
Diffstat (limited to 'src')
-rw-r--r--src/bindings/scripts/include/sc_creature.cpp10
-rw-r--r--src/bindings/scripts/include/sc_creature.h1
-rw-r--r--src/bindings/scripts/scripts/zone/naxxramas/boss_heigan.cpp1
-rw-r--r--src/bindings/scripts/scripts/zone/naxxramas/boss_thaddius.cpp2
4 files changed, 13 insertions, 1 deletions
diff --git a/src/bindings/scripts/include/sc_creature.cpp b/src/bindings/scripts/include/sc_creature.cpp
index 3e7a1a39878..aa2a3fbf324 100644
--- a/src/bindings/scripts/include/sc_creature.cpp
+++ b/src/bindings/scripts/include/sc_creature.cpp
@@ -644,6 +644,16 @@ void BossAI::_EnterCombat()
instance->SetBossState(bossId, IN_PROGRESS);
}
+void BossAI::TeleportCheaters()
+{
+ float x, y, z;
+ me->GetPosition(x, y, z);
+ std::list<HostilReference*> &m_threatlist = me->getThreatManager().getThreatList();
+ for(std::list<HostilReference*>::iterator itr = m_threatlist.begin(); itr!= m_threatlist.end(); ++itr)
+ if((*itr)->getTarget()->GetTypeId() == TYPEID_PLAYER && !CheckBoundary((*itr)->getTarget()))
+ (*itr)->getTarget()->NearTeleportTo(x, y, z, 0);
+}
+
bool BossAI::CheckBoundary(Unit *who)
{
if(!boundary || !who)
diff --git a/src/bindings/scripts/include/sc_creature.h b/src/bindings/scripts/include/sc_creature.h
index 95bcadaceeb..6208d10c39e 100644
--- a/src/bindings/scripts/include/sc_creature.h
+++ b/src/bindings/scripts/include/sc_creature.h
@@ -233,6 +233,7 @@ struct TRINITY_DLL_DECL BossAI : public ScriptedAI
return false;
}
bool CheckBoundary(Unit *who);
+ void TeleportCheaters();
};
#endif
diff --git a/src/bindings/scripts/scripts/zone/naxxramas/boss_heigan.cpp b/src/bindings/scripts/scripts/zone/naxxramas/boss_heigan.cpp
index 06fdec15206..38071251b78 100644
--- a/src/bindings/scripts/scripts/zone/naxxramas/boss_heigan.cpp
+++ b/src/bindings/scripts/scripts/zone/naxxramas/boss_heigan.cpp
@@ -117,6 +117,7 @@ struct TRINITY_DLL_DECL boss_heiganAI : public BossAI
return;
case EVENT_ERUPT:
instance->SetData(DATA_HEIGAN_ERUPT, eruptSection);
+ TeleportCheaters();
if(eruptSection == 0)
eruptDirection = true;
diff --git a/src/bindings/scripts/scripts/zone/naxxramas/boss_thaddius.cpp b/src/bindings/scripts/scripts/zone/naxxramas/boss_thaddius.cpp
index f9f4d7edacc..941fe420ed3 100644
--- a/src/bindings/scripts/scripts/zone/naxxramas/boss_thaddius.cpp
+++ b/src/bindings/scripts/scripts/zone/naxxramas/boss_thaddius.cpp
@@ -116,7 +116,7 @@ struct TRINITY_DLL_DECL boss_thaddiusAI : public BossAI
events.ScheduleEvent(EVENT_CHAIN, 10000+rand()%10000);
return;
case EVENT_BERSERK:
- DoCast(me, EVENT_BERSERK);
+ DoCast(me, SPELL_BERSERK);
return;
}
}