Core/Spells: rework part 5: GameObject casting
Closes #21330 Closes #18885 Ref #18752 (cherry picked from commit 45c5e1b9d63796d168339a44f63418f220cf2403)
This commit is contained in:
@@ -142,33 +142,9 @@ struct TC_GAME_API ScriptedAI : public CreatureAI
|
||||
|
||||
void AttackStartNoMove(Unit* target);
|
||||
|
||||
// Called at any Damage from any attacker (before damage apply)
|
||||
void DamageTaken(Unit* /*attacker*/, uint32& /*damage*/) override { }
|
||||
|
||||
//Called at World update tick
|
||||
virtual void UpdateAI(uint32 diff) override;
|
||||
|
||||
//Called at creature death
|
||||
void JustDied(Unit* /*killer*/) override { }
|
||||
|
||||
//Called at creature killing another unit
|
||||
void KilledUnit(Unit* /*victim*/) override { }
|
||||
|
||||
// Called when the creature summon successfully other creature
|
||||
void JustSummoned(Creature* /*summon*/) override { }
|
||||
|
||||
// Called when a summoned creature is despawned
|
||||
void SummonedCreatureDespawn(Creature* /*summon*/) override { }
|
||||
|
||||
// Called when hit by a spell
|
||||
void SpellHit(Unit* /*caster*/, SpellInfo const* /*spell*/) override { }
|
||||
|
||||
// Called when spell hits a target
|
||||
void SpellHitTarget(Unit* /*target*/, SpellInfo const* /*spell*/) override { }
|
||||
|
||||
// Called when AI is temporarily replaced or put back when possess is applied or removed
|
||||
void OnPossess(bool /*apply*/) { }
|
||||
|
||||
// *************
|
||||
// Variables
|
||||
// *************
|
||||
@@ -180,12 +156,6 @@ struct TC_GAME_API ScriptedAI : public CreatureAI
|
||||
//Pure virtual functions
|
||||
// *************
|
||||
|
||||
//Called at creature reset either by death or evade
|
||||
void Reset() override { }
|
||||
|
||||
//Called at creature aggro either by MoveInLOS or Attack Start
|
||||
void JustEngagedWith(Unit* /*who*/) override { }
|
||||
|
||||
// Called before JustEngagedWith even before the creature is in combat.
|
||||
void AttackStart(Unit* /*target*/) override;
|
||||
|
||||
@@ -273,8 +243,8 @@ struct TC_GAME_API ScriptedAI : public CreatureAI
|
||||
// return true for 25 man or 25 man heroic mode
|
||||
bool Is25ManRaid() const { return _difficulty == DIFFICULTY_25_N || _difficulty == DIFFICULTY_25_HC; }
|
||||
|
||||
template<class T> inline
|
||||
const T& DUNGEON_MODE(const T& normal5, const T& heroic10) const
|
||||
template <class T>
|
||||
inline T const& DUNGEON_MODE(T const& normal5, T const& heroic10) const
|
||||
{
|
||||
switch (_difficulty)
|
||||
{
|
||||
@@ -289,8 +259,8 @@ struct TC_GAME_API ScriptedAI : public CreatureAI
|
||||
return heroic10;
|
||||
}
|
||||
|
||||
template<class T> inline
|
||||
const T& RAID_MODE(const T& normal10, const T& normal25) const
|
||||
template <class T>
|
||||
inline T const& RAID_MODE(T const& normal10, T const& normal25) const
|
||||
{
|
||||
switch (_difficulty)
|
||||
{
|
||||
@@ -305,8 +275,8 @@ struct TC_GAME_API ScriptedAI : public CreatureAI
|
||||
return normal25;
|
||||
}
|
||||
|
||||
template<class T> inline
|
||||
const T& RAID_MODE(const T& normal10, const T& normal25, const T& heroic10, const T& heroic25) const
|
||||
template <class T>
|
||||
inline T const& RAID_MODE(T const& normal10, T const& normal25, T const& heroic10, T const& heroic25) const
|
||||
{
|
||||
switch (_difficulty)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user