diff options
| author | megamage <none@none> | 2009-05-26 19:55:41 -0500 |
|---|---|---|
| committer | megamage <none@none> | 2009-05-26 19:55:41 -0500 |
| commit | 9624f6e09975100e18b01adc8c1dd215b5bd445e (patch) | |
| tree | 3040a690a9dae8084e38f92864a94f932fd72ec5 /src/bindings/scripts/include | |
| parent | fa9bfed91f4792d397e1ff9c879ab8d86ad2e23c (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/bindings/scripts/include')
| -rw-r--r-- | src/bindings/scripts/include/sc_creature.cpp | 10 | ||||
| -rw-r--r-- | src/bindings/scripts/include/sc_creature.h | 1 |
2 files changed, 11 insertions, 0 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 |
