69#define GO_FAILED "You are unable to use this currently."
71#define EMOTE_UNABLE_TO_FIND "is unable to find Kalecgos"
81#define DRAGON_REALM_Z 53.079f
82#define DEMON_REALM_Z -74.558f
84#define MAX_PLAYERS_IN_SPECTRAL_REALM 0
138 Sath->AI()->EnterEvadeMode();
144 me->SetDisableGravity(
false);
145 me->SetVisible(
true);
167 me->SetVisible(
false);
194 me->InterruptNonMeleeSpells(
true);
195 me->RemoveAllAuras();
196 me->DeleteThreatList();
216 me->SetDisableGravity(
false);
217 me->SetVisible(
true);
231 me->AI()->EnterEvadeMode();
246 Sath->DealDamage(Sath, Sath->GetHealth());
254 SF_LOG_ERROR(
"scripts",
"Didn't find Shathrowar. Kalecgos event reseted.");
289 std::list<Unit*> targetList;
290 for (ThreatContainer::StorageType::const_iterator itr = m_threatlist.begin(); itr!= m_threatlist.end(); ++itr)
292 Unit* target = (*itr)->getTarget();
295 && target->
GetGUID() !=
me->GetVictim()->GetGUID()
299 targetList.push_back(target);
302 if (targetList.empty())
307 std::list<Unit*>::const_iterator i = targetList.begin();
308 advance(i, rand()%targetList.size());
326 if (!
me->GetVictim() &&
me->IsValidAttackTarget(who))
328 float attackRadius =
me->GetAttackDistance(who);
329 if (
me->IsWithinDistInMap(who, attackRadius))
336 if (damage >=
me->GetHealth() && done_by !=
me)
359 me->SetVisible(
false);
369 Player* player = itr->GetSource();
371 me->GetMap()->ToInstanceMap()->PermBindAllPlayers(player);
377 me->GetMotionMaster()->MoveTargetedHome();
395 me->SetDisableGravity(
true);
413 me->SetDisableGravity(
true);
535 Map* map = go->GetMap();
539#if MAX_PLAYERS_IN_SPECTRAL_REALM > 0
540 uint8 SpectralPlayers = 0;
544 if (i->GetSource() && i->GetSource()->GetPositionZ() <
DEMON_REALM_Z + 5)
550 player->GetSession()->SendNotification(
GO_FAILED);
626 me->CombatStart(Kalec);
627 me->AddThreat(Kalec, 100.0f);
628 Kalec->setActive(
true);
635 if (damage >=
me->GetHealth() && done_by !=
me)
672 Map* map =
me->GetMap();
682 i->GetSource()->TeleportTo(
me->GetMap()->GetId(), i->GetSource()->GetPositionX(), i->GetSource()->GetPositionY(),
DRAGON_REALM_Z+5, i->GetSource()->GetOrientation());
712 if (!Kalec || !Kalec->
IsAlive())
715 Kalecgos->AI()->EnterEvadeMode();
729 me->AI()->EnterEvadeMode();
739 me->DealDamage(
me,
me->GetHealth());
757 for (ThreatContainer::StorageType::const_iterator itr = threatlist.begin(); itr != threatlist.end(); ++itr)
760 if (unit->GetPositionZ() >
me->GetPositionZ() + 5)
761 me->getThreatManager().modifyThreatPercent(unit, -100);
777 target =
me->GetVictim();
#define SF_LOG_ERROR(filterType__,...)
@ TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT
@ UNIT_FLAG_NON_ATTACKABLE
@ UNIT_FLAG_NOT_SELECTABLE
void AddSC_boss_kalecgos()
#define EMOTE_UNABLE_TO_FIND
@ SPELL_CORRUPTION_STRIKE
@ SPELL_TELEPORT_SPECTRAL
@ AURA_SPECTRAL_EXHAUSTION
@ AURA_SPECTRAL_INVISIBILITY
#define MAX_PLAYERS_IN_SPECTRAL_REALM
void DoZoneInCombat(Creature *creature=NULL, float maxRangeToNearestTarget=50.0f)
void Talk(uint8 id, WorldObject const *whisperTarget=NULL)
virtual void EnterEvadeMode()
CreatureScript(const char *name)
GameObjectScript(const char *name)
PlayerList const & GetPlayers() const
LinkedListHead::Iterator< MapReference const > const_iterator
std::list< HostileReference * > StorageType
void DoMeleeAttackIfReady()
void DoCast(uint32 spellId)
Unit * SelectTarget(SelectAggroTarget targetType, uint32 position=0, float dist=0.0f, bool playerOnly=false, int32 aura=0)
void DoCastVictim(uint32 spellId, bool triggered=false)
void DoCastAOE(uint32 spellId, bool triggered=false)
bool HasAura(uint32 spellId, uint64 casterGUID=0, uint64 itemCasterGUID=0, uint32 reqEffMask=0) const
static Creature * GetCreature(WorldObject &object, uint64 guid)
static Unit * GetUnit(WorldObject &object, uint64 guid)
InstanceScript * GetInstanceScript()
CreatureAI * GetAI(Creature *creature) const OVERRIDE
CreatureAI * GetAI(Creature *creature) const OVERRIDE
CreatureAI * GetAI(Creature *creature) const OVERRIDE
bool OnGossipHello(Player *player, GameObject *go) OVERRIDE
float GetPositionZ() const
bool HealthBelowPct(uint32 pct) const
ScriptedAI(Creature *creature)
void AttackStart(Unit *) OVERRIDE
void UpdateAI(uint32 diff) OVERRIDE
== Triggered Actions Requested ==================
void DamageTaken(Unit *done_by, uint32 &damage) OVERRIDE
InstanceScript * instance
boss_kalecAI(Creature *creature)
void MovementInform(uint32 type, uint32) OVERRIDE
void EnterCombat(Unit *) OVERRIDE
void DamageTaken(Unit *done_by, uint32 &damage) OVERRIDE
void DoAction(int32 param) OVERRIDE
boss_kalecgosAI(Creature *creature)
void KilledUnit(Unit *) OVERRIDE
uint32 SpectralBlastTimer
void MoveInLineOfSight(Unit *who) OVERRIDE
void UpdateAI(uint32 diff) OVERRIDE
== Triggered Actions Requested ==================
void EnterEvadeMode() OVERRIDE
InstanceScript * instance
void DamageTaken(Unit *done_by, uint32 &damage) OVERRIDE
boss_sathrovarrAI(Creature *creature)
void EnterCombat(Unit *) OVERRIDE
uint32 CorruptionStrikeTimer
void JustDied(Unit *) OVERRIDE
InstanceScript * instance
void KilledUnit(Unit *target) OVERRIDE
void UpdateAI(uint32 diff) OVERRIDE
== Triggered Actions Requested ==================
void TeleportAllPlayersBack()
void DoAction(int32 param) OVERRIDE