feat(Core/Maps): AreaBoundary (#10525)
* cherry-picked commit (https://github.com/TrinityCore/TrinityCore/commit/2da458c56d024aac04468ce2af454a83ad790bf6)
This commit is contained in:
committed by
GitHub
parent
c1747f2fbf
commit
ab4ee71762
@@ -15,8 +15,8 @@
|
|||||||
* with this program. If not, see <http://www.gnu.org/licenses/>.
|
* with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "Define.h"
|
|
||||||
#include "LogCommon.h"
|
#include "LogCommon.h"
|
||||||
|
#include "Define.h"
|
||||||
#include "SmartEnum.h"
|
#include "SmartEnum.h"
|
||||||
#include <stdexcept>
|
#include <stdexcept>
|
||||||
|
|
||||||
|
|||||||
@@ -37,7 +37,7 @@ void GuardAI::Reset()
|
|||||||
me->CastSpell(me, 18950 /*SPELL_INVISIBILITY_AND_STEALTH_DETECTION*/, true);
|
me->CastSpell(me, 18950 /*SPELL_INVISIBILITY_AND_STEALTH_DETECTION*/, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
void GuardAI::EnterEvadeMode()
|
void GuardAI::EnterEvadeMode(EvadeReason /*why*/)
|
||||||
{
|
{
|
||||||
if (!me->IsAlive())
|
if (!me->IsAlive())
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -30,7 +30,7 @@ public:
|
|||||||
static int Permissible(Creature const* creature);
|
static int Permissible(Creature const* creature);
|
||||||
|
|
||||||
void Reset() override;
|
void Reset() override;
|
||||||
void EnterEvadeMode() override;
|
void EnterEvadeMode(EvadeReason /*why*/) override;
|
||||||
void JustDied(Unit* killer) override;
|
void JustDied(Unit* killer) override;
|
||||||
};
|
};
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -26,7 +26,7 @@ NullCreatureAI::NullCreatureAI(Creature* c) : CreatureAI(c) { me->SetReactState(
|
|||||||
void PassiveAI::UpdateAI(uint32)
|
void PassiveAI::UpdateAI(uint32)
|
||||||
{
|
{
|
||||||
if (me->IsInCombat() && me->getAttackers().empty())
|
if (me->IsInCombat() && me->getAttackers().empty())
|
||||||
EnterEvadeMode();
|
EnterEvadeMode(EVADE_REASON_NO_HOSTILES);
|
||||||
}
|
}
|
||||||
|
|
||||||
void PossessedAI::AttackStart(Unit* target)
|
void PossessedAI::AttackStart(Unit* target)
|
||||||
@@ -66,11 +66,11 @@ void CritterAI::DamageTaken(Unit*, uint32&, DamageEffectType, SpellSchoolMask)
|
|||||||
_combatTimer = 1;
|
_combatTimer = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
void CritterAI::EnterEvadeMode()
|
void CritterAI::EnterEvadeMode(EvadeReason why)
|
||||||
{
|
{
|
||||||
if (me->HasUnitState(UNIT_STATE_FLEEING))
|
if (me->HasUnitState(UNIT_STATE_FLEEING))
|
||||||
me->SetControlled(false, UNIT_STATE_FLEEING);
|
me->SetControlled(false, UNIT_STATE_FLEEING);
|
||||||
CreatureAI::EnterEvadeMode();
|
CreatureAI::EnterEvadeMode(why);
|
||||||
_combatTimer = 0;
|
_combatTimer = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -80,7 +80,7 @@ void CritterAI::UpdateAI(uint32 diff)
|
|||||||
{
|
{
|
||||||
_combatTimer += diff;
|
_combatTimer += diff;
|
||||||
if (_combatTimer >= 5000)
|
if (_combatTimer >= 5000)
|
||||||
EnterEvadeMode();
|
EnterEvadeMode(EVADE_REASON_OTHER);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -41,7 +41,7 @@ public:
|
|||||||
void MoveInLineOfSight(Unit*) override {}
|
void MoveInLineOfSight(Unit*) override {}
|
||||||
void AttackStart(Unit* target) override;
|
void AttackStart(Unit* target) override;
|
||||||
void UpdateAI(uint32) override;
|
void UpdateAI(uint32) override;
|
||||||
void EnterEvadeMode() override {}
|
void EnterEvadeMode(EvadeReason /*why*/) override {}
|
||||||
|
|
||||||
void JustDied(Unit*) override;
|
void JustDied(Unit*) override;
|
||||||
void KilledUnit(Unit* victim) override;
|
void KilledUnit(Unit* victim) override;
|
||||||
@@ -57,7 +57,7 @@ public:
|
|||||||
void MoveInLineOfSight(Unit*) override {}
|
void MoveInLineOfSight(Unit*) override {}
|
||||||
void AttackStart(Unit*) override {}
|
void AttackStart(Unit*) override {}
|
||||||
void UpdateAI(uint32) override {}
|
void UpdateAI(uint32) override {}
|
||||||
void EnterEvadeMode() override {}
|
void EnterEvadeMode(EvadeReason /*why*/) override {}
|
||||||
void OnCharmed(bool /*apply*/) override {}
|
void OnCharmed(bool /*apply*/) override {}
|
||||||
|
|
||||||
static int Permissible(Creature const*) { return PERMIT_BASE_IDLE; }
|
static int Permissible(Creature const*) { return PERMIT_BASE_IDLE; }
|
||||||
@@ -69,7 +69,7 @@ public:
|
|||||||
explicit CritterAI(Creature* c) : PassiveAI(c) { _combatTimer = 0; }
|
explicit CritterAI(Creature* c) : PassiveAI(c) { _combatTimer = 0; }
|
||||||
|
|
||||||
void DamageTaken(Unit* /*done_by*/, uint32& /*damage*/, DamageEffectType damagetype, SpellSchoolMask damageSchoolMask) override;
|
void DamageTaken(Unit* /*done_by*/, uint32& /*damage*/, DamageEffectType damagetype, SpellSchoolMask damageSchoolMask) override;
|
||||||
void EnterEvadeMode() override;
|
void EnterEvadeMode(EvadeReason why) override;
|
||||||
void UpdateAI(uint32) override;
|
void UpdateAI(uint32) override;
|
||||||
|
|
||||||
// Xinef: Added
|
// Xinef: Added
|
||||||
|
|||||||
@@ -64,7 +64,8 @@ public:
|
|||||||
//
|
//
|
||||||
void MoveInLineOfSight(Unit* /*who*/) override {} // CreatureAI interferes with returning pets
|
void MoveInLineOfSight(Unit* /*who*/) override {} // CreatureAI interferes with returning pets
|
||||||
void MoveInLineOfSight_Safe(Unit* /*who*/) {} // CreatureAI interferes with returning pets
|
void MoveInLineOfSight_Safe(Unit* /*who*/) {} // CreatureAI interferes with returning pets
|
||||||
void EnterEvadeMode() override {} // For fleeing, pets don't use this type of Evade mechanic
|
|
||||||
|
void EnterEvadeMode(EvadeReason /*why*/) override {} // For fleeing, pets don't use this type of Evade mechanic
|
||||||
void SpellHit(Unit* caster, SpellInfo const* spellInfo) override;
|
void SpellHit(Unit* caster, SpellInfo const* spellInfo) override;
|
||||||
|
|
||||||
void PetStopAttack() override;
|
void PetStopAttack() override;
|
||||||
|
|||||||
@@ -50,7 +50,7 @@ void TotemAI::MoveInLineOfSight(Unit* /*who*/)
|
|||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
void TotemAI::EnterEvadeMode()
|
void TotemAI::EnterEvadeMode(EvadeReason /*why*/)
|
||||||
{
|
{
|
||||||
me->CombatStop(true);
|
me->CombatStop(true);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -31,8 +31,10 @@ public:
|
|||||||
|
|
||||||
void MoveInLineOfSight(Unit* who) override;
|
void MoveInLineOfSight(Unit* who) override;
|
||||||
void AttackStart(Unit* victim) override;
|
void AttackStart(Unit* victim) override;
|
||||||
void EnterEvadeMode() override;
|
|
||||||
|
void EnterEvadeMode(EvadeReason /*why*/) override;
|
||||||
void SpellHit(Unit* /*caster*/, SpellInfo const* /*spellInfo*/) override;
|
void SpellHit(Unit* /*caster*/, SpellInfo const* /*spellInfo*/) override;
|
||||||
|
|
||||||
void DoAction(int32 param) override;
|
void DoAction(int32 param) override;
|
||||||
|
|
||||||
void UpdateAI(uint32 diff) override;
|
void UpdateAI(uint32 diff) override;
|
||||||
|
|||||||
@@ -15,6 +15,7 @@
|
|||||||
* with this program. If not, see <http://www.gnu.org/licenses/>.
|
* with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#include "AreaBoundary.h"
|
||||||
#include "CreatureAI.h"
|
#include "CreatureAI.h"
|
||||||
#include "Creature.h"
|
#include "Creature.h"
|
||||||
#include "CreatureAIImpl.h"
|
#include "CreatureAIImpl.h"
|
||||||
@@ -24,6 +25,7 @@
|
|||||||
#include "MapReference.h"
|
#include "MapReference.h"
|
||||||
#include "Player.h"
|
#include "Player.h"
|
||||||
#include "Vehicle.h"
|
#include "Vehicle.h"
|
||||||
|
#include "Language.h"
|
||||||
|
|
||||||
class PhasedRespawn : public BasicEvent
|
class PhasedRespawn : public BasicEvent
|
||||||
{
|
{
|
||||||
@@ -196,9 +198,9 @@ void CreatureAI::TriggerAlert(Unit const* who) const
|
|||||||
me->GetMotionMaster()->MoveDistract(5 * IN_MILLISECONDS);
|
me->GetMotionMaster()->MoveDistract(5 * IN_MILLISECONDS);
|
||||||
}
|
}
|
||||||
|
|
||||||
void CreatureAI::EnterEvadeMode()
|
void CreatureAI::EnterEvadeMode(EvadeReason why)
|
||||||
{
|
{
|
||||||
if (!_EnterEvadeMode())
|
if (!_EnterEvadeMode(why))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
LOG_DEBUG("entities.unit", "Creature {} enters evade mode.", me->GetEntry());
|
LOG_DEBUG("entities.unit", "Creature {} enters evade mode.", me->GetEntry());
|
||||||
@@ -290,7 +292,7 @@ bool CreatureAI::UpdateVictim()
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool CreatureAI::_EnterEvadeMode()
|
bool CreatureAI::_EnterEvadeMode(EvadeReason /*why*/)
|
||||||
{
|
{
|
||||||
if (!me->IsAlive())
|
if (!me->IsAlive())
|
||||||
{
|
{
|
||||||
@@ -357,6 +359,44 @@ void CreatureAI::MoveBackwardsChecks() {
|
|||||||
me->GetMotionMaster()->MoveBackwards(victim, moveDist);
|
me->GetMotionMaster()->MoveBackwards(victim, moveDist);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool CreatureAI::IsInBoundary(Position const* who) const
|
||||||
|
{
|
||||||
|
if (!_boundary)
|
||||||
|
return true;
|
||||||
|
|
||||||
|
if (!who)
|
||||||
|
who = me;
|
||||||
|
|
||||||
|
return (CreatureAI::IsInBounds(*_boundary, who) != _negateBoundary);
|
||||||
|
}
|
||||||
|
|
||||||
|
bool CreatureAI::IsInBounds(CreatureBoundary const& boundary, Position const* pos)
|
||||||
|
{
|
||||||
|
for (AreaBoundary const* areaBoundary : boundary)
|
||||||
|
if (!areaBoundary->IsWithinBoundary(pos))
|
||||||
|
return false;
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool CreatureAI::CheckInRoom()
|
||||||
|
{
|
||||||
|
if (IsInBoundary())
|
||||||
|
return true;
|
||||||
|
else
|
||||||
|
{
|
||||||
|
EnterEvadeMode(EVADE_REASON_BOUNDARY);
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void CreatureAI::SetBoundary(CreatureBoundary const* boundary, bool negateBoundaries /*= false*/)
|
||||||
|
{
|
||||||
|
_boundary = boundary;
|
||||||
|
_negateBoundary = negateBoundaries;
|
||||||
|
me->DoImmediateBoundaryCheck();
|
||||||
|
}
|
||||||
|
|
||||||
Creature* CreatureAI::DoSummon(uint32 entry, const Position& pos, uint32 despawnTime, TempSummonType summonType)
|
Creature* CreatureAI::DoSummon(uint32 entry, const Position& pos, uint32 despawnTime, TempSummonType summonType)
|
||||||
{
|
{
|
||||||
return me->SummonCreature(entry, pos, summonType, despawnTime);
|
return me->SummonCreature(entry, pos, summonType, despawnTime);
|
||||||
|
|||||||
@@ -18,6 +18,7 @@
|
|||||||
#ifndef ACORE_CREATUREAI_H
|
#ifndef ACORE_CREATUREAI_H
|
||||||
#define ACORE_CREATUREAI_H
|
#define ACORE_CREATUREAI_H
|
||||||
|
|
||||||
|
#include "AreaBoundary.h"
|
||||||
#include "Common.h"
|
#include "Common.h"
|
||||||
#include "Creature.h"
|
#include "Creature.h"
|
||||||
#include "UnitAI.h"
|
#include "UnitAI.h"
|
||||||
@@ -29,6 +30,8 @@ class Creature;
|
|||||||
class Player;
|
class Player;
|
||||||
class SpellInfo;
|
class SpellInfo;
|
||||||
|
|
||||||
|
typedef std::vector<AreaBoundary const*> CreatureBoundary;
|
||||||
|
|
||||||
#define TIME_INTERVAL_LOOK 5000
|
#define TIME_INTERVAL_LOOK 5000
|
||||||
#define VISIBILITY_RANGE 10000
|
#define VISIBILITY_RANGE 10000
|
||||||
|
|
||||||
@@ -78,10 +81,19 @@ protected:
|
|||||||
Creature* DoSummon(uint32 entry, Position const& pos, uint32 despawnTime = 30000, TempSummonType summonType = TEMPSUMMON_CORPSE_TIMED_DESPAWN);
|
Creature* DoSummon(uint32 entry, Position const& pos, uint32 despawnTime = 30000, TempSummonType summonType = TEMPSUMMON_CORPSE_TIMED_DESPAWN);
|
||||||
Creature* DoSummon(uint32 entry, WorldObject* obj, float radius = 5.0f, uint32 despawnTime = 30000, TempSummonType summonType = TEMPSUMMON_CORPSE_TIMED_DESPAWN);
|
Creature* DoSummon(uint32 entry, WorldObject* obj, float radius = 5.0f, uint32 despawnTime = 30000, TempSummonType summonType = TEMPSUMMON_CORPSE_TIMED_DESPAWN);
|
||||||
Creature* DoSummonFlyer(uint32 entry, WorldObject* obj, float flightZ, float radius = 5.0f, uint32 despawnTime = 30000, TempSummonType summonType = TEMPSUMMON_CORPSE_TIMED_DESPAWN);
|
Creature* DoSummonFlyer(uint32 entry, WorldObject* obj, float flightZ, float radius = 5.0f, uint32 despawnTime = 30000, TempSummonType summonType = TEMPSUMMON_CORPSE_TIMED_DESPAWN);
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
// EnumUtils: DESCRIBE THIS
|
||||||
|
enum EvadeReason
|
||||||
|
{
|
||||||
|
EVADE_REASON_NO_HOSTILES, // the creature's threat list is empty
|
||||||
|
EVADE_REASON_BOUNDARY, // the creature has moved outside its evade boundary
|
||||||
|
EVADE_REASON_SEQUENCE_BREAK, // this is a boss and the pre-requisite encounters for engaging it are not defeated yet
|
||||||
|
EVADE_REASON_OTHER
|
||||||
|
};
|
||||||
|
|
||||||
void Talk(uint8 id, WorldObject const* whisperTarget = nullptr);
|
void Talk(uint8 id, WorldObject const* whisperTarget = nullptr);
|
||||||
explicit CreatureAI(Creature* creature) : UnitAI(creature), me(creature), m_MoveInLineOfSight_locked(false) {}
|
|
||||||
|
explicit CreatureAI(Creature* creature) : UnitAI(creature), me(creature), _boundary(nullptr), _negateBoundary(false), m_MoveInLineOfSight_locked(false) { }
|
||||||
|
|
||||||
~CreatureAI() override {}
|
~CreatureAI() override {}
|
||||||
|
|
||||||
@@ -100,7 +112,7 @@ public:
|
|||||||
virtual bool CanRespawn() { return true; }
|
virtual bool CanRespawn() { return true; }
|
||||||
|
|
||||||
// Called for reaction at stopping attack at no attackers or targets
|
// Called for reaction at stopping attack at no attackers or targets
|
||||||
virtual void EnterEvadeMode();
|
virtual void EnterEvadeMode(EvadeReason why = EVADE_REASON_OTHER);
|
||||||
|
|
||||||
// Called for reaction at enter to combat if not in combat yet (enemy can be nullptr)
|
// Called for reaction at enter to combat if not in combat yet (enemy can be nullptr)
|
||||||
virtual void EnterCombat(Unit* /*victim*/) {}
|
virtual void EnterCombat(Unit* /*victim*/) {}
|
||||||
@@ -187,10 +199,20 @@ public:
|
|||||||
|
|
||||||
virtual void PetStopAttack() { }
|
virtual void PetStopAttack() { }
|
||||||
|
|
||||||
|
// boundary system methods
|
||||||
|
virtual bool CheckInRoom();
|
||||||
|
CreatureBoundary const* GetBoundary() const { return _boundary; }
|
||||||
|
void SetBoundary(CreatureBoundary const* boundary, bool negativeBoundaries = false);
|
||||||
|
|
||||||
|
static bool IsInBounds(CreatureBoundary const& boundary, Position const* who);
|
||||||
|
bool IsInBoundary(Position const* who = nullptr) const;
|
||||||
protected:
|
protected:
|
||||||
virtual void MoveInLineOfSight(Unit* /*who*/);
|
virtual void MoveInLineOfSight(Unit* /*who*/);
|
||||||
|
|
||||||
bool _EnterEvadeMode();
|
bool _EnterEvadeMode(EvadeReason why = EVADE_REASON_OTHER);
|
||||||
|
|
||||||
|
CreatureBoundary const* _boundary;
|
||||||
|
bool _negateBoundary;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
bool m_MoveInLineOfSight_locked;
|
bool m_MoveInLineOfSight_locked;
|
||||||
|
|||||||
@@ -15,6 +15,7 @@
|
|||||||
* with this program. If not, see <http://www.gnu.org/licenses/>.
|
* with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#include "AreaBoundary.h"
|
||||||
#include "ScriptedCreature.h"
|
#include "ScriptedCreature.h"
|
||||||
#include "Cell.h"
|
#include "Cell.h"
|
||||||
#include "CellImpl.h"
|
#include "CellImpl.h"
|
||||||
@@ -171,7 +172,6 @@ bool SummonList::IsAnyCreatureInCombat() const
|
|||||||
ScriptedAI::ScriptedAI(Creature* creature) : CreatureAI(creature),
|
ScriptedAI::ScriptedAI(Creature* creature) : CreatureAI(creature),
|
||||||
me(creature),
|
me(creature),
|
||||||
IsFleeing(false),
|
IsFleeing(false),
|
||||||
_evadeCheckCooldown(2500),
|
|
||||||
_isCombatMovementAllowed(true)
|
_isCombatMovementAllowed(true)
|
||||||
{
|
{
|
||||||
_isHeroic = me->GetMap()->IsHeroic();
|
_isHeroic = me->GetMap()->IsHeroic();
|
||||||
@@ -489,23 +489,6 @@ enum eNPCs
|
|||||||
NPC_FREYA = 32906,
|
NPC_FREYA = 32906,
|
||||||
};
|
};
|
||||||
|
|
||||||
bool ScriptedAI::EnterEvadeIfOutOfCombatArea()
|
|
||||||
{
|
|
||||||
if (me->IsInEvadeMode() || !me->IsInCombat())
|
|
||||||
return false;
|
|
||||||
|
|
||||||
if (_evadeCheckCooldown == GameTime::GetGameTime().count())
|
|
||||||
return false;
|
|
||||||
|
|
||||||
_evadeCheckCooldown = GameTime::GetGameTime().count();
|
|
||||||
|
|
||||||
if (!CheckEvadeIfOutOfCombatArea())
|
|
||||||
return false;
|
|
||||||
|
|
||||||
EnterEvadeMode();
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
Player* ScriptedAI::SelectTargetFromPlayerList(float maxdist, uint32 excludeAura, bool mustBeInLOS) const
|
Player* ScriptedAI::SelectTargetFromPlayerList(float maxdist, uint32 excludeAura, bool mustBeInLOS) const
|
||||||
{
|
{
|
||||||
Map::PlayerList const& pList = me->GetMap()->GetPlayers();
|
Map::PlayerList const& pList = me->GetMap()->GetPlayers();
|
||||||
@@ -531,9 +514,10 @@ Player* ScriptedAI::SelectTargetFromPlayerList(float maxdist, uint32 excludeAura
|
|||||||
BossAI::BossAI(Creature* creature, uint32 bossId) : ScriptedAI(creature),
|
BossAI::BossAI(Creature* creature, uint32 bossId) : ScriptedAI(creature),
|
||||||
instance(creature->GetInstanceScript()),
|
instance(creature->GetInstanceScript()),
|
||||||
summons(creature),
|
summons(creature),
|
||||||
_boundary(instance ? instance->GetBossBoundary(bossId) : nullptr),
|
|
||||||
_bossId(bossId)
|
_bossId(bossId)
|
||||||
{
|
{
|
||||||
|
if (instance)
|
||||||
|
SetBoundary(instance->GetBossBoundary(bossId));
|
||||||
}
|
}
|
||||||
|
|
||||||
void BossAI::_Reset()
|
void BossAI::_Reset()
|
||||||
@@ -583,59 +567,10 @@ void BossAI::TeleportCheaters()
|
|||||||
ThreatContainer::StorageType threatList = me->getThreatMgr().getThreatList();
|
ThreatContainer::StorageType threatList = me->getThreatMgr().getThreatList();
|
||||||
for (ThreatContainer::StorageType::const_iterator itr = threatList.begin(); itr != threatList.end(); ++itr)
|
for (ThreatContainer::StorageType::const_iterator itr = threatList.begin(); itr != threatList.end(); ++itr)
|
||||||
if (Unit* target = (*itr)->getTarget())
|
if (Unit* target = (*itr)->getTarget())
|
||||||
if (target->GetTypeId() == TYPEID_PLAYER && !CheckBoundary(target))
|
if (target->GetTypeId() == TYPEID_PLAYER && !IsInBoundary(target))
|
||||||
target->NearTeleportTo(x, y, z, 0);
|
target->NearTeleportTo(x, y, z, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool BossAI::CheckBoundary(Unit* who)
|
|
||||||
{
|
|
||||||
if (!GetBoundary() || !who)
|
|
||||||
return true;
|
|
||||||
|
|
||||||
for (BossBoundaryMap::const_iterator itr = GetBoundary()->begin(); itr != GetBoundary()->end(); ++itr)
|
|
||||||
{
|
|
||||||
switch (itr->first)
|
|
||||||
{
|
|
||||||
case BOUNDARY_N:
|
|
||||||
if (who->GetPositionX() > itr->second)
|
|
||||||
return false;
|
|
||||||
break;
|
|
||||||
case BOUNDARY_S:
|
|
||||||
if (who->GetPositionX() < itr->second)
|
|
||||||
return false;
|
|
||||||
break;
|
|
||||||
case BOUNDARY_E:
|
|
||||||
if (who->GetPositionY() < itr->second)
|
|
||||||
return false;
|
|
||||||
break;
|
|
||||||
case BOUNDARY_W:
|
|
||||||
if (who->GetPositionY() > itr->second)
|
|
||||||
return false;
|
|
||||||
break;
|
|
||||||
case BOUNDARY_NW:
|
|
||||||
if (who->GetPositionX() + who->GetPositionY() > itr->second)
|
|
||||||
return false;
|
|
||||||
break;
|
|
||||||
case BOUNDARY_SE:
|
|
||||||
if (who->GetPositionX() + who->GetPositionY() < itr->second)
|
|
||||||
return false;
|
|
||||||
break;
|
|
||||||
case BOUNDARY_NE:
|
|
||||||
if (who->GetPositionX() - who->GetPositionY() > itr->second)
|
|
||||||
return false;
|
|
||||||
break;
|
|
||||||
case BOUNDARY_SW:
|
|
||||||
if (who->GetPositionX() - who->GetPositionY() < itr->second)
|
|
||||||
return false;
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
void BossAI::JustSummoned(Creature* summon)
|
void BossAI::JustSummoned(Creature* summon)
|
||||||
{
|
{
|
||||||
summons.Summon(summon);
|
summons.Summon(summon);
|
||||||
|
|||||||
@@ -344,7 +344,6 @@ struct ScriptedAI : public CreatureAI
|
|||||||
void SetCombatMovement(bool allowMovement);
|
void SetCombatMovement(bool allowMovement);
|
||||||
bool IsCombatMovementAllowed() const { return _isCombatMovementAllowed; }
|
bool IsCombatMovementAllowed() const { return _isCombatMovementAllowed; }
|
||||||
|
|
||||||
bool EnterEvadeIfOutOfCombatArea();
|
|
||||||
virtual bool CheckEvadeIfOutOfCombatArea() const { return false; }
|
virtual bool CheckEvadeIfOutOfCombatArea() const { return false; }
|
||||||
|
|
||||||
// return true for heroic mode. i.e.
|
// return true for heroic mode. i.e.
|
||||||
@@ -416,7 +415,6 @@ struct ScriptedAI : public CreatureAI
|
|||||||
|
|
||||||
private:
|
private:
|
||||||
Difficulty _difficulty;
|
Difficulty _difficulty;
|
||||||
uint32 _evadeCheckCooldown;
|
|
||||||
bool _isCombatMovementAllowed;
|
bool _isCombatMovementAllowed;
|
||||||
bool _isHeroic;
|
bool _isHeroic;
|
||||||
};
|
};
|
||||||
@@ -428,7 +426,6 @@ public:
|
|||||||
~BossAI() override {}
|
~BossAI() override {}
|
||||||
|
|
||||||
InstanceScript* const instance;
|
InstanceScript* const instance;
|
||||||
BossBoundaryMap const* GetBoundary() const { return _boundary; }
|
|
||||||
|
|
||||||
void JustSummoned(Creature* summon) override;
|
void JustSummoned(Creature* summon) override;
|
||||||
void SummonedCreatureDespawn(Creature* summon) override;
|
void SummonedCreatureDespawn(Creature* summon) override;
|
||||||
@@ -453,23 +450,12 @@ protected:
|
|||||||
void _JustDied();
|
void _JustDied();
|
||||||
void _JustReachedHome() { me->setActive(false); }
|
void _JustReachedHome() { me->setActive(false); }
|
||||||
|
|
||||||
bool CheckInRoom()
|
|
||||||
{
|
|
||||||
if (CheckBoundary(me))
|
|
||||||
return true;
|
|
||||||
|
|
||||||
EnterEvadeMode();
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
bool CheckBoundary(Unit* who);
|
|
||||||
void TeleportCheaters();
|
void TeleportCheaters();
|
||||||
|
|
||||||
EventMap events;
|
EventMap events;
|
||||||
SummonList summons;
|
SummonList summons;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
BossBoundaryMap const* const _boundary;
|
|
||||||
uint32 const _bossId;
|
uint32 const _bossId;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -198,7 +198,7 @@ void npc_escortAI::ReturnToLastPoint()
|
|||||||
me->GetMotionMaster()->MovePoint(POINT_LAST_POINT, x, y, z);
|
me->GetMotionMaster()->MovePoint(POINT_LAST_POINT, x, y, z);
|
||||||
}
|
}
|
||||||
|
|
||||||
void npc_escortAI::EnterEvadeMode()
|
void npc_escortAI::EnterEvadeMode(EvadeReason /*why*/)
|
||||||
{
|
{
|
||||||
me->RemoveAllAuras();
|
me->RemoveAllAuras();
|
||||||
me->DeleteThreatList();
|
me->DeleteThreatList();
|
||||||
|
|||||||
@@ -66,7 +66,7 @@ public:
|
|||||||
|
|
||||||
void ReturnToLastPoint();
|
void ReturnToLastPoint();
|
||||||
|
|
||||||
void EnterEvadeMode() override;
|
void EnterEvadeMode(EvadeReason /*why*/ = EVADE_REASON_OTHER) override;
|
||||||
|
|
||||||
void UpdateAI(uint32 diff) override; //the "internal" update, calls UpdateEscortAI()
|
void UpdateAI(uint32 diff) override; //the "internal" update, calls UpdateEscortAI()
|
||||||
virtual void UpdateEscortAI(uint32 diff); //used when it's needed to add code in update (abilities, scripted events, etc)
|
virtual void UpdateEscortAI(uint32 diff); //used when it's needed to add code in update (abilities, scripted events, etc)
|
||||||
|
|||||||
@@ -150,7 +150,7 @@ void FollowerAI::JustRespawned()
|
|||||||
Reset();
|
Reset();
|
||||||
}
|
}
|
||||||
|
|
||||||
void FollowerAI::EnterEvadeMode()
|
void FollowerAI::EnterEvadeMode(EvadeReason /*why*/)
|
||||||
{
|
{
|
||||||
me->RemoveAllAuras();
|
me->RemoveAllAuras();
|
||||||
me->DeleteThreatList();
|
me->DeleteThreatList();
|
||||||
|
|||||||
@@ -46,7 +46,7 @@ public:
|
|||||||
|
|
||||||
void MoveInLineOfSight(Unit*) override;
|
void MoveInLineOfSight(Unit*) override;
|
||||||
|
|
||||||
void EnterEvadeMode() override;
|
void EnterEvadeMode(EvadeReason /*why*/ = EVADE_REASON_OTHER) override;
|
||||||
|
|
||||||
void JustDied(Unit*) override;
|
void JustDied(Unit*) override;
|
||||||
|
|
||||||
|
|||||||
@@ -618,7 +618,7 @@ void SmartAI::MovementInform(uint32 MovementType, uint32 Data)
|
|||||||
MovepointReached(Data);
|
MovepointReached(Data);
|
||||||
}
|
}
|
||||||
|
|
||||||
void SmartAI::EnterEvadeMode()
|
void SmartAI::EnterEvadeMode(EvadeReason /*why*/)
|
||||||
{
|
{
|
||||||
// xinef: fixes strange jumps when charming SmartAI npc
|
// xinef: fixes strange jumps when charming SmartAI npc
|
||||||
if (!me->IsAlive() || me->IsInEvadeMode())
|
if (!me->IsAlive() || me->IsInEvadeMode())
|
||||||
|
|||||||
@@ -80,7 +80,7 @@ public:
|
|||||||
void EnterCombat(Unit* enemy) override;
|
void EnterCombat(Unit* enemy) override;
|
||||||
|
|
||||||
// Called for reaction at stopping attack at no attackers or targets
|
// Called for reaction at stopping attack at no attackers or targets
|
||||||
void EnterEvadeMode() override;
|
void EnterEvadeMode(EvadeReason why = EVADE_REASON_OTHER) override;
|
||||||
|
|
||||||
// Called when the creature is killed
|
// Called when the creature is killed
|
||||||
void JustDied(Unit* killer) override;
|
void JustDied(Unit* killer) override;
|
||||||
|
|||||||
@@ -202,7 +202,7 @@ bool ForcedDespawnDelayEvent::Execute(uint64 /*e_time*/, uint32 /*p_time*/)
|
|||||||
}
|
}
|
||||||
|
|
||||||
Creature::Creature(bool isWorldObject): Unit(isWorldObject), MovableMapObject(), m_groupLootTimer(0), lootingGroupLowGUID(0), m_PlayerDamageReq(0), m_lootRecipientGroup(0),
|
Creature::Creature(bool isWorldObject): Unit(isWorldObject), MovableMapObject(), m_groupLootTimer(0), lootingGroupLowGUID(0), m_PlayerDamageReq(0), m_lootRecipientGroup(0),
|
||||||
m_corpseRemoveTime(0), m_respawnTime(0), m_respawnDelay(300), m_corpseDelay(60), m_wanderDistance(0.0f),
|
m_corpseRemoveTime(0), m_respawnTime(0), m_respawnDelay(300), m_corpseDelay(60), m_wanderDistance(0.0f), m_boundaryCheckTime(2500),
|
||||||
m_transportCheckTimer(1000), lootPickPocketRestoreTime(0), m_reactState(REACT_AGGRESSIVE), m_defaultMovementType(IDLE_MOTION_TYPE),
|
m_transportCheckTimer(1000), lootPickPocketRestoreTime(0), m_reactState(REACT_AGGRESSIVE), m_defaultMovementType(IDLE_MOTION_TYPE),
|
||||||
m_spawnId(0), m_equipmentId(0), m_originalEquipmentId(0), m_AlreadyCallAssistance(false),
|
m_spawnId(0), m_equipmentId(0), m_originalEquipmentId(0), m_AlreadyCallAssistance(false),
|
||||||
m_AlreadySearchedAssistance(false), m_regenHealth(true), m_AI_locked(false), m_meleeDamageSchoolMask(SPELL_SCHOOL_MASK_NORMAL), m_originalEntry(0), m_moveInLineOfSightDisabled(false), m_moveInLineOfSightStrictlyDisabled(false),
|
m_AlreadySearchedAssistance(false), m_regenHealth(true), m_AI_locked(false), m_meleeDamageSchoolMask(SPELL_SCHOOL_MASK_NORMAL), m_originalEntry(0), m_moveInLineOfSightDisabled(false), m_moveInLineOfSightStrictlyDisabled(false),
|
||||||
@@ -689,6 +689,17 @@ void Creature::Update(uint32 diff)
|
|||||||
SelectVictim();
|
SelectVictim();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// periodic check to see if the creature has passed an evade boundary
|
||||||
|
if (IsAIEnabled && !IsInEvadeMode() && IsInCombat())
|
||||||
|
{
|
||||||
|
if (diff >= m_boundaryCheckTime)
|
||||||
|
{
|
||||||
|
AI()->CheckInRoom();
|
||||||
|
m_boundaryCheckTime = 2500;
|
||||||
|
} else
|
||||||
|
m_boundaryCheckTime -= diff;
|
||||||
|
}
|
||||||
|
|
||||||
Unit* owner = GetCharmerOrOwner();
|
Unit* owner = GetCharmerOrOwner();
|
||||||
if (IsCharmed() && !IsWithinDistInMap(owner, GetMap()->GetVisibilityRange(), true, false))
|
if (IsCharmed() && !IsWithinDistInMap(owner, GetMap()->GetVisibilityRange(), true, false))
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -285,6 +285,8 @@ public:
|
|||||||
[[nodiscard]] float GetWanderDistance() const { return m_wanderDistance; }
|
[[nodiscard]] float GetWanderDistance() const { return m_wanderDistance; }
|
||||||
void SetWanderDistance(float dist) { m_wanderDistance = dist; }
|
void SetWanderDistance(float dist) { m_wanderDistance = dist; }
|
||||||
|
|
||||||
|
void DoImmediateBoundaryCheck() { m_boundaryCheckTime = 0; }
|
||||||
|
|
||||||
uint32 m_groupLootTimer; // (msecs)timer used for group loot
|
uint32 m_groupLootTimer; // (msecs)timer used for group loot
|
||||||
uint32 lootingGroupLowGUID; // used to find group which is looting corpse
|
uint32 lootingGroupLowGUID; // used to find group which is looting corpse
|
||||||
|
|
||||||
@@ -402,6 +404,7 @@ protected:
|
|||||||
uint32 m_respawnDelay; // (secs) delay between corpse disappearance and respawning
|
uint32 m_respawnDelay; // (secs) delay between corpse disappearance and respawning
|
||||||
uint32 m_corpseDelay; // (secs) delay between death and corpse disappearance
|
uint32 m_corpseDelay; // (secs) delay between death and corpse disappearance
|
||||||
float m_wanderDistance;
|
float m_wanderDistance;
|
||||||
|
uint32 m_boundaryCheckTime; // (msecs) remaining time for next evade boundary check
|
||||||
uint16 m_transportCheckTimer;
|
uint16 m_transportCheckTimer;
|
||||||
uint32 lootPickPocketRestoreTime;
|
uint32 lootPickPocketRestoreTime;
|
||||||
|
|
||||||
|
|||||||
@@ -15,8 +15,8 @@
|
|||||||
* with this program. If not, see <http://www.gnu.org/licenses/>.
|
* with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "Define.h"
|
|
||||||
#include "Item.h"
|
#include "Item.h"
|
||||||
|
#include "Define.h"
|
||||||
#include "SmartEnum.h"
|
#include "SmartEnum.h"
|
||||||
#include <stdexcept>
|
#include <stdexcept>
|
||||||
|
|
||||||
|
|||||||
@@ -14038,7 +14038,7 @@ void Unit::TauntFadeOut(Unit* taunter)
|
|||||||
if (m_ThreatMgr.isThreatListEmpty())
|
if (m_ThreatMgr.isThreatListEmpty())
|
||||||
{
|
{
|
||||||
if (creature->IsAIEnabled)
|
if (creature->IsAIEnabled)
|
||||||
creature->AI()->EnterEvadeMode();
|
creature->AI()->EnterEvadeMode(CreatureAI::EVADE_REASON_NO_HOSTILES);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -14124,7 +14124,7 @@ Unit* Creature::SelectVictim()
|
|||||||
for (Unit::AuraEffectList::const_iterator itr = iAuras.begin(); itr != iAuras.end(); ++itr)
|
for (Unit::AuraEffectList::const_iterator itr = iAuras.begin(); itr != iAuras.end(); ++itr)
|
||||||
if ((*itr)->GetBase()->IsPermanent())
|
if ((*itr)->GetBase()->IsPermanent())
|
||||||
{
|
{
|
||||||
AI()->EnterEvadeMode();
|
AI()->EnterEvadeMode(CreatureAI::EVADE_REASON_NO_HOSTILES);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
return nullptr;
|
return nullptr;
|
||||||
|
|||||||
@@ -15,9 +15,9 @@
|
|||||||
* with this program. If not, see <http://www.gnu.org/licenses/>.
|
* with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#include "Unit.h"
|
||||||
#include "Define.h"
|
#include "Define.h"
|
||||||
#include "SmartEnum.h"
|
#include "SmartEnum.h"
|
||||||
#include "Unit.h"
|
|
||||||
#include <stdexcept>
|
#include <stdexcept>
|
||||||
|
|
||||||
namespace Acore::Impl::EnumUtilsImpl
|
namespace Acore::Impl::EnumUtilsImpl
|
||||||
|
|||||||
@@ -31,6 +31,12 @@
|
|||||||
#include "Spell.h"
|
#include "Spell.h"
|
||||||
#include "WorldSession.h"
|
#include "WorldSession.h"
|
||||||
|
|
||||||
|
BossBoundaryData::~BossBoundaryData()
|
||||||
|
{
|
||||||
|
for (const_iterator it = begin(); it != end(); ++it)
|
||||||
|
delete it->boundary;
|
||||||
|
}
|
||||||
|
|
||||||
void InstanceScript::SaveToDB()
|
void InstanceScript::SaveToDB()
|
||||||
{
|
{
|
||||||
std::string data = GetSaveData();
|
std::string data = GetSaveData();
|
||||||
@@ -120,6 +126,13 @@ bool InstanceScript::IsEncounterInProgress() const
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void InstanceScript::LoadBossBoundaries(const BossBoundaryData& data)
|
||||||
|
{
|
||||||
|
for (BossBoundaryEntry const& entry : data)
|
||||||
|
if (entry.bossId < bosses.size())
|
||||||
|
bosses[entry.bossId].boundary.push_back(entry.boundary);
|
||||||
|
}
|
||||||
|
|
||||||
void InstanceScript::LoadMinionData(const MinionData* data)
|
void InstanceScript::LoadMinionData(const MinionData* data)
|
||||||
{
|
{
|
||||||
while (data->entry)
|
while (data->entry)
|
||||||
@@ -137,7 +150,7 @@ void InstanceScript::LoadDoorData(const DoorData* data)
|
|||||||
while (data->entry)
|
while (data->entry)
|
||||||
{
|
{
|
||||||
if (data->bossId < bosses.size())
|
if (data->bossId < bosses.size())
|
||||||
doors.insert(std::make_pair(data->entry, DoorInfo(&bosses[data->bossId], data->type, BoundaryType(data->boundary))));
|
doors.insert(std::make_pair(data->entry, DoorInfo(&bosses[data->bossId], data->type)));
|
||||||
|
|
||||||
++data;
|
++data;
|
||||||
}
|
}
|
||||||
@@ -268,28 +281,6 @@ void InstanceScript::AddDoor(GameObject* door, bool add)
|
|||||||
if (add)
|
if (add)
|
||||||
{
|
{
|
||||||
data.bossInfo->door[data.type].insert(door);
|
data.bossInfo->door[data.type].insert(door);
|
||||||
switch (data.boundary)
|
|
||||||
{
|
|
||||||
default:
|
|
||||||
case BOUNDARY_NONE:
|
|
||||||
break;
|
|
||||||
case BOUNDARY_N:
|
|
||||||
case BOUNDARY_S:
|
|
||||||
data.bossInfo->boundary[data.boundary] = door->GetPositionX();
|
|
||||||
break;
|
|
||||||
case BOUNDARY_E:
|
|
||||||
case BOUNDARY_W:
|
|
||||||
data.bossInfo->boundary[data.boundary] = door->GetPositionY();
|
|
||||||
break;
|
|
||||||
case BOUNDARY_NW:
|
|
||||||
case BOUNDARY_SE:
|
|
||||||
data.bossInfo->boundary[data.boundary] = door->GetPositionX() + door->GetPositionY();
|
|
||||||
break;
|
|
||||||
case BOUNDARY_NE:
|
|
||||||
case BOUNDARY_SW:
|
|
||||||
data.bossInfo->boundary[data.boundary] = door->GetPositionX() - door->GetPositionY();
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
data.bossInfo->door[data.type].erase(door);
|
data.bossInfo->door[data.type].erase(door);
|
||||||
|
|||||||
@@ -18,9 +18,11 @@
|
|||||||
#ifndef ACORE_INSTANCE_DATA_H
|
#ifndef ACORE_INSTANCE_DATA_H
|
||||||
#define ACORE_INSTANCE_DATA_H
|
#define ACORE_INSTANCE_DATA_H
|
||||||
|
|
||||||
|
#include "CreatureAI.h"
|
||||||
#include "ObjectMgr.h"
|
#include "ObjectMgr.h"
|
||||||
#include "World.h"
|
#include "World.h"
|
||||||
#include "ZoneScript.h"
|
#include "ZoneScript.h"
|
||||||
|
#include <set>
|
||||||
|
|
||||||
#define OUT_SAVE_INST_DATA LOG_DEBUG("scripts.ai", "Saving Instance Data for Instance {} (Map {}, Instance Id {})", instance->GetMapName(), instance->GetId(), instance->GetInstanceId())
|
#define OUT_SAVE_INST_DATA LOG_DEBUG("scripts.ai", "Saving Instance Data for Instance {} (Map {}, Instance Id {})", instance->GetMapName(), instance->GetId(), instance->GetInstanceId())
|
||||||
#define OUT_SAVE_INST_DATA_COMPLETE LOG_DEBUG("scripts.ai", "Saving Instance Data for Instance {} (Map {}, Instance Id {}) completed.", instance->GetMapName(), instance->GetId(), instance->GetInstanceId())
|
#define OUT_SAVE_INST_DATA_COMPLETE LOG_DEBUG("scripts.ai", "Saving Instance Data for Instance {} (Map {}, Instance Id {}) completed.", instance->GetMapName(), instance->GetId(), instance->GetInstanceId())
|
||||||
@@ -67,30 +69,30 @@ enum DoorType
|
|||||||
MAX_DOOR_TYPES,
|
MAX_DOOR_TYPES,
|
||||||
};
|
};
|
||||||
|
|
||||||
enum BoundaryType
|
|
||||||
{
|
|
||||||
BOUNDARY_NONE = 0,
|
|
||||||
BOUNDARY_N,
|
|
||||||
BOUNDARY_S,
|
|
||||||
BOUNDARY_E,
|
|
||||||
BOUNDARY_W,
|
|
||||||
BOUNDARY_NE,
|
|
||||||
BOUNDARY_NW,
|
|
||||||
BOUNDARY_SE,
|
|
||||||
BOUNDARY_SW,
|
|
||||||
BOUNDARY_MAX_X = BOUNDARY_N,
|
|
||||||
BOUNDARY_MIN_X = BOUNDARY_S,
|
|
||||||
BOUNDARY_MAX_Y = BOUNDARY_W,
|
|
||||||
BOUNDARY_MIN_Y = BOUNDARY_E,
|
|
||||||
};
|
|
||||||
|
|
||||||
typedef std::map<BoundaryType, float> BossBoundaryMap;
|
|
||||||
|
|
||||||
struct DoorData
|
struct DoorData
|
||||||
{
|
{
|
||||||
uint32 entry, bossId;
|
uint32 entry, bossId;
|
||||||
DoorType type;
|
DoorType type;
|
||||||
uint32 boundary;
|
};
|
||||||
|
|
||||||
|
struct BossBoundaryEntry
|
||||||
|
{
|
||||||
|
uint32 const bossId;
|
||||||
|
AreaBoundary const* const boundary;
|
||||||
|
};
|
||||||
|
|
||||||
|
struct BossBoundaryData
|
||||||
|
{
|
||||||
|
typedef std::vector<BossBoundaryEntry> StorageType;
|
||||||
|
typedef StorageType::const_iterator const_iterator;
|
||||||
|
|
||||||
|
BossBoundaryData(std::initializer_list<BossBoundaryEntry> data) : _data(data) { }
|
||||||
|
~BossBoundaryData();
|
||||||
|
const_iterator begin() const { return _data.begin(); }
|
||||||
|
const_iterator end() const { return _data.end(); }
|
||||||
|
|
||||||
|
private:
|
||||||
|
StorageType _data;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct MinionData
|
struct MinionData
|
||||||
@@ -110,16 +112,15 @@ struct BossInfo
|
|||||||
EncounterState state;
|
EncounterState state;
|
||||||
DoorSet door[MAX_DOOR_TYPES];
|
DoorSet door[MAX_DOOR_TYPES];
|
||||||
MinionSet minion;
|
MinionSet minion;
|
||||||
BossBoundaryMap boundary;
|
CreatureBoundary boundary;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct DoorInfo
|
struct DoorInfo
|
||||||
{
|
{
|
||||||
explicit DoorInfo(BossInfo* _bossInfo, DoorType _type, BoundaryType _boundary)
|
explicit DoorInfo(BossInfo* _bossInfo, DoorType _type)
|
||||||
: bossInfo(_bossInfo), type(_type), boundary(_boundary) {}
|
: bossInfo(_bossInfo), type(_type) { }
|
||||||
BossInfo* bossInfo;
|
BossInfo* bossInfo;
|
||||||
DoorType type;
|
DoorType type;
|
||||||
BoundaryType boundary;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
struct MinionInfo
|
struct MinionInfo
|
||||||
@@ -225,7 +226,7 @@ public:
|
|||||||
virtual bool SetBossState(uint32 id, EncounterState state);
|
virtual bool SetBossState(uint32 id, EncounterState state);
|
||||||
EncounterState GetBossState(uint32 id) const { return id < bosses.size() ? bosses[id].state : TO_BE_DECIDED; }
|
EncounterState GetBossState(uint32 id) const { return id < bosses.size() ? bosses[id].state : TO_BE_DECIDED; }
|
||||||
static std::string GetBossStateName(uint8 state);
|
static std::string GetBossStateName(uint8 state);
|
||||||
BossBoundaryMap const* GetBossBoundary(uint32 id) const { return id < bosses.size() ? &bosses[id].boundary : nullptr; }
|
CreatureBoundary const* GetBossBoundary(uint32 id) const { return id < bosses.size() ? &bosses[id].boundary : nullptr; }
|
||||||
BossInfo const* GetBossInfo(uint32 id) const { return &bosses[id]; }
|
BossInfo const* GetBossInfo(uint32 id) const { return &bosses[id]; }
|
||||||
|
|
||||||
// Achievement criteria additional requirements check
|
// Achievement criteria additional requirements check
|
||||||
@@ -255,6 +256,7 @@ public:
|
|||||||
virtual void DoAction(int32 /*action*/) {}
|
virtual void DoAction(int32 /*action*/) {}
|
||||||
protected:
|
protected:
|
||||||
void SetBossNumber(uint32 number) { bosses.resize(number); }
|
void SetBossNumber(uint32 number) { bosses.resize(number); }
|
||||||
|
void LoadBossBoundaries(BossBoundaryData const& data);
|
||||||
void LoadDoorData(DoorData const* data);
|
void LoadDoorData(DoorData const* data);
|
||||||
void LoadMinionData(MinionData const* data);
|
void LoadMinionData(MinionData const* data);
|
||||||
void LoadObjectData(ObjectData const* creatureData, ObjectData const* gameObjectData);
|
void LoadObjectData(ObjectData const* creatureData, ObjectData const* gameObjectData);
|
||||||
|
|||||||
@@ -0,0 +1,113 @@
|
|||||||
|
/*
|
||||||
|
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
|
||||||
|
*
|
||||||
|
* This program is free software; you can redistribute it and/or modify it
|
||||||
|
* under the terms of the GNU Affero General Public License as published by the
|
||||||
|
* Free Software Foundation; either version 3 of the License, or (at your
|
||||||
|
* option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||||
|
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||||
|
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
|
||||||
|
* more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License along
|
||||||
|
* with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include "AreaBoundary.h"
|
||||||
|
#include "Unit.h"
|
||||||
|
#include "TemporarySummon.h"
|
||||||
|
|
||||||
|
// ---== RECTANGLE ==---
|
||||||
|
RectangleBoundary::RectangleBoundary(float southX, float northX, float eastY, float westY, bool isInverted) :
|
||||||
|
AreaBoundary(isInverted), _minX(southX), _maxX(northX), _minY(eastY), _maxY(westY) { }
|
||||||
|
bool RectangleBoundary::IsWithinBoundaryArea(Position const* pos) const
|
||||||
|
{
|
||||||
|
return !(
|
||||||
|
pos->GetPositionX() < _minX ||
|
||||||
|
pos->GetPositionX() > _maxX ||
|
||||||
|
pos->GetPositionY() < _minY ||
|
||||||
|
pos->GetPositionY() > _maxY
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
// ---== CIRCLE ==---
|
||||||
|
CircleBoundary::CircleBoundary(Position const& center, double radius, bool isInverted) :
|
||||||
|
AreaBoundary(isInverted), _center(center), _radiusSq(radius*radius) { }
|
||||||
|
|
||||||
|
CircleBoundary::CircleBoundary(Position const& center, Position const& pointOnCircle, bool isInverted) :
|
||||||
|
AreaBoundary(isInverted), _center(center), _radiusSq(_center.GetDoubleExactDist2dSq(pointOnCircle)) { }
|
||||||
|
|
||||||
|
bool CircleBoundary::IsWithinBoundaryArea(Position const* pos) const
|
||||||
|
{
|
||||||
|
double offX = _center.GetDoublePositionX() - pos->GetPositionX();
|
||||||
|
double offY = _center.GetDoublePositionY() - pos->GetPositionY();
|
||||||
|
return offX * offX + offY * offY <= _radiusSq;
|
||||||
|
}
|
||||||
|
|
||||||
|
// ---== ELLIPSE ==---
|
||||||
|
EllipseBoundary::EllipseBoundary(Position const& center, double radiusX, double radiusY, bool isInverted) :
|
||||||
|
AreaBoundary(isInverted), _center(center), _radiusYSq(radiusY*radiusY), _scaleXSq(_radiusYSq / (radiusX*radiusX)) { }
|
||||||
|
|
||||||
|
bool EllipseBoundary::IsWithinBoundaryArea(Position const* pos) const
|
||||||
|
{
|
||||||
|
double offX = _center.GetDoublePositionX() - pos->GetPositionX();
|
||||||
|
double offY = _center.GetDoublePositionY() - pos->GetPositionY();
|
||||||
|
return (offX*offX)*_scaleXSq + (offY*offY) <= _radiusYSq;
|
||||||
|
}
|
||||||
|
|
||||||
|
// ---== TRIANGLE ==---
|
||||||
|
TriangleBoundary::TriangleBoundary(Position const& pointA, Position const& pointB, Position const& pointC, bool isInverted) :
|
||||||
|
AreaBoundary(isInverted), _a(pointA), _b(pointB), _c(pointC), _abx(_b.GetDoublePositionX()-_a.GetDoublePositionX()), _bcx(_c.GetDoublePositionX()-_b.GetDoublePositionX()), _cax(_a.GetDoublePositionX() - _c.GetDoublePositionX()), _aby(_b.GetDoublePositionY()-_a.GetDoublePositionY()), _bcy(_c.GetDoublePositionY()-_b.GetDoublePositionY()), _cay(_a.GetDoublePositionY() - _c.GetDoublePositionY()) { }
|
||||||
|
bool TriangleBoundary::IsWithinBoundaryArea(Position const* pos) const
|
||||||
|
{
|
||||||
|
// half-plane signs
|
||||||
|
bool sign1 = ((-_b.GetDoublePositionX() + pos->GetPositionX()) * _aby - (-_b.GetDoublePositionY() + pos->GetPositionY()) * _abx) < 0;
|
||||||
|
bool sign2 = ((-_c.GetDoublePositionX() + pos->GetPositionX()) * _bcy - (-_c.GetDoublePositionY() + pos->GetPositionY()) * _bcx) < 0;
|
||||||
|
bool sign3 = ((-_a.GetDoublePositionX() + pos->GetPositionX()) * _cay - (-_a.GetDoublePositionY() + pos->GetPositionY()) * _cax) < 0;
|
||||||
|
|
||||||
|
// if all signs are the same, the point is inside the triangle
|
||||||
|
return ((sign1 == sign2) && (sign2 == sign3));
|
||||||
|
}
|
||||||
|
|
||||||
|
// ---== PARALLELOGRAM ==---
|
||||||
|
ParallelogramBoundary::ParallelogramBoundary(Position const& cornerA, Position const& cornerB, Position const& cornerD, bool isInverted) :
|
||||||
|
AreaBoundary(isInverted), _a(cornerA), _b(cornerB), _d(cornerD), _c(DoublePosition(_d.GetDoublePositionX() + (_b.GetDoublePositionX() - _a.GetDoublePositionX()), _d.GetDoublePositionY() + (_b.GetDoublePositionY() - _a.GetDoublePositionY()))), _abx(_b.GetDoublePositionX() - _a.GetDoublePositionX()), _dax(_a.GetDoublePositionX() - _d.GetDoublePositionX()), _aby(_b.GetDoublePositionY() - _a.GetDoublePositionY()), _day(_a.GetDoublePositionY() - _d.GetDoublePositionY()) { }
|
||||||
|
bool ParallelogramBoundary::IsWithinBoundaryArea(Position const* pos) const
|
||||||
|
{
|
||||||
|
// half-plane signs
|
||||||
|
bool sign1 = ((-_b.GetDoublePositionX() + pos->GetPositionX()) * _aby - (-_b.GetDoublePositionY() + pos->GetPositionY()) * _abx) < 0;
|
||||||
|
bool sign2 = ((-_a.GetDoublePositionX() + pos->GetPositionX()) * _day - (-_a.GetDoublePositionY() + pos->GetPositionY()) * _dax) < 0;
|
||||||
|
bool sign3 = ((-_d.GetDoublePositionY() + pos->GetPositionY()) * _abx - (-_d.GetDoublePositionX() + pos->GetPositionX()) * _aby) < 0; // AB = -CD
|
||||||
|
bool sign4 = ((-_c.GetDoublePositionY() + pos->GetPositionY()) * _dax - (-_c.GetDoublePositionX() + pos->GetPositionX()) * _day) < 0; // DA = -BC
|
||||||
|
|
||||||
|
// if all signs are equal, the point is inside
|
||||||
|
return ((sign1 == sign2) && (sign2 == sign3) && (sign3 == sign4));
|
||||||
|
}
|
||||||
|
|
||||||
|
// ---== Z RANGE ==---
|
||||||
|
ZRangeBoundary::ZRangeBoundary(float minZ, float maxZ, bool isInverted) :
|
||||||
|
AreaBoundary(isInverted), _minZ(minZ), _maxZ(maxZ) { }
|
||||||
|
bool ZRangeBoundary::IsWithinBoundaryArea(Position const* pos) const
|
||||||
|
{
|
||||||
|
return (_minZ <= pos->GetPositionZ() && pos->GetPositionZ() <= _maxZ);
|
||||||
|
}
|
||||||
|
|
||||||
|
// ---== UNION OF 2 BOUNDARIES ==---
|
||||||
|
BoundaryUnionBoundary::BoundaryUnionBoundary(AreaBoundary const* b1, AreaBoundary const* b2, bool isInverted) :
|
||||||
|
AreaBoundary(isInverted), _b1(b1), _b2(b2)
|
||||||
|
{
|
||||||
|
ASSERT(b1 && b2);
|
||||||
|
}
|
||||||
|
|
||||||
|
BoundaryUnionBoundary::~BoundaryUnionBoundary()
|
||||||
|
{
|
||||||
|
delete _b1;
|
||||||
|
delete _b2;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool BoundaryUnionBoundary::IsWithinBoundaryArea(Position const* pos) const
|
||||||
|
{
|
||||||
|
return (_b1->IsWithinBoundary(pos) || _b2->IsWithinBoundary(pos));
|
||||||
|
}
|
||||||
@@ -0,0 +1,168 @@
|
|||||||
|
/*
|
||||||
|
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
|
||||||
|
*
|
||||||
|
* This program is free software; you can redistribute it and/or modify it
|
||||||
|
* under the terms of the GNU Affero General Public License as published by the
|
||||||
|
* Free Software Foundation; either version 3 of the License, or (at your
|
||||||
|
* option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||||
|
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||||
|
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
|
||||||
|
* more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License along
|
||||||
|
* with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef ACORE_AREA_BOUNDARY_H
|
||||||
|
#define ACORE_AREA_BOUNDARY_H
|
||||||
|
|
||||||
|
#include "Position.h"
|
||||||
|
|
||||||
|
class AC_GAME_API AreaBoundary
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
bool IsWithinBoundary(Position const* pos) const { return pos && (IsWithinBoundaryArea(pos) != _isInvertedBoundary); }
|
||||||
|
bool IsWithinBoundary(Position const& pos) const { return IsWithinBoundary(&pos); }
|
||||||
|
|
||||||
|
virtual ~AreaBoundary() { }
|
||||||
|
|
||||||
|
protected:
|
||||||
|
explicit AreaBoundary(bool isInverted) : _isInvertedBoundary(isInverted) { }
|
||||||
|
|
||||||
|
struct DoublePosition : Position
|
||||||
|
{
|
||||||
|
DoublePosition(double x = 0.0, double y = 0.0, double z = 0.0, float o = 0.0f)
|
||||||
|
: Position(float(x), float(y), float(z), o), DoublePosX(x), DoublePosY(y), DoublePosZ(z) { }
|
||||||
|
|
||||||
|
DoublePosition(float x, float y = 0.0f, float z = 0.0f, float o = 0.0f)
|
||||||
|
: Position(x, y, z, o), DoublePosX(x), DoublePosY(y), DoublePosZ(z) { }
|
||||||
|
|
||||||
|
DoublePosition(Position const& pos)
|
||||||
|
: Position(pos), DoublePosX(pos.m_positionX), DoublePosY(pos.m_positionY), DoublePosZ(pos.m_positionZ) { }
|
||||||
|
|
||||||
|
double GetDoublePositionX() const { return DoublePosX; }
|
||||||
|
double GetDoublePositionY() const { return DoublePosY; }
|
||||||
|
double GetDoublePositionZ() const { return DoublePosZ; }
|
||||||
|
|
||||||
|
double GetDoubleExactDist2dSq(DoublePosition const& pos) const
|
||||||
|
{
|
||||||
|
double const offX = GetDoublePositionX() - pos.GetDoublePositionX();
|
||||||
|
double const offY = GetDoublePositionY() - pos.GetDoublePositionY();
|
||||||
|
return (offX * offX) + (offY * offY);
|
||||||
|
}
|
||||||
|
|
||||||
|
Position* sync()
|
||||||
|
{
|
||||||
|
m_positionX = float(DoublePosX);
|
||||||
|
m_positionY = float(DoublePosY);
|
||||||
|
m_positionZ = float(DoublePosZ);
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
double DoublePosX;
|
||||||
|
double DoublePosY;
|
||||||
|
double DoublePosZ;
|
||||||
|
};
|
||||||
|
|
||||||
|
virtual bool IsWithinBoundaryArea(Position const* pos) const = 0;
|
||||||
|
|
||||||
|
private:
|
||||||
|
bool _isInvertedBoundary;
|
||||||
|
};
|
||||||
|
|
||||||
|
class AC_GAME_API RectangleBoundary : public AreaBoundary
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
// X axis is north/south, Y axis is east/west, larger values are northwest
|
||||||
|
RectangleBoundary(float southX, float northX, float eastY, float westY, bool isInverted = false);
|
||||||
|
|
||||||
|
protected:
|
||||||
|
bool IsWithinBoundaryArea(Position const* pos) const override;
|
||||||
|
|
||||||
|
private:
|
||||||
|
float const _minX, _maxX, _minY, _maxY;
|
||||||
|
};
|
||||||
|
|
||||||
|
class AC_GAME_API CircleBoundary : public AreaBoundary
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
CircleBoundary(Position const& center, double radius, bool isInverted = false);
|
||||||
|
CircleBoundary(Position const& center, Position const& pointOnCircle, bool isInverted = false);
|
||||||
|
|
||||||
|
protected:
|
||||||
|
bool IsWithinBoundaryArea(Position const* pos) const override;
|
||||||
|
|
||||||
|
private:
|
||||||
|
DoublePosition const _center;
|
||||||
|
double const _radiusSq;
|
||||||
|
};
|
||||||
|
|
||||||
|
class AC_GAME_API EllipseBoundary : public AreaBoundary
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
EllipseBoundary(Position const& center, double radiusX, double radiusY, bool isInverted = false);
|
||||||
|
|
||||||
|
protected:
|
||||||
|
bool IsWithinBoundaryArea(Position const* pos) const override;
|
||||||
|
|
||||||
|
private:
|
||||||
|
DoublePosition const _center;
|
||||||
|
double const _radiusYSq, _scaleXSq;
|
||||||
|
};
|
||||||
|
|
||||||
|
class AC_GAME_API TriangleBoundary : public AreaBoundary
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
TriangleBoundary(Position const& pointA, Position const& pointB, Position const& pointC, bool isInverted = false);
|
||||||
|
|
||||||
|
protected:
|
||||||
|
bool IsWithinBoundaryArea(Position const* pos) const override;
|
||||||
|
|
||||||
|
private:
|
||||||
|
DoublePosition const _a, _b, _c;
|
||||||
|
double const _abx, _bcx, _cax, _aby, _bcy, _cay;
|
||||||
|
};
|
||||||
|
|
||||||
|
class AC_GAME_API ParallelogramBoundary : public AreaBoundary
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
// Note: AB must be orthogonal to AD
|
||||||
|
ParallelogramBoundary(Position const& cornerA, Position const& cornerB, Position const& cornerD, bool isInverted = false);
|
||||||
|
|
||||||
|
protected:
|
||||||
|
bool IsWithinBoundaryArea(Position const* pos) const override;
|
||||||
|
|
||||||
|
private:
|
||||||
|
DoublePosition const _a, _b, _d, _c;
|
||||||
|
double const _abx, _dax, _aby, _day;
|
||||||
|
};
|
||||||
|
|
||||||
|
class AC_GAME_API ZRangeBoundary : public AreaBoundary
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
ZRangeBoundary(float minZ, float maxZ, bool isInverted = false);
|
||||||
|
|
||||||
|
protected:
|
||||||
|
bool IsWithinBoundaryArea(Position const* pos) const override;
|
||||||
|
|
||||||
|
private:
|
||||||
|
float const _minZ, _maxZ;
|
||||||
|
};
|
||||||
|
|
||||||
|
class AC_GAME_API BoundaryUnionBoundary : public AreaBoundary
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
BoundaryUnionBoundary(AreaBoundary const* b1, AreaBoundary const* b2, bool isInverted = false);
|
||||||
|
|
||||||
|
protected:
|
||||||
|
virtual ~BoundaryUnionBoundary();
|
||||||
|
bool IsWithinBoundaryArea(Position const* pos) const override;
|
||||||
|
|
||||||
|
private:
|
||||||
|
AreaBoundary const* const _b1;
|
||||||
|
AreaBoundary const* const _b2;
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif //ACORE_AREA_BOUNDARY_H
|
||||||
@@ -15,8 +15,8 @@
|
|||||||
* with this program. If not, see <http://www.gnu.org/licenses/>.
|
* with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "Define.h"
|
|
||||||
#include "QuestDef.h"
|
#include "QuestDef.h"
|
||||||
|
#include "Define.h"
|
||||||
#include "SmartEnum.h"
|
#include "SmartEnum.h"
|
||||||
#include <stdexcept>
|
#include <stdexcept>
|
||||||
|
|
||||||
|
|||||||
@@ -15,9 +15,9 @@
|
|||||||
* with this program. If not, see <http://www.gnu.org/licenses/>.
|
* with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#include "WardenCheckMgr.h"
|
||||||
#include "Define.h"
|
#include "Define.h"
|
||||||
#include "SmartEnum.h"
|
#include "SmartEnum.h"
|
||||||
#include "WardenCheckMgr.h"
|
|
||||||
#include <stdexcept>
|
#include <stdexcept>
|
||||||
|
|
||||||
namespace Acore::Impl::EnumUtilsImpl
|
namespace Acore::Impl::EnumUtilsImpl
|
||||||
|
|||||||
@@ -130,9 +130,9 @@ public:
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void EnterEvadeMode() override
|
void EnterEvadeMode(EvadeReason why) override
|
||||||
{
|
{
|
||||||
ScriptedAI::EnterEvadeMode();
|
ScriptedAI::EnterEvadeMode(why);
|
||||||
|
|
||||||
// Evade boss
|
// Evade boss
|
||||||
if (BattlegroundMap* bgMap = me->GetMap()->ToBattlegroundMap())
|
if (BattlegroundMap* bgMap = me->GetMap()->ToBattlegroundMap())
|
||||||
@@ -199,7 +199,7 @@ public:
|
|||||||
Position const& _homePosition = me->GetHomePosition();
|
Position const& _homePosition = me->GetHomePosition();
|
||||||
if (me->GetDistance2d(_homePosition.GetPositionX(), _homePosition.GetPositionY()) > 50.0f)
|
if (me->GetDistance2d(_homePosition.GetPositionX(), _homePosition.GetPositionY()) > 50.0f)
|
||||||
{
|
{
|
||||||
EnterEvadeMode();
|
ScriptedAI::EnterEvadeMode();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
events.ScheduleEvent(EVENT_CHECK_RESET, 5000);
|
events.ScheduleEvent(EVENT_CHECK_RESET, 5000);
|
||||||
|
|||||||
@@ -99,9 +99,9 @@ public:
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void EnterEvadeMode() override
|
void EnterEvadeMode(EvadeReason why) override
|
||||||
{
|
{
|
||||||
ScriptedAI::EnterEvadeMode();
|
ScriptedAI::EnterEvadeMode(why);
|
||||||
|
|
||||||
// Evade mini bosses
|
// Evade mini bosses
|
||||||
if (BattlegroundMap* bgMap = me->GetMap()->ToBattlegroundMap())
|
if (BattlegroundMap* bgMap = me->GetMap()->ToBattlegroundMap())
|
||||||
@@ -167,7 +167,7 @@ public:
|
|||||||
{
|
{
|
||||||
if (me->GetDistance2d(me->GetHomePosition().GetPositionX(), me->GetHomePosition().GetPositionY()) > 50)
|
if (me->GetDistance2d(me->GetHomePosition().GetPositionX(), me->GetHomePosition().GetPositionY()) > 50)
|
||||||
{
|
{
|
||||||
EnterEvadeMode();
|
ScriptedAI::EnterEvadeMode();
|
||||||
Talk(YELL_EVADE);
|
Talk(YELL_EVADE);
|
||||||
}
|
}
|
||||||
ResetTimer = 5 * IN_MILLISECONDS;
|
ResetTimer = 5 * IN_MILLISECONDS;
|
||||||
|
|||||||
@@ -88,9 +88,9 @@ public:
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void EnterEvadeMode() override
|
void EnterEvadeMode(EvadeReason why) override
|
||||||
{
|
{
|
||||||
ScriptedAI::EnterEvadeMode();
|
ScriptedAI::EnterEvadeMode(why);
|
||||||
|
|
||||||
// Evade mini bosses
|
// Evade mini bosses
|
||||||
if (BattlegroundMap* bgMap = me->GetMap()->ToBattlegroundMap())
|
if (BattlegroundMap* bgMap = me->GetMap()->ToBattlegroundMap())
|
||||||
@@ -149,7 +149,7 @@ public:
|
|||||||
{
|
{
|
||||||
if (me->GetDistance2d(me->GetHomePosition().GetPositionX(), me->GetHomePosition().GetPositionY()) > 50)
|
if (me->GetDistance2d(me->GetHomePosition().GetPositionX(), me->GetHomePosition().GetPositionY()) > 50)
|
||||||
{
|
{
|
||||||
EnterEvadeMode();
|
ScriptedAI::EnterEvadeMode();
|
||||||
Talk(YELL_EVADE);
|
Talk(YELL_EVADE);
|
||||||
}
|
}
|
||||||
ResetTimer = 5 * IN_MILLISECONDS;
|
ResetTimer = 5 * IN_MILLISECONDS;
|
||||||
|
|||||||
+1
-1
@@ -225,7 +225,7 @@ public:
|
|||||||
me->GetMotionMaster()->MoveFollow(summoner, 0.f, 0.f);
|
me->GetMotionMaster()->MoveFollow(summoner, 0.f, 0.f);
|
||||||
}
|
}
|
||||||
|
|
||||||
void EnterEvadeMode() override
|
void EnterEvadeMode(EvadeReason /*why*/) override
|
||||||
{
|
{
|
||||||
if (Creature* flamelasher = ObjectAccessor::GetCreature(*me, _flamelasherGUID))
|
if (Creature* flamelasher = ObjectAccessor::GetCreature(*me, _flamelasherGUID))
|
||||||
{
|
{
|
||||||
|
|||||||
+1
-1
@@ -200,7 +200,7 @@ public:
|
|||||||
_events.ScheduleEvent(EVENT_SPELL_SUMMON_VOIDWALKERS, 1000);
|
_events.ScheduleEvent(EVENT_SPELL_SUMMON_VOIDWALKERS, 1000);
|
||||||
}
|
}
|
||||||
|
|
||||||
void EnterEvadeMode() override
|
void EnterEvadeMode(EvadeReason /*why*/) override
|
||||||
{
|
{
|
||||||
me->RemoveAllAuras();
|
me->RemoveAllAuras();
|
||||||
me->DeleteThreatList();
|
me->DeleteThreatList();
|
||||||
|
|||||||
@@ -76,10 +76,10 @@ public:
|
|||||||
events.ScheduleEvent(EVENT_KNOCK_AWAY, urand(12000, 18000));
|
events.ScheduleEvent(EVENT_KNOCK_AWAY, urand(12000, 18000));
|
||||||
}
|
}
|
||||||
|
|
||||||
void EnterEvadeMode() override
|
void EnterEvadeMode(EvadeReason why) override
|
||||||
{
|
{
|
||||||
instance->SetBossState(DATA_WARCHIEF_REND_BLACKHAND, FAIL);
|
instance->SetBossState(DATA_WARCHIEF_REND_BLACKHAND, FAIL);
|
||||||
BossAI::EnterEvadeMode();
|
BossAI::EnterEvadeMode(why);
|
||||||
}
|
}
|
||||||
|
|
||||||
void IsSummonedBy(Unit* /*summoner*/) override
|
void IsSummonedBy(Unit* /*summoner*/) override
|
||||||
|
|||||||
+2
-2
@@ -164,11 +164,11 @@ public:
|
|||||||
events.ScheduleEvent(EVENT_MORTAL_STRIKE, urand(17000, 19000));
|
events.ScheduleEvent(EVENT_MORTAL_STRIKE, urand(17000, 19000));
|
||||||
}
|
}
|
||||||
|
|
||||||
void EnterEvadeMode() override
|
void EnterEvadeMode(EvadeReason why) override
|
||||||
{
|
{
|
||||||
instance->SetBossState(DATA_WARCHIEF_REND_BLACKHAND, FAIL);
|
instance->SetBossState(DATA_WARCHIEF_REND_BLACKHAND, FAIL);
|
||||||
instance->SetBossState(DATA_GYTH, FAIL);
|
instance->SetBossState(DATA_GYTH, FAIL);
|
||||||
BossAI::EnterEvadeMode();
|
BossAI::EnterEvadeMode(why);
|
||||||
me->DespawnOrUnsummon();
|
me->DespawnOrUnsummon();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+4
-4
@@ -63,10 +63,10 @@ MinionData const minionData[] =
|
|||||||
|
|
||||||
DoorData const doorData[] =
|
DoorData const doorData[] =
|
||||||
{
|
{
|
||||||
{ GO_GYTH_EXIT_DOOR, DATA_WARCHIEF_REND_BLACKHAND, DOOR_TYPE_PASSAGE, BOUNDARY_NONE },
|
{ GO_GYTH_EXIT_DOOR, DATA_WARCHIEF_REND_BLACKHAND, DOOR_TYPE_PASSAGE },
|
||||||
{ GO_DRAKKISATH_DOOR_1, DATA_GENERAL_DRAKKISATH, DOOR_TYPE_PASSAGE, BOUNDARY_NONE },
|
{ GO_DRAKKISATH_DOOR_1, DATA_GENERAL_DRAKKISATH, DOOR_TYPE_PASSAGE },
|
||||||
{ GO_DRAKKISATH_DOOR_2, DATA_GENERAL_DRAKKISATH, DOOR_TYPE_PASSAGE, BOUNDARY_NONE },
|
{ GO_DRAKKISATH_DOOR_2, DATA_GENERAL_DRAKKISATH, DOOR_TYPE_PASSAGE },
|
||||||
{ 0, 0, DOOR_TYPE_ROOM, BOUNDARY_NONE } // END
|
{ 0, 0, DOOR_TYPE_ROOM, } // END
|
||||||
};
|
};
|
||||||
|
|
||||||
class instance_blackrock_spire : public InstanceMapScript
|
class instance_blackrock_spire : public InstanceMapScript
|
||||||
|
|||||||
+10
-10
@@ -31,16 +31,16 @@
|
|||||||
|
|
||||||
DoorData const doorData[] =
|
DoorData const doorData[] =
|
||||||
{
|
{
|
||||||
{ GO_PORTCULLIS_RAZORGORE, DATA_RAZORGORE_THE_UNTAMED, DOOR_TYPE_PASSAGE, BOUNDARY_NONE}, // ID 175946 || GUID 7230
|
{ GO_PORTCULLIS_RAZORGORE, DATA_RAZORGORE_THE_UNTAMED, DOOR_TYPE_PASSAGE }, // ID 175946 || GUID 7230
|
||||||
{ GO_PORTCULLIS_RAZORGORE_ROOM, DATA_RAZORGORE_THE_UNTAMED, DOOR_TYPE_ROOM, BOUNDARY_NONE}, // ID 176964 || GUID 75158
|
{ GO_PORTCULLIS_RAZORGORE_ROOM, DATA_RAZORGORE_THE_UNTAMED, DOOR_TYPE_ROOM, }, // ID 176964 || GUID 75158
|
||||||
{ GO_PORTCULLIS_VAELASTRASZ, DATA_VAELASTRAZ_THE_CORRUPT, DOOR_TYPE_PASSAGE, BOUNDARY_NONE}, // ID 175185 || GUID 7229
|
{ GO_PORTCULLIS_VAELASTRASZ, DATA_VAELASTRAZ_THE_CORRUPT, DOOR_TYPE_PASSAGE }, // ID 175185 || GUID 7229
|
||||||
{ GO_PORTCULLIS_BROODLORD, DATA_BROODLORD_LASHLAYER, DOOR_TYPE_PASSAGE, BOUNDARY_NONE}, // ID 179365 || GUID 75159
|
{ GO_PORTCULLIS_BROODLORD, DATA_BROODLORD_LASHLAYER, DOOR_TYPE_PASSAGE }, // ID 179365 || GUID 75159
|
||||||
{ GO_PORTCULLIS_THREEDRAGONS, DATA_FIREMAW, DOOR_TYPE_PASSAGE, BOUNDARY_NONE}, // ID 179115 || GUID 75165
|
{ GO_PORTCULLIS_THREEDRAGONS, DATA_FIREMAW, DOOR_TYPE_PASSAGE }, // ID 179115 || GUID 75165
|
||||||
{ GO_PORTCULLIS_THREEDRAGONS, DATA_EBONROC, DOOR_TYPE_PASSAGE, BOUNDARY_NONE}, // ID 179115 || GUID 75165
|
{ GO_PORTCULLIS_THREEDRAGONS, DATA_EBONROC, DOOR_TYPE_PASSAGE }, // ID 179115 || GUID 75165
|
||||||
{ GO_PORTCULLIS_THREEDRAGONS, DATA_FLAMEGOR, DOOR_TYPE_PASSAGE, BOUNDARY_NONE}, // ID 179115 || GUID 75165
|
{ GO_PORTCULLIS_THREEDRAGONS, DATA_FLAMEGOR, DOOR_TYPE_PASSAGE }, // ID 179115 || GUID 75165
|
||||||
{ GO_PORTCULLIS_CHROMAGGUS, DATA_CHROMAGGUS, DOOR_TYPE_PASSAGE, BOUNDARY_NONE}, // ID 179116 || GUID 75161
|
{ GO_PORTCULLIS_CHROMAGGUS, DATA_CHROMAGGUS, DOOR_TYPE_PASSAGE }, // ID 179116 || GUID 75161
|
||||||
{ GO_PORTCULLIS_NEFARIAN, DATA_NEFARIAN, DOOR_TYPE_ROOM, BOUNDARY_NONE}, // ID 179117 || GUID 75164
|
{ GO_PORTCULLIS_NEFARIAN, DATA_NEFARIAN, DOOR_TYPE_ROOM }, // ID 179117 || GUID 75164
|
||||||
{ 0, 0, DOOR_TYPE_ROOM, BOUNDARY_NONE} // END
|
{ 0, 0, DOOR_TYPE_ROOM } // END
|
||||||
};
|
};
|
||||||
|
|
||||||
ObjectData const creatureData[] =
|
ObjectData const creatureData[] =
|
||||||
|
|||||||
@@ -232,7 +232,7 @@ public:
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void EnterEvadeMode() override
|
void EnterEvadeMode(EvadeReason why) override
|
||||||
{
|
{
|
||||||
if (!me->getThreatMgr().getThreatList().empty())
|
if (!me->getThreatMgr().getThreatList().empty())
|
||||||
{
|
{
|
||||||
@@ -245,7 +245,7 @@ public:
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
BossAI::EnterEvadeMode();
|
BossAI::EnterEvadeMode(why);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -185,7 +185,6 @@ public:
|
|||||||
|
|
||||||
if (me->IsVisible())
|
if (me->IsVisible())
|
||||||
DoMeleeAttackIfReady();
|
DoMeleeAttackIfReady();
|
||||||
EnterEvadeIfOutOfCombatArea();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
bool CheckEvadeIfOutOfCombatArea() const override
|
bool CheckEvadeIfOutOfCombatArea() const override
|
||||||
|
|||||||
@@ -194,7 +194,7 @@ public:
|
|||||||
case EVENT_CHECK_DIST:
|
case EVENT_CHECK_DIST:
|
||||||
if (me->GetDistance(me->GetHomePosition()) > 75.0f)
|
if (me->GetDistance(me->GetHomePosition()) > 75.0f)
|
||||||
{
|
{
|
||||||
EnterEvadeMode();
|
EnterEvadeMode(EVADE_REASON_OTHER);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
events.ScheduleEvent(EVENT_CHECK_DIST, 5000);
|
events.ScheduleEvent(EVENT_CHECK_DIST, 5000);
|
||||||
@@ -325,7 +325,7 @@ struct boss_priestess_lackey_commonAI : public ScriptedAI
|
|||||||
summons.Summon(summon);
|
summons.Summon(summon);
|
||||||
}
|
}
|
||||||
|
|
||||||
void EnterEvadeMode() override
|
void EnterEvadeMode(EvadeReason why) override
|
||||||
{
|
{
|
||||||
if (Creature* delrissa = ObjectAccessor::GetCreature(*me, instance->GetGuidData(NPC_DELRISSA)))
|
if (Creature* delrissa = ObjectAccessor::GetCreature(*me, instance->GetGuidData(NPC_DELRISSA)))
|
||||||
if (!delrissa->IsAlive())
|
if (!delrissa->IsAlive())
|
||||||
@@ -333,7 +333,7 @@ struct boss_priestess_lackey_commonAI : public ScriptedAI
|
|||||||
delrissa->Respawn();
|
delrissa->Respawn();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
ScriptedAI::EnterEvadeMode();
|
ScriptedAI::EnterEvadeMode(why);
|
||||||
}
|
}
|
||||||
|
|
||||||
void EnterCombat(Unit* who) override
|
void EnterCombat(Unit* who) override
|
||||||
|
|||||||
@@ -240,7 +240,7 @@ public:
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void EnterEvadeMode() override
|
void EnterEvadeMode(EvadeReason /*why*/) override
|
||||||
{
|
{
|
||||||
me->DeleteThreatList();
|
me->DeleteThreatList();
|
||||||
me->CombatStop(false);
|
me->CombatStop(false);
|
||||||
|
|||||||
@@ -100,7 +100,7 @@ public:
|
|||||||
instance->SetData(DATA_KIRTONOS_THE_HERALD, DONE);
|
instance->SetData(DATA_KIRTONOS_THE_HERALD, DONE);
|
||||||
}
|
}
|
||||||
|
|
||||||
void EnterEvadeMode() override
|
void EnterEvadeMode(EvadeReason /*why*/) override
|
||||||
{
|
{
|
||||||
instance->SetData(DATA_KIRTONOS_THE_HERALD, FAIL);
|
instance->SetData(DATA_KIRTONOS_THE_HERALD, FAIL);
|
||||||
me->DespawnOrUnsummon(1);
|
me->DespawnOrUnsummon(1);
|
||||||
|
|||||||
@@ -111,15 +111,15 @@ public:
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void EnterEvadeMode() override
|
void EnterEvadeMode(EvadeReason why) override
|
||||||
{
|
{
|
||||||
BossAI::EnterEvadeMode();
|
BossAI::EnterEvadeMode(why);
|
||||||
if (Creature* alythess = ObjectAccessor::GetCreature(*me, instance->GetGuidData(NPC_GRAND_WARLOCK_ALYTHESS)))
|
if (Creature* alythess = ObjectAccessor::GetCreature(*me, instance->GetGuidData(NPC_GRAND_WARLOCK_ALYTHESS)))
|
||||||
{
|
{
|
||||||
if (!alythess->IsAlive())
|
if (!alythess->IsAlive())
|
||||||
alythess->Respawn(true);
|
alythess->Respawn(true);
|
||||||
else if (!alythess->IsInEvadeMode())
|
else if (!alythess->IsInEvadeMode())
|
||||||
alythess->AI()->EnterEvadeMode();
|
alythess->AI()->EnterEvadeMode(why);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -259,15 +259,15 @@ public:
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void EnterEvadeMode() override
|
void EnterEvadeMode(EvadeReason why) override
|
||||||
{
|
{
|
||||||
BossAI::EnterEvadeMode();
|
BossAI::EnterEvadeMode(why);
|
||||||
if (Creature* scorlash = ObjectAccessor::GetCreature(*me, instance->GetGuidData(NPC_LADY_SACROLASH)))
|
if (Creature* scorlash = ObjectAccessor::GetCreature(*me, instance->GetGuidData(NPC_LADY_SACROLASH)))
|
||||||
{
|
{
|
||||||
if (!scorlash->IsAlive())
|
if (!scorlash->IsAlive())
|
||||||
scorlash->Respawn(true);
|
scorlash->Respawn(true);
|
||||||
else if (!scorlash->IsInEvadeMode())
|
else if (!scorlash->IsInEvadeMode())
|
||||||
scorlash->AI()->EnterEvadeMode();
|
scorlash->AI()->EnterEvadeMode(why);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -308,11 +308,11 @@ public:
|
|||||||
events.Reset();
|
events.Reset();
|
||||||
}
|
}
|
||||||
|
|
||||||
void EnterEvadeMode() override
|
void EnterEvadeMode(EvadeReason why) override
|
||||||
{
|
{
|
||||||
if (me->GetReactState() == REACT_PASSIVE)
|
if (me->GetReactState() == REACT_PASSIVE)
|
||||||
return;
|
return;
|
||||||
ScriptedAI::EnterEvadeMode();
|
ScriptedAI::EnterEvadeMode(why);
|
||||||
}
|
}
|
||||||
|
|
||||||
void AttackStart(Unit* who) override
|
void AttackStart(Unit* who) override
|
||||||
|
|||||||
@@ -176,12 +176,12 @@ public:
|
|||||||
me->SetReactState(REACT_PASSIVE);
|
me->SetReactState(REACT_PASSIVE);
|
||||||
}
|
}
|
||||||
|
|
||||||
void EnterEvadeMode() override
|
void EnterEvadeMode(EvadeReason why) override
|
||||||
{
|
{
|
||||||
if (InstanceScript* instance = me->GetInstanceScript())
|
if (InstanceScript* instance = me->GetInstanceScript())
|
||||||
if (Creature* muru = ObjectAccessor::GetCreature(*me, instance->GetGuidData(NPC_MURU)))
|
if (Creature* muru = ObjectAccessor::GetCreature(*me, instance->GetGuidData(NPC_MURU)))
|
||||||
if (!muru->IsInEvadeMode())
|
if (!muru->IsInEvadeMode())
|
||||||
muru->AI()->EnterEvadeMode();
|
muru->AI()->EnterEvadeMode(why);
|
||||||
|
|
||||||
me->DespawnOrUnsummon();
|
me->DespawnOrUnsummon();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -22,13 +22,13 @@
|
|||||||
|
|
||||||
DoorData const doorData[] =
|
DoorData const doorData[] =
|
||||||
{
|
{
|
||||||
{ GO_FIRE_BARRIER, DATA_FELMYST_DOORS, DOOR_TYPE_PASSAGE, BOUNDARY_NONE },
|
{ GO_FIRE_BARRIER, DATA_FELMYST_DOORS, DOOR_TYPE_PASSAGE },
|
||||||
{ GO_MURUS_GATE_1, DATA_MURU, DOOR_TYPE_ROOM, BOUNDARY_NONE },
|
{ GO_MURUS_GATE_1, DATA_MURU, DOOR_TYPE_ROOM },
|
||||||
{ GO_MURUS_GATE_2, DATA_MURU, DOOR_TYPE_PASSAGE, BOUNDARY_NONE },
|
{ GO_MURUS_GATE_2, DATA_MURU, DOOR_TYPE_PASSAGE },
|
||||||
{ GO_BOSS_COLLISION_1, DATA_KALECGOS, DOOR_TYPE_ROOM, BOUNDARY_NONE },
|
{ GO_BOSS_COLLISION_1, DATA_KALECGOS, DOOR_TYPE_ROOM },
|
||||||
{ GO_BOSS_COLLISION_2, DATA_KALECGOS, DOOR_TYPE_ROOM, BOUNDARY_NONE },
|
{ GO_BOSS_COLLISION_2, DATA_KALECGOS, DOOR_TYPE_ROOM },
|
||||||
{ GO_FORCE_FIELD, DATA_KALECGOS, DOOR_TYPE_ROOM, BOUNDARY_NONE },
|
{ GO_FORCE_FIELD, DATA_KALECGOS, DOOR_TYPE_ROOM },
|
||||||
{ 0, 0, DOOR_TYPE_ROOM, BOUNDARY_NONE } // END
|
{ 0, 0, DOOR_TYPE_ROOM } // END
|
||||||
};
|
};
|
||||||
|
|
||||||
class instance_sunwell_plateau : public InstanceMapScript
|
class instance_sunwell_plateau : public InstanceMapScript
|
||||||
|
|||||||
@@ -402,8 +402,6 @@ public:
|
|||||||
else HatcherTimer -= diff;
|
else HatcherTimer -= diff;
|
||||||
}
|
}
|
||||||
|
|
||||||
EnterEvadeIfOutOfCombatArea();
|
|
||||||
|
|
||||||
DoMeleeAttackIfReady();
|
DoMeleeAttackIfReady();
|
||||||
|
|
||||||
if (FireBreathTimer <= diff)
|
if (FireBreathTimer <= diff)
|
||||||
|
|||||||
@@ -150,9 +150,9 @@ public:
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void EnterEvadeMode() override
|
void EnterEvadeMode(EvadeReason why) override
|
||||||
{
|
{
|
||||||
BossAI::EnterEvadeMode();
|
BossAI::EnterEvadeMode(why);
|
||||||
if (GameObject* object = ObjectAccessor::GetGameObject(*me, instance->GetGuidData(GO_GONG_OF_BETHEKK)))
|
if (GameObject* object = ObjectAccessor::GetGameObject(*me, instance->GetGuidData(GO_GONG_OF_BETHEKK)))
|
||||||
object->RemoveGameObjectFlag(GO_FLAG_NOT_SELECTABLE);
|
object->RemoveGameObjectFlag(GO_FLAG_NOT_SELECTABLE);
|
||||||
me->DespawnOrUnsummon(4000);
|
me->DespawnOrUnsummon(4000);
|
||||||
|
|||||||
@@ -28,8 +28,8 @@ EndScriptData */
|
|||||||
|
|
||||||
DoorData const doorData[] =
|
DoorData const doorData[] =
|
||||||
{
|
{
|
||||||
{ GO_FORCEFIELD, DATA_ARLOKK, DOOR_TYPE_ROOM, BOUNDARY_NONE },
|
{ GO_FORCEFIELD, DATA_ARLOKK, DOOR_TYPE_ROOM },
|
||||||
{ 0, 0, DOOR_TYPE_ROOM, BOUNDARY_NONE } // END
|
{ 0, 0, DOOR_TYPE_ROOM } // END
|
||||||
};
|
};
|
||||||
|
|
||||||
class instance_zulgurub : public InstanceMapScript
|
class instance_zulgurub : public InstanceMapScript
|
||||||
|
|||||||
@@ -215,7 +215,7 @@ public:
|
|||||||
{
|
{
|
||||||
damage = 0;
|
damage = 0;
|
||||||
me->setActive(false);
|
me->setActive(false);
|
||||||
EnterEvadeMode();
|
EnterEvadeMode(EVADE_REASON_OTHER);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -243,7 +243,7 @@ public:
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
me->setActive(false);
|
me->setActive(false);
|
||||||
EnterEvadeMode();
|
EnterEvadeMode(EVADE_REASON_OTHER);
|
||||||
return;
|
return;
|
||||||
case EVENT_SUMMON_SOLDIERS:
|
case EVENT_SUMMON_SOLDIERS:
|
||||||
for (uint8 i = 0; i < SUNWELL_DEFENDER_NUM; ++i)
|
for (uint8 i = 0; i < SUNWELL_DEFENDER_NUM; ++i)
|
||||||
@@ -393,7 +393,7 @@ public:
|
|||||||
case EVENT_DISAPPEAR:
|
case EVENT_DISAPPEAR:
|
||||||
me->SetVisible(false);
|
me->SetVisible(false);
|
||||||
me->setActive(false);
|
me->setActive(false);
|
||||||
EnterEvadeMode();
|
EnterEvadeMode(EVADE_REASON_OTHER);
|
||||||
break;
|
break;
|
||||||
case EVENT_SET_FACING:
|
case EVENT_SET_FACING:
|
||||||
me->SetFacingTo(2.45f);
|
me->SetFacingTo(2.45f);
|
||||||
@@ -425,11 +425,11 @@ public:
|
|||||||
events.ScheduleEvent(EVENT_SET_FACING, 0);
|
events.ScheduleEvent(EVENT_SET_FACING, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
void EnterEvadeMode() override
|
void EnterEvadeMode(EvadeReason why) override
|
||||||
{
|
{
|
||||||
if (me->isActiveObject())
|
if (me->isActiveObject())
|
||||||
return;
|
return;
|
||||||
ScriptedAI::EnterEvadeMode();
|
ScriptedAI::EnterEvadeMode(why);
|
||||||
}
|
}
|
||||||
|
|
||||||
void SetData(uint32 type, uint32 id) override
|
void SetData(uint32 type, uint32 id) override
|
||||||
|
|||||||
@@ -155,7 +155,7 @@ public:
|
|||||||
MarzonGUID.Clear();
|
MarzonGUID.Clear();
|
||||||
}
|
}
|
||||||
|
|
||||||
void EnterEvadeMode() override
|
void EnterEvadeMode(EvadeReason /*why*/) override
|
||||||
{
|
{
|
||||||
me->DisappearAndDie();
|
me->DisappearAndDie();
|
||||||
|
|
||||||
@@ -317,7 +317,7 @@ public:
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void EnterEvadeMode() override
|
void EnterEvadeMode(EvadeReason /*why*/) override
|
||||||
{
|
{
|
||||||
me->DisappearAndDie();
|
me->DisappearAndDie();
|
||||||
|
|
||||||
|
|||||||
@@ -1011,7 +1011,7 @@ public:
|
|||||||
|
|
||||||
EventMap _events;
|
EventMap _events;
|
||||||
|
|
||||||
void EnterEvadeMode() override
|
void EnterEvadeMode(EvadeReason /*why*/) override
|
||||||
{
|
{
|
||||||
me->DeleteThreatList();
|
me->DeleteThreatList();
|
||||||
me->CombatStop(true);
|
me->CombatStop(true);
|
||||||
@@ -2353,7 +2353,7 @@ public:
|
|||||||
|
|
||||||
EventMap _events;
|
EventMap _events;
|
||||||
|
|
||||||
void EnterEvadeMode() override
|
void EnterEvadeMode(EvadeReason /*why*/) override
|
||||||
{
|
{
|
||||||
me->RemoveAura(SPELL_HEROIC_VANGUARD);
|
me->RemoveAura(SPELL_HEROIC_VANGUARD);
|
||||||
me->DeleteThreatList();
|
me->DeleteThreatList();
|
||||||
|
|||||||
@@ -660,7 +660,7 @@ struct npc_hallows_end_soh : public ScriptedAI
|
|||||||
me->SetDisableGravity(true);
|
me->SetDisableGravity(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
void EnterEvadeMode() override
|
void EnterEvadeMode(EvadeReason /* why */) override
|
||||||
{
|
{
|
||||||
me->DespawnOrUnsummon(1);
|
me->DespawnOrUnsummon(1);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -406,7 +406,7 @@ void hyjalAI::Reset()
|
|||||||
DoHide = true;
|
DoHide = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
void hyjalAI::EnterEvadeMode()
|
void hyjalAI::EnterEvadeMode(EvadeReason /*why*/)
|
||||||
{
|
{
|
||||||
if (me->GetEntry() != JAINA)
|
if (me->GetEntry() != JAINA)
|
||||||
me->RemoveAllAuras();
|
me->RemoveAllAuras();
|
||||||
|
|||||||
@@ -122,7 +122,7 @@ struct hyjalAI : public npc_escortAI
|
|||||||
|
|
||||||
void Reset() override; // Generically used to reset our variables. Do *not* call in EnterEvadeMode as this may make problems if the raid is still in combat
|
void Reset() override; // Generically used to reset our variables. Do *not* call in EnterEvadeMode as this may make problems if the raid is still in combat
|
||||||
|
|
||||||
void EnterEvadeMode() override; // Send creature back to spawn location and evade.
|
void EnterEvadeMode(EvadeReason /*why*/ = EVADE_REASON_OTHER) override; // Send creature back to spawn location and evade.
|
||||||
|
|
||||||
void EnterCombat(Unit* /*who*/) override; // Used to reset cooldowns for our spells and to inform the raid that we're under attack
|
void EnterCombat(Unit* /*who*/) override; // Used to reset cooldowns for our spells and to inform the raid that we're under attack
|
||||||
|
|
||||||
|
|||||||
@@ -294,7 +294,7 @@ public:
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
bool CheckInRoom()
|
bool CheckInRoom() override
|
||||||
{
|
{
|
||||||
if (me->GetDistance2d(me->GetHomePosition().GetPositionX(), me->GetHomePosition().GetPositionY()) > 95.0f)
|
if (me->GetDistance2d(me->GetHomePosition().GetPositionX(), me->GetHomePosition().GetPositionY()) > 95.0f)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -122,10 +122,10 @@ public:
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void EnterEvadeMode() override
|
void EnterEvadeMode(EvadeReason why) override
|
||||||
{
|
{
|
||||||
me->ClearUnitState(UNIT_STATE_ROOT);
|
me->ClearUnitState(UNIT_STATE_ROOT);
|
||||||
BossAI::EnterEvadeMode();
|
BossAI::EnterEvadeMode(why);
|
||||||
}
|
}
|
||||||
|
|
||||||
void EnterCombat(Unit* attacker) override
|
void EnterCombat(Unit* attacker) override
|
||||||
|
|||||||
@@ -70,9 +70,9 @@ public:
|
|||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
void EnterEvadeMode() override
|
void EnterEvadeMode(EvadeReason why) override
|
||||||
{
|
{
|
||||||
BossAI::EnterEvadeMode();
|
BossAI::EnterEvadeMode(why);
|
||||||
|
|
||||||
for (ObjectGuid const& guid : Eggs)
|
for (ObjectGuid const& guid : Eggs)
|
||||||
if (Creature* egg = me->GetMap()->GetCreature(guid))
|
if (Creature* egg = me->GetMap()->GetCreature(guid))
|
||||||
|
|||||||
@@ -158,11 +158,11 @@ public:
|
|||||||
Talk(SAY_SLAY);
|
Talk(SAY_SLAY);
|
||||||
}
|
}
|
||||||
|
|
||||||
void EnterEvadeMode() override
|
void EnterEvadeMode(EvadeReason why) override
|
||||||
{
|
{
|
||||||
Cleanup();
|
Cleanup();
|
||||||
summons.DespawnAll();
|
summons.DespawnAll();
|
||||||
BossAI::EnterEvadeMode();
|
BossAI::EnterEvadeMode(why);
|
||||||
}
|
}
|
||||||
|
|
||||||
void JustDied(Unit* /*killer*/) override
|
void JustDied(Unit* /*killer*/) override
|
||||||
|
|||||||
@@ -68,9 +68,9 @@ public:
|
|||||||
Talk(SAY_SLAY);
|
Talk(SAY_SLAY);
|
||||||
}
|
}
|
||||||
|
|
||||||
void EnterEvadeMode() override
|
void EnterEvadeMode(EvadeReason why) override
|
||||||
{
|
{
|
||||||
ScriptedAI::EnterEvadeMode();
|
ScriptedAI::EnterEvadeMode(why);
|
||||||
if (me->IsSummon())
|
if (me->IsSummon())
|
||||||
((TempSummon*)me)->UnSummon();
|
((TempSummon*)me)->UnSummon();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -182,10 +182,10 @@ public:
|
|||||||
events.ScheduleEvent(EVENT_POISON_SHOCK, urand(7000, 12000));
|
events.ScheduleEvent(EVENT_POISON_SHOCK, urand(7000, 12000));
|
||||||
}
|
}
|
||||||
|
|
||||||
void EnterEvadeMode() override
|
void EnterEvadeMode(EvadeReason why) override
|
||||||
{
|
{
|
||||||
summons.DespawnAll();
|
summons.DespawnAll();
|
||||||
ScriptedAI::EnterEvadeMode();
|
ScriptedAI::EnterEvadeMode(why);
|
||||||
}
|
}
|
||||||
|
|
||||||
void JustDied(Unit* /*killer*/) override
|
void JustDied(Unit* /*killer*/) override
|
||||||
|
|||||||
@@ -122,11 +122,11 @@ public:
|
|||||||
npc_escortAI::JustDied(killer);
|
npc_escortAI::JustDied(killer);
|
||||||
}
|
}
|
||||||
|
|
||||||
void EnterEvadeMode() override
|
void EnterEvadeMode(EvadeReason why) override
|
||||||
{
|
{
|
||||||
SummonsFollow();
|
SummonsFollow();
|
||||||
ImmuneFlagSet(false, 35);
|
ImmuneFlagSet(false, 35);
|
||||||
npc_escortAI::EnterEvadeMode();
|
npc_escortAI::EnterEvadeMode(why);
|
||||||
}
|
}
|
||||||
|
|
||||||
void CheckPlayer()
|
void CheckPlayer()
|
||||||
|
|||||||
@@ -149,9 +149,9 @@ public:
|
|||||||
_events.ScheduleEvent(EVENT_FINAL_TALK, 5 * IN_MILLISECONDS);
|
_events.ScheduleEvent(EVENT_FINAL_TALK, 5 * IN_MILLISECONDS);
|
||||||
}
|
}
|
||||||
|
|
||||||
void EnterEvadeMode() override
|
void EnterEvadeMode(EvadeReason why) override
|
||||||
{
|
{
|
||||||
_EnterEvadeMode();
|
_EnterEvadeMode(why);
|
||||||
|
|
||||||
if (Player* player = ObjectAccessor::GetPlayer(*me, _playerGUID))
|
if (Player* player = ObjectAccessor::GetPlayer(*me, _playerGUID))
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -356,7 +356,7 @@ public:
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void EnterEvadeMode() override
|
void EnterEvadeMode(EvadeReason why) override
|
||||||
{
|
{
|
||||||
Player* player = ObjectAccessor::GetPlayer(*me, PlayerGUID);
|
Player* player = ObjectAccessor::GetPlayer(*me, PlayerGUID);
|
||||||
if (player && player->IsInCombat() && player->getAttackerForHelper())
|
if (player && player->IsInCombat() && player->getAttackerForHelper())
|
||||||
@@ -364,7 +364,7 @@ public:
|
|||||||
AttackStart(player->getAttackerForHelper());
|
AttackStart(player->getAttackerForHelper());
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
npc_escortAI::EnterEvadeMode();
|
npc_escortAI::EnterEvadeMode(why);
|
||||||
}
|
}
|
||||||
|
|
||||||
void StartEvent(Player* player)
|
void StartEvent(Player* player)
|
||||||
|
|||||||
@@ -306,10 +306,10 @@ public:
|
|||||||
|
|
||||||
void EnterCombat(Unit* /*who*/) override { }
|
void EnterCombat(Unit* /*who*/) override { }
|
||||||
|
|
||||||
void EnterEvadeMode() override
|
void EnterEvadeMode(EvadeReason why) override
|
||||||
{
|
{
|
||||||
CleanUp();
|
CleanUp();
|
||||||
ScriptedAI::EnterEvadeMode();
|
ScriptedAI::EnterEvadeMode(why);
|
||||||
}
|
}
|
||||||
|
|
||||||
void CleanUp()
|
void CleanUp()
|
||||||
@@ -343,7 +343,7 @@ public:
|
|||||||
Player* pWarrior = ObjectAccessor::GetPlayer(*me, PlayerGUID);
|
Player* pWarrior = ObjectAccessor::GetPlayer(*me, PlayerGUID);
|
||||||
if (!pWarrior || me->GetDistance2d(pWarrior) >= 200.0f)
|
if (!pWarrior || me->GetDistance2d(pWarrior) >= 200.0f)
|
||||||
{
|
{
|
||||||
EnterEvadeMode();
|
EnterEvadeMode(EVADE_REASON_OTHER);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -351,7 +351,7 @@ public:
|
|||||||
{
|
{
|
||||||
Talk(SAY_TWIGGY_FLATHEAD_DOWN);
|
Talk(SAY_TWIGGY_FLATHEAD_DOWN);
|
||||||
pWarrior->FailQuest(1719);
|
pWarrior->FailQuest(1719);
|
||||||
EnterEvadeMode();
|
EnterEvadeMode(EVADE_REASON_OTHER);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -435,7 +435,7 @@ public:
|
|||||||
if (!creature || !creature->IsAlive())
|
if (!creature || !creature->IsAlive())
|
||||||
{
|
{
|
||||||
Talk(SAY_TWIGGY_FLATHEAD_OVER);
|
Talk(SAY_TWIGGY_FLATHEAD_OVER);
|
||||||
EnterEvadeMode();
|
EnterEvadeMode(EVADE_REASON_OTHER);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
else // Makes BIG WILL attackable.
|
else // Makes BIG WILL attackable.
|
||||||
|
|||||||
@@ -83,10 +83,10 @@ class boss_anub_arak : public CreatureScript
|
|||||||
|
|
||||||
bool intro;
|
bool intro;
|
||||||
|
|
||||||
void EnterEvadeMode() override
|
void EnterEvadeMode(EvadeReason why) override
|
||||||
{
|
{
|
||||||
me->DisableRotate(false);
|
me->DisableRotate(false);
|
||||||
BossAI::EnterEvadeMode();
|
BossAI::EnterEvadeMode(why);
|
||||||
}
|
}
|
||||||
|
|
||||||
void MoveInLineOfSight(Unit* who) override
|
void MoveInLineOfSight(Unit* who) override
|
||||||
|
|||||||
@@ -195,7 +195,6 @@ public:
|
|||||||
}
|
}
|
||||||
|
|
||||||
DoMeleeAttackIfReady();
|
DoMeleeAttackIfReady();
|
||||||
EnterEvadeIfOutOfCombatArea();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
bool CheckEvadeIfOutOfCombatArea() const override
|
bool CheckEvadeIfOutOfCombatArea() const override
|
||||||
|
|||||||
@@ -21,11 +21,11 @@
|
|||||||
|
|
||||||
DoorData const doorData[] =
|
DoorData const doorData[] =
|
||||||
{
|
{
|
||||||
{ GO_KRIKTHIR_DOORS, DATA_KRIKTHIR_THE_GATEWATCHER_EVENT, DOOR_TYPE_PASSAGE, BOUNDARY_NONE },
|
{ GO_KRIKTHIR_DOORS, DATA_KRIKTHIR_THE_GATEWATCHER_EVENT, DOOR_TYPE_PASSAGE },
|
||||||
{ GO_ANUBARAK_DOORS1, DATA_ANUBARAK_EVENT, DOOR_TYPE_ROOM, BOUNDARY_NONE },
|
{ GO_ANUBARAK_DOORS1, DATA_ANUBARAK_EVENT, DOOR_TYPE_ROOM },
|
||||||
{ GO_ANUBARAK_DOORS2, DATA_ANUBARAK_EVENT, DOOR_TYPE_ROOM, BOUNDARY_NONE },
|
{ GO_ANUBARAK_DOORS2, DATA_ANUBARAK_EVENT, DOOR_TYPE_ROOM },
|
||||||
{ GO_ANUBARAK_DOORS3, DATA_ANUBARAK_EVENT, DOOR_TYPE_ROOM, BOUNDARY_NONE },
|
{ GO_ANUBARAK_DOORS3, DATA_ANUBARAK_EVENT, DOOR_TYPE_ROOM },
|
||||||
{ 0, 0, DOOR_TYPE_ROOM, BOUNDARY_NONE }
|
{ 0, 0, DOOR_TYPE_ROOM }
|
||||||
};
|
};
|
||||||
|
|
||||||
ObjectData const creatureData[] =
|
ObjectData const creatureData[] =
|
||||||
|
|||||||
@@ -140,10 +140,10 @@ struct boss_amanitar : public BossAI
|
|||||||
BossAI::SummonedCreatureDies(summon, killer);
|
BossAI::SummonedCreatureDies(summon, killer);
|
||||||
}
|
}
|
||||||
|
|
||||||
void EnterEvadeMode() override
|
void EnterEvadeMode(EvadeReason why) override
|
||||||
{
|
{
|
||||||
instance->DoRemoveAurasDueToSpellOnPlayers(SPELL_MINI);
|
instance->DoRemoveAurasDueToSpellOnPlayers(SPELL_MINI);
|
||||||
BossAI::EnterEvadeMode();
|
BossAI::EnterEvadeMode(why);
|
||||||
}
|
}
|
||||||
|
|
||||||
void ExecuteEvent(uint32 eventId) override
|
void ExecuteEvent(uint32 eventId) override
|
||||||
@@ -245,7 +245,7 @@ struct npc_amanitar_mushrooms : public ScriptedAI
|
|||||||
// Disabled events
|
// Disabled events
|
||||||
void EnterCombat(Unit* /*who*/) override {}
|
void EnterCombat(Unit* /*who*/) override {}
|
||||||
void AttackStart(Unit* /*victim*/) override {}
|
void AttackStart(Unit* /*victim*/) override {}
|
||||||
void EnterEvadeMode() override {}
|
void EnterEvadeMode(EvadeReason /*why*/) override {}
|
||||||
|
|
||||||
void Reset() override
|
void Reset() override
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -592,11 +592,11 @@ struct npc_twilight_volunteer : public ScriptedAI
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void EnterEvadeMode() override
|
void EnterEvadeMode(EvadeReason why) override
|
||||||
{
|
{
|
||||||
if (!isSacraficeTarget)
|
if (!isSacraficeTarget)
|
||||||
{
|
{
|
||||||
ScriptedAI::EnterEvadeMode();
|
ScriptedAI::EnterEvadeMode(why);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+1
-2
@@ -177,7 +177,6 @@ public:
|
|||||||
}
|
}
|
||||||
|
|
||||||
DoMeleeAttackIfReady();
|
DoMeleeAttackIfReady();
|
||||||
EnterEvadeIfOutOfCombatArea();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
bool CheckEvadeIfOutOfCombatArea() const override
|
bool CheckEvadeIfOutOfCombatArea() const override
|
||||||
@@ -218,7 +217,7 @@ public:
|
|||||||
_events.ScheduleEvent(EVENT_LAVA_GOUT, 5000);
|
_events.ScheduleEvent(EVENT_LAVA_GOUT, 5000);
|
||||||
}
|
}
|
||||||
|
|
||||||
void EnterEvadeMode() override
|
void EnterEvadeMode(EvadeReason /*why*/) override
|
||||||
{
|
{
|
||||||
// Prevent EvadeMode
|
// Prevent EvadeMode
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -272,12 +272,12 @@ public:
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
void EnterEvadeMode() override
|
void EnterEvadeMode(EvadeReason why) override
|
||||||
{
|
{
|
||||||
if (IsAnyPlayerValid())
|
if (IsAnyPlayerValid())
|
||||||
return;
|
return;
|
||||||
|
|
||||||
BossAI::EnterEvadeMode();
|
BossAI::EnterEvadeMode(why);
|
||||||
}
|
}
|
||||||
|
|
||||||
void AttackStart(Unit* who) override
|
void AttackStart(Unit* who) override
|
||||||
@@ -473,7 +473,7 @@ public:
|
|||||||
me->SetInCombatWithZone();
|
me->SetInCombatWithZone();
|
||||||
}
|
}
|
||||||
|
|
||||||
void EnterEvadeMode() override
|
void EnterEvadeMode(EvadeReason /*why*/) override
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+17
-10
@@ -22,18 +22,24 @@
|
|||||||
#include "WorldPacket.h"
|
#include "WorldPacket.h"
|
||||||
#include "ruby_sanctum.h"
|
#include "ruby_sanctum.h"
|
||||||
|
|
||||||
|
BossBoundaryData const boundaries =
|
||||||
|
{
|
||||||
|
{ DATA_GENERAL_ZARITHRIAN, new EllipseBoundary(Position(3013.409f, 529.492f), 45.0, 100.0) },
|
||||||
|
{ DATA_HALION, new CircleBoundary(Position(3156.037f, 533.2656f), 48.5) }
|
||||||
|
};
|
||||||
|
|
||||||
DoorData const doorData[] =
|
DoorData const doorData[] =
|
||||||
{
|
{
|
||||||
{GO_FIRE_FIELD, DATA_BALTHARUS_THE_WARBORN, DOOR_TYPE_PASSAGE, BOUNDARY_E },
|
{GO_FIRE_FIELD, DATA_BALTHARUS_THE_WARBORN, DOOR_TYPE_PASSAGE },
|
||||||
{GO_FLAME_WALLS, DATA_SAVIANA_RAGEFIRE, DOOR_TYPE_PASSAGE, BOUNDARY_NONE},
|
{GO_FLAME_WALLS, DATA_SAVIANA_RAGEFIRE, DOOR_TYPE_PASSAGE },
|
||||||
{GO_FLAME_WALLS, DATA_BALTHARUS_THE_WARBORN, DOOR_TYPE_PASSAGE, BOUNDARY_NONE},
|
{GO_FLAME_WALLS, DATA_BALTHARUS_THE_WARBORN, DOOR_TYPE_PASSAGE },
|
||||||
{GO_FLAME_WALLS, DATA_GENERAL_ZARITHRIAN, DOOR_TYPE_ROOM, BOUNDARY_NONE},
|
{GO_FLAME_WALLS, DATA_GENERAL_ZARITHRIAN, DOOR_TYPE_ROOM, },
|
||||||
{GO_BURNING_TREE_4, DATA_HALION_INTRO1, DOOR_TYPE_PASSAGE, BOUNDARY_NONE},
|
{GO_BURNING_TREE_4, DATA_HALION_INTRO1, DOOR_TYPE_PASSAGE },
|
||||||
{GO_BURNING_TREE_3, DATA_HALION_INTRO1, DOOR_TYPE_PASSAGE, BOUNDARY_NONE},
|
{GO_BURNING_TREE_3, DATA_HALION_INTRO1, DOOR_TYPE_PASSAGE },
|
||||||
{GO_BURNING_TREE_2, DATA_HALION_INTRO2, DOOR_TYPE_PASSAGE, BOUNDARY_NONE},
|
{GO_BURNING_TREE_2, DATA_HALION_INTRO2, DOOR_TYPE_PASSAGE },
|
||||||
{GO_BURNING_TREE_1, DATA_HALION_INTRO2, DOOR_TYPE_PASSAGE, BOUNDARY_NONE},
|
{GO_BURNING_TREE_1, DATA_HALION_INTRO2, DOOR_TYPE_PASSAGE },
|
||||||
{GO_TWILIGHT_FLAME_RING, DATA_HALION, DOOR_TYPE_ROOM, BOUNDARY_NONE},
|
{GO_TWILIGHT_FLAME_RING, DATA_HALION, DOOR_TYPE_ROOM },
|
||||||
{0, 0, DOOR_TYPE_ROOM, BOUNDARY_NONE},
|
{0, 0, DOOR_TYPE_ROOM },
|
||||||
};
|
};
|
||||||
|
|
||||||
class instance_ruby_sanctum : public InstanceMapScript
|
class instance_ruby_sanctum : public InstanceMapScript
|
||||||
@@ -46,6 +52,7 @@ public:
|
|||||||
instance_ruby_sanctum_InstanceMapScript(InstanceMap* map) : InstanceScript(map)
|
instance_ruby_sanctum_InstanceMapScript(InstanceMap* map) : InstanceScript(map)
|
||||||
{
|
{
|
||||||
SetBossNumber(MAX_ENCOUNTERS);
|
SetBossNumber(MAX_ENCOUNTERS);
|
||||||
|
LoadBossBoundaries(boundaries);
|
||||||
LoadDoorData(doorData);
|
LoadDoorData(doorData);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+3
-3
@@ -128,10 +128,10 @@ public:
|
|||||||
//me->SetLootMode(0); // [LOOT]
|
//me->SetLootMode(0); // [LOOT]
|
||||||
}
|
}
|
||||||
|
|
||||||
void EnterEvadeMode() override
|
void EnterEvadeMode(EvadeReason why) override
|
||||||
{
|
{
|
||||||
me->DespawnOrUnsummon(1);
|
me->DespawnOrUnsummon(1);
|
||||||
ScriptedAI::EnterEvadeMode();
|
ScriptedAI::EnterEvadeMode(why);
|
||||||
}
|
}
|
||||||
|
|
||||||
void DamageTaken(Unit*, uint32& damage, DamageEffectType, SpellSchoolMask) override
|
void DamageTaken(Unit*, uint32& damage, DamageEffectType, SpellSchoolMask) override
|
||||||
@@ -225,7 +225,7 @@ public:
|
|||||||
events.ScheduleEvent(EVENT_SPELL_MARKED_DEATH, 1000);
|
events.ScheduleEvent(EVENT_SPELL_MARKED_DEATH, 1000);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
EnterEvadeMode();
|
EnterEvadeMode(EVADE_REASON_OTHER);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|||||||
+1
-1
@@ -591,7 +591,7 @@ public:
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void EnterEvadeMode() override {}
|
void EnterEvadeMode(EvadeReason /*why*/) override {}
|
||||||
|
|
||||||
void WaypointReached(uint32 i) override
|
void WaypointReached(uint32 i) override
|
||||||
{
|
{
|
||||||
|
|||||||
+1
-1
@@ -389,7 +389,7 @@ public:
|
|||||||
Talk(SAY_KILL_PLAYER);
|
Talk(SAY_KILL_PLAYER);
|
||||||
}
|
}
|
||||||
|
|
||||||
void EnterEvadeMode() override
|
void EnterEvadeMode(EvadeReason /*why*/) override
|
||||||
{
|
{
|
||||||
events.Reset();
|
events.Reset();
|
||||||
summons.DespawnAll();
|
summons.DespawnAll();
|
||||||
|
|||||||
+3
-3
@@ -134,7 +134,7 @@ struct boss_faction_championsAI : public ScriptedAI
|
|||||||
pInstance->SetData(TYPE_FACTION_CHAMPIONS_PLAYER_DIED, 1);
|
pInstance->SetData(TYPE_FACTION_CHAMPIONS_PLAYER_DIED, 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
void EnterEvadeMode() override
|
void EnterEvadeMode(EvadeReason /* why */) override
|
||||||
{
|
{
|
||||||
if( pInstance )
|
if( pInstance )
|
||||||
pInstance->SetData(TYPE_FAILED, 0);
|
pInstance->SetData(TYPE_FAILED, 0);
|
||||||
@@ -2368,7 +2368,7 @@ public:
|
|||||||
DoMeleeAttackIfReady();
|
DoMeleeAttackIfReady();
|
||||||
}
|
}
|
||||||
|
|
||||||
void EnterEvadeMode() override
|
void EnterEvadeMode(EvadeReason /* why */) override
|
||||||
{
|
{
|
||||||
me->DespawnOrUnsummon();
|
me->DespawnOrUnsummon();
|
||||||
}
|
}
|
||||||
@@ -2435,7 +2435,7 @@ public:
|
|||||||
DoMeleeAttackIfReady();
|
DoMeleeAttackIfReady();
|
||||||
}
|
}
|
||||||
|
|
||||||
void EnterEvadeMode() override
|
void EnterEvadeMode(EvadeReason /* why */) override
|
||||||
{
|
{
|
||||||
me->DespawnOrUnsummon();
|
me->DespawnOrUnsummon();
|
||||||
}
|
}
|
||||||
|
|||||||
+3
-3
@@ -279,7 +279,7 @@ public:
|
|||||||
summons.Summon(summon);
|
summons.Summon(summon);
|
||||||
}
|
}
|
||||||
|
|
||||||
void EnterEvadeMode() override
|
void EnterEvadeMode(EvadeReason /*why*/) override
|
||||||
{
|
{
|
||||||
events.Reset();
|
events.Reset();
|
||||||
summons.DespawnAll();
|
summons.DespawnAll();
|
||||||
@@ -355,7 +355,7 @@ public:
|
|||||||
me->DespawnOrUnsummon(10000);
|
me->DespawnOrUnsummon(10000);
|
||||||
}
|
}
|
||||||
|
|
||||||
void EnterEvadeMode() override
|
void EnterEvadeMode(EvadeReason /*why*/) override
|
||||||
{
|
{
|
||||||
me->DespawnOrUnsummon();
|
me->DespawnOrUnsummon();
|
||||||
}
|
}
|
||||||
@@ -436,7 +436,7 @@ public:
|
|||||||
me->DespawnOrUnsummon(10000);
|
me->DespawnOrUnsummon(10000);
|
||||||
}
|
}
|
||||||
|
|
||||||
void EnterEvadeMode() override
|
void EnterEvadeMode(EvadeReason /*why*/) override
|
||||||
{
|
{
|
||||||
me->DespawnOrUnsummon();
|
me->DespawnOrUnsummon();
|
||||||
}
|
}
|
||||||
|
|||||||
+3
-3
@@ -402,7 +402,7 @@ public:
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void EnterEvadeMode() override
|
void EnterEvadeMode(EvadeReason /*why*/) override
|
||||||
{
|
{
|
||||||
events.Reset();
|
events.Reset();
|
||||||
summons.DespawnAll();
|
summons.DespawnAll();
|
||||||
@@ -667,7 +667,7 @@ struct boss_jormungarAI : public ScriptedAI
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void EnterEvadeMode() override
|
void EnterEvadeMode(EvadeReason /*why*/) override
|
||||||
{
|
{
|
||||||
events.Reset();
|
events.Reset();
|
||||||
me->SetUnitFlag(UNIT_FLAG_NON_ATTACKABLE);
|
me->SetUnitFlag(UNIT_FLAG_NON_ATTACKABLE);
|
||||||
@@ -1000,7 +1000,7 @@ public:
|
|||||||
DoMeleeAttackIfReady();
|
DoMeleeAttackIfReady();
|
||||||
}
|
}
|
||||||
|
|
||||||
void EnterEvadeMode() override
|
void EnterEvadeMode(EvadeReason /*why*/) override
|
||||||
{
|
{
|
||||||
events.Reset();
|
events.Reset();
|
||||||
me->SetUnitFlag(UNIT_FLAG_NON_ATTACKABLE);
|
me->SetUnitFlag(UNIT_FLAG_NON_ATTACKABLE);
|
||||||
|
|||||||
+1
-1
@@ -509,7 +509,7 @@ struct boss_twin_valkyrAI : public ScriptedAI
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void EnterEvadeMode() override
|
void EnterEvadeMode(EvadeReason /* why */) override
|
||||||
{
|
{
|
||||||
if( pInstance )
|
if( pInstance )
|
||||||
pInstance->SetData(TYPE_FAILED, 0);
|
pInstance->SetData(TYPE_FAILED, 0);
|
||||||
|
|||||||
@@ -244,8 +244,6 @@ public:
|
|||||||
events.ScheduleEvent(EVENT_SPELL_SUMMON_MINIONS, 500);
|
events.ScheduleEvent(EVENT_SPELL_SUMMON_MINIONS, 500);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
EnterEvadeIfOutOfCombatArea();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
bool CheckEvadeIfOutOfCombatArea() const override
|
bool CheckEvadeIfOutOfCombatArea() const override
|
||||||
|
|||||||
@@ -152,7 +152,6 @@ public:
|
|||||||
}
|
}
|
||||||
|
|
||||||
DoMeleeAttackIfReady();
|
DoMeleeAttackIfReady();
|
||||||
EnterEvadeIfOutOfCombatArea();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
bool CheckEvadeIfOutOfCombatArea() const override
|
bool CheckEvadeIfOutOfCombatArea() const override
|
||||||
|
|||||||
@@ -21,11 +21,11 @@
|
|||||||
|
|
||||||
DoorData const doorData[] =
|
DoorData const doorData[] =
|
||||||
{
|
{
|
||||||
{ GO_NOVOS_CRYSTAL_1, DATA_NOVOS_CRYSTALS, DOOR_TYPE_ROOM, BOUNDARY_NONE },
|
{ GO_NOVOS_CRYSTAL_1, DATA_NOVOS_CRYSTALS, DOOR_TYPE_ROOM },
|
||||||
{ GO_NOVOS_CRYSTAL_2, DATA_NOVOS_CRYSTALS, DOOR_TYPE_ROOM, BOUNDARY_NONE },
|
{ GO_NOVOS_CRYSTAL_2, DATA_NOVOS_CRYSTALS, DOOR_TYPE_ROOM },
|
||||||
{ GO_NOVOS_CRYSTAL_3, DATA_NOVOS_CRYSTALS, DOOR_TYPE_ROOM, BOUNDARY_NONE },
|
{ GO_NOVOS_CRYSTAL_3, DATA_NOVOS_CRYSTALS, DOOR_TYPE_ROOM },
|
||||||
{ GO_NOVOS_CRYSTAL_4, DATA_NOVOS_CRYSTALS, DOOR_TYPE_ROOM, BOUNDARY_NONE },
|
{ GO_NOVOS_CRYSTAL_4, DATA_NOVOS_CRYSTALS, DOOR_TYPE_ROOM },
|
||||||
{ 0, 0, DOOR_TYPE_ROOM, BOUNDARY_NONE }
|
{ 0, 0, DOOR_TYPE_ROOM }
|
||||||
};
|
};
|
||||||
|
|
||||||
class instance_drak_tharon_keep : public InstanceMapScript
|
class instance_drak_tharon_keep : public InstanceMapScript
|
||||||
|
|||||||
@@ -198,10 +198,10 @@ public:
|
|||||||
summon->SetReactState(REACT_PASSIVE);
|
summon->SetReactState(REACT_PASSIVE);
|
||||||
}
|
}
|
||||||
|
|
||||||
void EnterEvadeMode() override
|
void EnterEvadeMode(EvadeReason why) override
|
||||||
{
|
{
|
||||||
me->RemoveUnitFlag(UNIT_FLAG_DISABLE_MOVE);
|
me->RemoveUnitFlag(UNIT_FLAG_DISABLE_MOVE);
|
||||||
ScriptedAI::EnterEvadeMode();
|
ScriptedAI::EnterEvadeMode(why);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -293,11 +293,11 @@ public:
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void EnterEvadeMode() override
|
void EnterEvadeMode(EvadeReason why) override
|
||||||
{
|
{
|
||||||
me->SetControlled(false, UNIT_STATE_ROOT);
|
me->SetControlled(false, UNIT_STATE_ROOT);
|
||||||
me->DisableRotate(false);
|
me->DisableRotate(false);
|
||||||
ScriptedAI::EnterEvadeMode();
|
ScriptedAI::EnterEvadeMode(why);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -164,10 +164,10 @@ public:
|
|||||||
Talk(RAND(SAY_SLAY_1, SAY_SLAY_2));
|
Talk(RAND(SAY_SLAY_1, SAY_SLAY_2));
|
||||||
}
|
}
|
||||||
|
|
||||||
void EnterEvadeMode() override
|
void EnterEvadeMode(EvadeReason why) override
|
||||||
{
|
{
|
||||||
me->SetControlled(false, UNIT_STATE_ROOT);
|
me->SetControlled(false, UNIT_STATE_ROOT);
|
||||||
ScriptedAI::EnterEvadeMode();
|
ScriptedAI::EnterEvadeMode(why);
|
||||||
if (startFightTimer)
|
if (startFightTimer)
|
||||||
Reset();
|
Reset();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -153,9 +153,9 @@ public:
|
|||||||
Talk(RAND(SAY_SLAY_1, SAY_SLAY_2));
|
Talk(RAND(SAY_SLAY_1, SAY_SLAY_2));
|
||||||
}
|
}
|
||||||
|
|
||||||
void EnterEvadeMode() override
|
void EnterEvadeMode(EvadeReason why) override
|
||||||
{
|
{
|
||||||
ScriptedAI::EnterEvadeMode();
|
ScriptedAI::EnterEvadeMode(why);
|
||||||
if (startFightTimer)
|
if (startFightTimer)
|
||||||
Reset();
|
Reset();
|
||||||
}
|
}
|
||||||
|
|||||||
+17
-17
@@ -751,9 +751,9 @@ public:
|
|||||||
DoMeleeAttackIfReady();
|
DoMeleeAttackIfReady();
|
||||||
}
|
}
|
||||||
|
|
||||||
void EnterEvadeMode() override
|
void EnterEvadeMode(EvadeReason why) override
|
||||||
{
|
{
|
||||||
ScriptedAI::EnterEvadeMode();
|
ScriptedAI::EnterEvadeMode(why);
|
||||||
if (me->GetInstanceScript()->GetData(DATA_WAVE_NUMBER))
|
if (me->GetInstanceScript()->GetData(DATA_WAVE_NUMBER))
|
||||||
me->RemoveUnitFlag(UNIT_FLAG_IMMUNE_TO_PC | UNIT_FLAG_IMMUNE_TO_NPC | UNIT_FLAG_NOT_SELECTABLE);
|
me->RemoveUnitFlag(UNIT_FLAG_IMMUNE_TO_PC | UNIT_FLAG_IMMUNE_TO_NPC | UNIT_FLAG_NOT_SELECTABLE);
|
||||||
}
|
}
|
||||||
@@ -847,9 +847,9 @@ public:
|
|||||||
DoMeleeAttackIfReady();
|
DoMeleeAttackIfReady();
|
||||||
}
|
}
|
||||||
|
|
||||||
void EnterEvadeMode() override
|
void EnterEvadeMode(EvadeReason why) override
|
||||||
{
|
{
|
||||||
ScriptedAI::EnterEvadeMode();
|
ScriptedAI::EnterEvadeMode(why);
|
||||||
if (me->GetInstanceScript()->GetData(DATA_WAVE_NUMBER))
|
if (me->GetInstanceScript()->GetData(DATA_WAVE_NUMBER))
|
||||||
me->RemoveUnitFlag(UNIT_FLAG_IMMUNE_TO_PC | UNIT_FLAG_IMMUNE_TO_NPC | UNIT_FLAG_NOT_SELECTABLE);
|
me->RemoveUnitFlag(UNIT_FLAG_IMMUNE_TO_PC | UNIT_FLAG_IMMUNE_TO_NPC | UNIT_FLAG_NOT_SELECTABLE);
|
||||||
}
|
}
|
||||||
@@ -892,12 +892,12 @@ public:
|
|||||||
npc_phantom_mageAI::UpdateAI(diff);
|
npc_phantom_mageAI::UpdateAI(diff);
|
||||||
}
|
}
|
||||||
|
|
||||||
void EnterEvadeMode() override
|
void EnterEvadeMode(EvadeReason why) override
|
||||||
{
|
{
|
||||||
if (numOfUpd)
|
if (numOfUpd)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
ScriptedAI::EnterEvadeMode();
|
ScriptedAI::EnterEvadeMode(why);
|
||||||
if (me->IsSummon())
|
if (me->IsSummon())
|
||||||
me->ToTempSummon()->DespawnOrUnsummon(1);
|
me->ToTempSummon()->DespawnOrUnsummon(1);
|
||||||
}
|
}
|
||||||
@@ -990,9 +990,9 @@ public:
|
|||||||
DoMeleeAttackIfReady();
|
DoMeleeAttackIfReady();
|
||||||
}
|
}
|
||||||
|
|
||||||
void EnterEvadeMode() override
|
void EnterEvadeMode(EvadeReason why) override
|
||||||
{
|
{
|
||||||
ScriptedAI::EnterEvadeMode();
|
ScriptedAI::EnterEvadeMode(why);
|
||||||
if (me->GetInstanceScript()->GetData(DATA_WAVE_NUMBER))
|
if (me->GetInstanceScript()->GetData(DATA_WAVE_NUMBER))
|
||||||
me->RemoveUnitFlag(UNIT_FLAG_IMMUNE_TO_PC | UNIT_FLAG_IMMUNE_TO_NPC | UNIT_FLAG_NOT_SELECTABLE);
|
me->RemoveUnitFlag(UNIT_FLAG_IMMUNE_TO_PC | UNIT_FLAG_IMMUNE_TO_NPC | UNIT_FLAG_NOT_SELECTABLE);
|
||||||
}
|
}
|
||||||
@@ -1073,9 +1073,9 @@ public:
|
|||||||
DoMeleeAttackIfReady();
|
DoMeleeAttackIfReady();
|
||||||
}
|
}
|
||||||
|
|
||||||
void EnterEvadeMode() override
|
void EnterEvadeMode(EvadeReason why) override
|
||||||
{
|
{
|
||||||
ScriptedAI::EnterEvadeMode();
|
ScriptedAI::EnterEvadeMode(why);
|
||||||
if (me->GetInstanceScript()->GetData(DATA_WAVE_NUMBER))
|
if (me->GetInstanceScript()->GetData(DATA_WAVE_NUMBER))
|
||||||
me->RemoveUnitFlag(UNIT_FLAG_IMMUNE_TO_PC | UNIT_FLAG_IMMUNE_TO_NPC | UNIT_FLAG_NOT_SELECTABLE);
|
me->RemoveUnitFlag(UNIT_FLAG_IMMUNE_TO_PC | UNIT_FLAG_IMMUNE_TO_NPC | UNIT_FLAG_NOT_SELECTABLE);
|
||||||
}
|
}
|
||||||
@@ -1157,9 +1157,9 @@ public:
|
|||||||
DoSpellAttackIfReady(SPELL_SHOOT);
|
DoSpellAttackIfReady(SPELL_SHOOT);
|
||||||
}
|
}
|
||||||
|
|
||||||
void EnterEvadeMode() override
|
void EnterEvadeMode(EvadeReason why) override
|
||||||
{
|
{
|
||||||
ScriptedAI::EnterEvadeMode();
|
ScriptedAI::EnterEvadeMode(why);
|
||||||
if (me->GetInstanceScript()->GetData(DATA_WAVE_NUMBER))
|
if (me->GetInstanceScript()->GetData(DATA_WAVE_NUMBER))
|
||||||
me->RemoveUnitFlag(UNIT_FLAG_IMMUNE_TO_PC | UNIT_FLAG_IMMUNE_TO_NPC | UNIT_FLAG_NOT_SELECTABLE);
|
me->RemoveUnitFlag(UNIT_FLAG_IMMUNE_TO_PC | UNIT_FLAG_IMMUNE_TO_NPC | UNIT_FLAG_NOT_SELECTABLE);
|
||||||
}
|
}
|
||||||
@@ -1202,7 +1202,7 @@ public:
|
|||||||
Position p = me->GetHomePosition();
|
Position p = me->GetHomePosition();
|
||||||
if (me->GetExactDist(&p) > 30.0f)
|
if (me->GetExactDist(&p) > 30.0f)
|
||||||
{
|
{
|
||||||
EnterEvadeMode();
|
EnterEvadeMode(EVADE_REASON_OTHER);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1234,10 +1234,10 @@ public:
|
|||||||
pInstance->SetData(DATA_FROSTSWORN_GENERAL, DONE);
|
pInstance->SetData(DATA_FROSTSWORN_GENERAL, DONE);
|
||||||
}
|
}
|
||||||
|
|
||||||
void EnterEvadeMode() override
|
void EnterEvadeMode(EvadeReason why) override
|
||||||
{
|
{
|
||||||
pInstance->SetData(ACTION_SPIRITUAL_REFLECTIONS_HIDE, 1);
|
pInstance->SetData(ACTION_SPIRITUAL_REFLECTIONS_HIDE, 1);
|
||||||
ScriptedAI::EnterEvadeMode();
|
ScriptedAI::EnterEvadeMode(why);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -1296,10 +1296,10 @@ public:
|
|||||||
me->CastSpell((Unit*)nullptr, SPELL_SPIRIT_BURST, false);
|
me->CastSpell((Unit*)nullptr, SPELL_SPIRIT_BURST, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
void EnterEvadeMode() override
|
void EnterEvadeMode(EvadeReason why) override
|
||||||
{
|
{
|
||||||
me->UpdatePosition(me->GetHomePosition(), true);
|
me->UpdatePosition(me->GetHomePosition(), true);
|
||||||
ScriptedAI::EnterEvadeMode();
|
ScriptedAI::EnterEvadeMode(why);
|
||||||
me->SetVisible(false);
|
me->SetVisible(false);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -219,7 +219,7 @@ public:
|
|||||||
if (x < 600.0f || x > 770.0f || y < -270.0f || y > -137.0f || z < 514.0f || z > 550.0f)
|
if (x < 600.0f || x > 770.0f || y < -270.0f || y > -137.0f || z < 514.0f || z > 550.0f)
|
||||||
{
|
{
|
||||||
me->SetHealth(me->GetMaxHealth());
|
me->SetHealth(me->GetMaxHealth());
|
||||||
EnterEvadeMode();
|
EnterEvadeMode(EVADE_REASON_OTHER);
|
||||||
if (CreatureGroup* f = me->GetFormation())
|
if (CreatureGroup* f = me->GetFormation())
|
||||||
{
|
{
|
||||||
const CreatureGroup::CreatureGroupMemberType& m = f->GetMembers();
|
const CreatureGroup::CreatureGroupMemberType& m = f->GetMembers();
|
||||||
@@ -289,11 +289,11 @@ public:
|
|||||||
Talk(SAY_SLAY_1);
|
Talk(SAY_SLAY_1);
|
||||||
}
|
}
|
||||||
|
|
||||||
void EnterEvadeMode() override
|
void EnterEvadeMode(EvadeReason why) override
|
||||||
{
|
{
|
||||||
me->SetControlled(false, UNIT_STATE_ROOT);
|
me->SetControlled(false, UNIT_STATE_ROOT);
|
||||||
me->DisableRotate(false);
|
me->DisableRotate(false);
|
||||||
ScriptedAI::EnterEvadeMode();
|
ScriptedAI::EnterEvadeMode(why);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -1117,7 +1117,7 @@ public:
|
|||||||
return who->GetEntry() == NPC_FALLEN_WARRIOR;
|
return who->GetEntry() == NPC_FALLEN_WARRIOR;
|
||||||
}
|
}
|
||||||
|
|
||||||
void EnterEvadeMode() override
|
void EnterEvadeMode(EvadeReason /* why */) override
|
||||||
{
|
{
|
||||||
if (!me->IsAlive() || me->IsInEvadeMode())
|
if (!me->IsAlive() || me->IsInEvadeMode())
|
||||||
return;
|
return;
|
||||||
|
|||||||
@@ -21,12 +21,12 @@
|
|||||||
|
|
||||||
DoorData const doorData[] =
|
DoorData const doorData[] =
|
||||||
{
|
{
|
||||||
{ GO_ECK_DOORS, DATA_MOORABI, DOOR_TYPE_PASSAGE, BOUNDARY_NONE },
|
{ GO_ECK_DOORS, DATA_MOORABI, DOOR_TYPE_PASSAGE },
|
||||||
{ GO_ECK_UNDERWATER_GATE, DATA_ECK_THE_FEROCIOUS, DOOR_TYPE_PASSAGE, BOUNDARY_NONE },
|
{ GO_ECK_UNDERWATER_GATE, DATA_ECK_THE_FEROCIOUS, DOOR_TYPE_PASSAGE },
|
||||||
{ GO_GAL_DARAH_DOORS0, DATA_GAL_DARAH, DOOR_TYPE_ROOM, BOUNDARY_NONE },
|
{ GO_GAL_DARAH_DOORS0, DATA_GAL_DARAH, DOOR_TYPE_ROOM },
|
||||||
{ GO_GAL_DARAH_DOORS1, DATA_GAL_DARAH, DOOR_TYPE_PASSAGE, BOUNDARY_NONE },
|
{ GO_GAL_DARAH_DOORS1, DATA_GAL_DARAH, DOOR_TYPE_PASSAGE },
|
||||||
{ GO_GAL_DARAH_DOORS2, DATA_GAL_DARAH, DOOR_TYPE_PASSAGE, BOUNDARY_NONE },
|
{ GO_GAL_DARAH_DOORS2, DATA_GAL_DARAH, DOOR_TYPE_PASSAGE },
|
||||||
{ 0, 0, DOOR_TYPE_ROOM, BOUNDARY_NONE }
|
{ 0, 0, DOOR_TYPE_ROOM }
|
||||||
};
|
};
|
||||||
|
|
||||||
class instance_gundrak : public InstanceMapScript
|
class instance_gundrak : public InstanceMapScript
|
||||||
|
|||||||
@@ -248,7 +248,7 @@ public:
|
|||||||
valid = false;
|
valid = false;
|
||||||
if (!valid)
|
if (!valid)
|
||||||
{
|
{
|
||||||
EnterEvadeMode();
|
EnterEvadeMode(EVADE_REASON_OTHER);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -418,7 +418,7 @@ public:
|
|||||||
DoSpellAttackIfReady(_isEmpowered ? SPELL_EMPOWERED_SHADOW_LANCE : SPELL_SHADOW_LANCE);
|
DoSpellAttackIfReady(_isEmpowered ? SPELL_EMPOWERED_SHADOW_LANCE : SPELL_SHADOW_LANCE);
|
||||||
}
|
}
|
||||||
|
|
||||||
void EnterEvadeMode() override
|
void EnterEvadeMode(EvadeReason why) override
|
||||||
{
|
{
|
||||||
if (_evading)
|
if (_evading)
|
||||||
return;
|
return;
|
||||||
@@ -430,7 +430,7 @@ public:
|
|||||||
taldaram->AI()->EnterEvadeMode();
|
taldaram->AI()->EnterEvadeMode();
|
||||||
if (Creature* valanar = ObjectAccessor::GetCreature(*me, instance->GetGuidData(DATA_PRINCE_VALANAR_GUID)))
|
if (Creature* valanar = ObjectAccessor::GetCreature(*me, instance->GetGuidData(DATA_PRINCE_VALANAR_GUID)))
|
||||||
valanar->AI()->EnterEvadeMode();
|
valanar->AI()->EnterEvadeMode();
|
||||||
ScriptedAI::EnterEvadeMode();
|
ScriptedAI::EnterEvadeMode(why);
|
||||||
_evading = false;
|
_evading = false;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
@@ -507,7 +507,7 @@ public:
|
|||||||
valid = false;
|
valid = false;
|
||||||
if (!valid)
|
if (!valid)
|
||||||
{
|
{
|
||||||
EnterEvadeMode();
|
EnterEvadeMode(EVADE_REASON_OTHER);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -702,7 +702,7 @@ public:
|
|||||||
DoMeleeAttackIfReady();
|
DoMeleeAttackIfReady();
|
||||||
}
|
}
|
||||||
|
|
||||||
void EnterEvadeMode() override
|
void EnterEvadeMode(EvadeReason why) override
|
||||||
{
|
{
|
||||||
if (_evading)
|
if (_evading)
|
||||||
return;
|
return;
|
||||||
@@ -711,10 +711,10 @@ public:
|
|||||||
DoAction(ACTION_REMOVE_INVOCATION);
|
DoAction(ACTION_REMOVE_INVOCATION);
|
||||||
_evading = true;
|
_evading = true;
|
||||||
if (Creature* keleseth = ObjectAccessor::GetCreature(*me, instance->GetGuidData(DATA_PRINCE_KELESETH_GUID)))
|
if (Creature* keleseth = ObjectAccessor::GetCreature(*me, instance->GetGuidData(DATA_PRINCE_KELESETH_GUID)))
|
||||||
keleseth->AI()->EnterEvadeMode();
|
keleseth->AI()->EnterEvadeMode(why);
|
||||||
if (Creature* valanar = ObjectAccessor::GetCreature(*me, instance->GetGuidData(DATA_PRINCE_VALANAR_GUID)))
|
if (Creature* valanar = ObjectAccessor::GetCreature(*me, instance->GetGuidData(DATA_PRINCE_VALANAR_GUID)))
|
||||||
valanar->AI()->EnterEvadeMode();
|
valanar->AI()->EnterEvadeMode(why);
|
||||||
ScriptedAI::EnterEvadeMode();
|
ScriptedAI::EnterEvadeMode(why);
|
||||||
_evading = false;
|
_evading = false;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
@@ -791,7 +791,7 @@ public:
|
|||||||
valid = false;
|
valid = false;
|
||||||
if (!valid)
|
if (!valid)
|
||||||
{
|
{
|
||||||
EnterEvadeMode();
|
EnterEvadeMode(EVADE_REASON_OTHER);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -959,10 +959,10 @@ public:
|
|||||||
{
|
{
|
||||||
Creature* keleseth = instance->instance->GetCreature(instance->GetGuidData(DATA_PRINCE_KELESETH_GUID));
|
Creature* keleseth = instance->instance->GetCreature(instance->GetGuidData(DATA_PRINCE_KELESETH_GUID));
|
||||||
Creature* taldaram = instance->instance->GetCreature(instance->GetGuidData(DATA_PRINCE_TALDARAM_GUID));
|
Creature* taldaram = instance->instance->GetCreature(instance->GetGuidData(DATA_PRINCE_TALDARAM_GUID));
|
||||||
if (keleseth && taldaram && CheckBoundary(me) && CheckBoundary(keleseth) && CheckBoundary(taldaram))
|
if (keleseth && taldaram && IsInBoundary(me) && IsInBoundary(keleseth) && IsInBoundary(taldaram))
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
EnterEvadeMode();
|
EnterEvadeMode(EVADE_REASON_OTHER);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -999,7 +999,7 @@ public:
|
|||||||
}
|
}
|
||||||
if (!visualSpellId || !current || !next || !current->IsInCombat() || !next->IsInCombat())
|
if (!visualSpellId || !current || !next || !current->IsInCombat() || !next->IsInCombat())
|
||||||
{
|
{
|
||||||
EnterEvadeMode();
|
EnterEvadeMode(EVADE_REASON_OTHER);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
next->SetHealth(current->GetHealth());
|
next->SetHealth(current->GetHealth());
|
||||||
@@ -1041,7 +1041,7 @@ public:
|
|||||||
DoMeleeAttackIfReady();
|
DoMeleeAttackIfReady();
|
||||||
}
|
}
|
||||||
|
|
||||||
void EnterEvadeMode() override
|
void EnterEvadeMode(EvadeReason why) override
|
||||||
{
|
{
|
||||||
if (_evading)
|
if (_evading)
|
||||||
return;
|
return;
|
||||||
@@ -1050,10 +1050,10 @@ public:
|
|||||||
DoAction(ACTION_REMOVE_INVOCATION);
|
DoAction(ACTION_REMOVE_INVOCATION);
|
||||||
_evading = true;
|
_evading = true;
|
||||||
if (Creature* keleseth = ObjectAccessor::GetCreature(*me, instance->GetGuidData(DATA_PRINCE_KELESETH_GUID)))
|
if (Creature* keleseth = ObjectAccessor::GetCreature(*me, instance->GetGuidData(DATA_PRINCE_KELESETH_GUID)))
|
||||||
keleseth->AI()->EnterEvadeMode();
|
keleseth->AI()->EnterEvadeMode(why);
|
||||||
if (Creature* taldaram = ObjectAccessor::GetCreature(*me, instance->GetGuidData(DATA_PRINCE_TALDARAM_GUID)))
|
if (Creature* taldaram = ObjectAccessor::GetCreature(*me, instance->GetGuidData(DATA_PRINCE_TALDARAM_GUID)))
|
||||||
taldaram->AI()->EnterEvadeMode();
|
taldaram->AI()->EnterEvadeMode(why);
|
||||||
BossAI::EnterEvadeMode();
|
BossAI::EnterEvadeMode(why);
|
||||||
_evading = false;
|
_evading = false;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -172,7 +172,7 @@ public:
|
|||||||
{
|
{
|
||||||
if (!instance->CheckRequiredBosses(DATA_BLOOD_QUEEN_LANA_THEL, who->ToPlayer()) || !me->IsVisible())
|
if (!instance->CheckRequiredBosses(DATA_BLOOD_QUEEN_LANA_THEL, who->ToPlayer()) || !me->IsVisible())
|
||||||
{
|
{
|
||||||
EnterEvadeMode();
|
EnterEvadeMode(EVADE_REASON_OTHER);
|
||||||
instance->DoCastSpellOnPlayers(LIGHT_S_HAMMER_TELEPORT);
|
instance->DoCastSpellOnPlayers(LIGHT_S_HAMMER_TELEPORT);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -552,7 +552,7 @@ public:
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void EnterEvadeMode() override
|
void EnterEvadeMode(EvadeReason why) override
|
||||||
{
|
{
|
||||||
const Map::PlayerList& pl = me->GetMap()->GetPlayers();
|
const Map::PlayerList& pl = me->GetMap()->GetPlayers();
|
||||||
for (Map::PlayerList::const_iterator itr = pl.begin(); itr != pl.end(); ++itr)
|
for (Map::PlayerList::const_iterator itr = pl.begin(); itr != pl.end(); ++itr)
|
||||||
@@ -564,7 +564,7 @@ public:
|
|||||||
{
|
{
|
||||||
if (!me->IsAlive())
|
if (!me->IsAlive())
|
||||||
return;
|
return;
|
||||||
_EnterEvadeMode();
|
_EnterEvadeMode(why);
|
||||||
Reset();
|
Reset();
|
||||||
GoToMinchar();
|
GoToMinchar();
|
||||||
return;
|
return;
|
||||||
|
|||||||
@@ -283,7 +283,7 @@ public:
|
|||||||
|
|
||||||
if (!instance->CheckRequiredBosses(DATA_DEATHBRINGER_SAURFANG, who->ToPlayer()))
|
if (!instance->CheckRequiredBosses(DATA_DEATHBRINGER_SAURFANG, who->ToPlayer()))
|
||||||
{
|
{
|
||||||
EnterEvadeMode();
|
EnterEvadeMode(EVADE_REASON_OTHER);
|
||||||
instance->DoCastSpellOnPlayers(LIGHT_S_HAMMER_TELEPORT);
|
instance->DoCastSpellOnPlayers(LIGHT_S_HAMMER_TELEPORT);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -405,7 +405,7 @@ public:
|
|||||||
if (Player* p = itr->GetSource())
|
if (Player* p = itr->GetSource())
|
||||||
if (p->GetTransport())
|
if (p->GetTransport())
|
||||||
{
|
{
|
||||||
EnterEvadeMode();
|
EnterEvadeMode(EVADE_REASON_OTHER);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -495,9 +495,9 @@ public:
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
void EnterEvadeMode() override
|
void EnterEvadeMode(EvadeReason why) override
|
||||||
{
|
{
|
||||||
BossAI::EnterEvadeMode();
|
BossAI::EnterEvadeMode(why);
|
||||||
if (Creature* creature = ObjectAccessor::GetCreature(*me, instance->GetGuidData(DATA_SAURFANG_EVENT_NPC)))
|
if (Creature* creature = ObjectAccessor::GetCreature(*me, instance->GetGuidData(DATA_SAURFANG_EVENT_NPC)))
|
||||||
creature->AI()->DoAction(ACTION_EVADE);
|
creature->AI()->DoAction(ACTION_EVADE);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -112,7 +112,7 @@ public:
|
|||||||
{
|
{
|
||||||
if (!instance->CheckRequiredBosses(DATA_FESTERGUT, who->ToPlayer()))
|
if (!instance->CheckRequiredBosses(DATA_FESTERGUT, who->ToPlayer()))
|
||||||
{
|
{
|
||||||
EnterEvadeMode();
|
EnterEvadeMode(EVADE_REASON_OTHER);
|
||||||
instance->DoCastSpellOnPlayers(LIGHT_S_HAMMER_TELEPORT);
|
instance->DoCastSpellOnPlayers(LIGHT_S_HAMMER_TELEPORT);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -151,11 +151,11 @@ public:
|
|||||||
instance->SetBossState(DATA_FESTERGUT, FAIL);
|
instance->SetBossState(DATA_FESTERGUT, FAIL);
|
||||||
}
|
}
|
||||||
|
|
||||||
void EnterEvadeMode() override
|
void EnterEvadeMode(EvadeReason why) override
|
||||||
{
|
{
|
||||||
ScriptedAI::EnterEvadeMode();
|
ScriptedAI::EnterEvadeMode(why);
|
||||||
if (Creature* professor = ObjectAccessor::GetCreature(*me, instance->GetGuidData(DATA_PROFESSOR_PUTRICIDE)))
|
if (Creature* professor = ObjectAccessor::GetCreature(*me, instance->GetGuidData(DATA_PROFESSOR_PUTRICIDE)))
|
||||||
professor->AI()->EnterEvadeMode();
|
professor->AI()->EnterEvadeMode(why);
|
||||||
}
|
}
|
||||||
|
|
||||||
void KilledUnit(Unit* victim) override
|
void KilledUnit(Unit* victim) override
|
||||||
|
|||||||
@@ -780,7 +780,7 @@ public:
|
|||||||
_events.ScheduleEvent(EVENT_CLEAVE, urand(3000, 6000));
|
_events.ScheduleEvent(EVENT_CLEAVE, urand(3000, 6000));
|
||||||
}
|
}
|
||||||
|
|
||||||
void EnterEvadeMode() override
|
void EnterEvadeMode(EvadeReason /*why*/) override
|
||||||
{
|
{
|
||||||
if (!me->IsAlive())
|
if (!me->IsAlive())
|
||||||
return;
|
return;
|
||||||
@@ -1116,7 +1116,7 @@ public:
|
|||||||
_events.ScheduleEvent(EVENT_CLEAVE, urand(3000, 6000));
|
_events.ScheduleEvent(EVENT_CLEAVE, urand(3000, 6000));
|
||||||
}
|
}
|
||||||
|
|
||||||
void EnterEvadeMode() override
|
void EnterEvadeMode(EvadeReason /*why*/) override
|
||||||
{
|
{
|
||||||
if (!me->IsAlive())
|
if (!me->IsAlive())
|
||||||
return;
|
return;
|
||||||
@@ -1492,7 +1492,7 @@ struct gunship_npc_AI : public ScriptedAI
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void EnterEvadeMode() override
|
void EnterEvadeMode(EvadeReason /*why*/) override
|
||||||
{
|
{
|
||||||
if (!me->IsAlive() || !me->IsInCombat())
|
if (!me->IsAlive() || !me->IsInCombat())
|
||||||
return;
|
return;
|
||||||
@@ -1553,7 +1553,7 @@ struct npc_gunship_boarding_addAI : public ScriptedAI
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void EnterEvadeMode() override
|
void EnterEvadeMode(EvadeReason /*why*/) override
|
||||||
{
|
{
|
||||||
if (!me->IsAlive() || !me->IsInCombat())
|
if (!me->IsAlive() || !me->IsInCombat())
|
||||||
return;
|
return;
|
||||||
|
|||||||
@@ -983,7 +983,7 @@ public:
|
|||||||
}
|
}
|
||||||
|
|
||||||
void MoveInLineOfSight(Unit* /*who*/) override {}
|
void MoveInLineOfSight(Unit* /*who*/) override {}
|
||||||
void EnterEvadeMode() override {}
|
void EnterEvadeMode(EvadeReason /*why*/ = EVADE_REASON_OTHER) override {}
|
||||||
};
|
};
|
||||||
|
|
||||||
CreatureAI* GetAI(Creature* creature) const override
|
CreatureAI* GetAI(Creature* creature) const override
|
||||||
|
|||||||
@@ -501,7 +501,7 @@ public:
|
|||||||
{
|
{
|
||||||
sayFestergutDeathTimer = 0;
|
sayFestergutDeathTimer = 0;
|
||||||
Talk(SAY_FESTERGUT_DEATH);
|
Talk(SAY_FESTERGUT_DEATH);
|
||||||
EnterEvadeMode();
|
EnterEvadeMode(EVADE_REASON_OTHER);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
sayFestergutDeathTimer -= diff;
|
sayFestergutDeathTimer -= diff;
|
||||||
@@ -512,7 +512,7 @@ public:
|
|||||||
{
|
{
|
||||||
sayRotfaceDeathTimer = 0;
|
sayRotfaceDeathTimer = 0;
|
||||||
Talk(SAY_ROTFACE_DEATH);
|
Talk(SAY_ROTFACE_DEATH);
|
||||||
EnterEvadeMode();
|
EnterEvadeMode(EVADE_REASON_OTHER);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
sayRotfaceDeathTimer -= diff;
|
sayRotfaceDeathTimer -= diff;
|
||||||
@@ -520,7 +520,7 @@ public:
|
|||||||
else if (bCallEvade)
|
else if (bCallEvade)
|
||||||
{
|
{
|
||||||
bCallEvade = false;
|
bCallEvade = false;
|
||||||
EnterEvadeMode();
|
EnterEvadeMode(EVADE_REASON_OTHER);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -665,12 +665,12 @@ public:
|
|||||||
DoMeleeAttackIfReady();
|
DoMeleeAttackIfReady();
|
||||||
}
|
}
|
||||||
|
|
||||||
void EnterEvadeMode() override
|
void EnterEvadeMode(EvadeReason why) override
|
||||||
{
|
{
|
||||||
Position p = me->GetHomePosition();
|
Position p = me->GetHomePosition();
|
||||||
if (!me->IsInCombat() && me->GetExactDist2d(&p) > 10.0f)
|
if (!me->IsInCombat() && me->GetExactDist2d(&p) > 10.0f)
|
||||||
me->GetMotionMaster()->MoveCharge(tablePos.GetPositionX(), tablePos.GetPositionY(), tablePos.GetPositionZ(), 15.0f, POINT_TABLE);
|
me->GetMotionMaster()->MoveCharge(tablePos.GetPositionX(), tablePos.GetPositionY(), tablePos.GetPositionZ(), 15.0f, POINT_TABLE);
|
||||||
BossAI::EnterEvadeMode();
|
BossAI::EnterEvadeMode(why);
|
||||||
}
|
}
|
||||||
|
|
||||||
void ChangePhase()
|
void ChangePhase()
|
||||||
|
|||||||
@@ -151,7 +151,7 @@ public:
|
|||||||
{
|
{
|
||||||
if (!instance->CheckRequiredBosses(DATA_ROTFACE, who->ToPlayer()))
|
if (!instance->CheckRequiredBosses(DATA_ROTFACE, who->ToPlayer()))
|
||||||
{
|
{
|
||||||
EnterEvadeMode();
|
EnterEvadeMode(EVADE_REASON_OTHER);
|
||||||
instance->DoCastSpellOnPlayers(LIGHT_S_HAMMER_TELEPORT);
|
instance->DoCastSpellOnPlayers(LIGHT_S_HAMMER_TELEPORT);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -219,13 +219,13 @@ public:
|
|||||||
Talk(SAY_KILL);
|
Talk(SAY_KILL);
|
||||||
}
|
}
|
||||||
|
|
||||||
void EnterEvadeMode() override
|
void EnterEvadeMode(EvadeReason why) override
|
||||||
{
|
{
|
||||||
me->SetControlled(false, UNIT_STATE_ROOT);
|
me->SetControlled(false, UNIT_STATE_ROOT);
|
||||||
me->DisableRotate(false);
|
me->DisableRotate(false);
|
||||||
ScriptedAI::EnterEvadeMode();
|
ScriptedAI::EnterEvadeMode(why);
|
||||||
if (Creature* professor = ObjectAccessor::GetCreature(*me, instance->GetGuidData(DATA_PROFESSOR_PUTRICIDE)))
|
if (Creature* professor = ObjectAccessor::GetCreature(*me, instance->GetGuidData(DATA_PROFESSOR_PUTRICIDE)))
|
||||||
professor->AI()->EnterEvadeMode();
|
professor->AI()->EnterEvadeMode(why);
|
||||||
}
|
}
|
||||||
|
|
||||||
void SpellHitTarget(Unit* target, SpellInfo const* spell) override
|
void SpellHitTarget(Unit* target, SpellInfo const* spell) override
|
||||||
@@ -407,7 +407,7 @@ public:
|
|||||||
DoMeleeAttackIfReady();
|
DoMeleeAttackIfReady();
|
||||||
}
|
}
|
||||||
|
|
||||||
void EnterEvadeMode() override
|
void EnterEvadeMode(EvadeReason /*why*/) override
|
||||||
{
|
{
|
||||||
me->SetInCombatWithZone();
|
me->SetInCombatWithZone();
|
||||||
}
|
}
|
||||||
@@ -492,7 +492,7 @@ public:
|
|||||||
DoMeleeAttackIfReady();
|
DoMeleeAttackIfReady();
|
||||||
}
|
}
|
||||||
|
|
||||||
void EnterEvadeMode() override
|
void EnterEvadeMode(EvadeReason /*why*/) override
|
||||||
{
|
{
|
||||||
me->SetInCombatWithZone();
|
me->SetInCombatWithZone();
|
||||||
}
|
}
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user