Core/Spells: rework part 5: GameObject casting

Port From (https://github.com/TrinityCore/TrinityCore/commit/962f6d7988b9003e550f6745be7cff812e9d8efa)
This commit is contained in:
hondacrx
2021-08-29 18:27:08 -04:00
parent e97ffa304d
commit 949d4806c5
39 changed files with 5236 additions and 4781 deletions
+5 -4
View File
@@ -399,10 +399,12 @@ namespace Game.AI
public virtual void JustUnregisteredAreaTrigger(AreaTrigger areaTrigger) { }
// Called when hit by a spell
public virtual void SpellHit(Unit caster, SpellInfo spell) { }
public virtual void SpellHit(Unit caster, SpellInfo spellInfo) { }
public virtual void SpellHit(GameObject caster, SpellInfo spellInfo) { }
// Called when spell hits a target
public virtual void SpellHitTarget(Unit target, SpellInfo spell) { }
public virtual void SpellHitTarget(Unit target, SpellInfo spellInfo) { }
public virtual void SpellHitTarget(GameObject target, SpellInfo spellInfo) { }
public virtual bool IsEscorted() { return false; }
@@ -459,7 +461,7 @@ namespace Game.AI
public virtual void QuestReward(Player player, Quest quest, LootItemType type, uint opt) { }
/// == Waypoints system =============================
///
public virtual void WaypointPathStarted(uint pathId) { }
public virtual void WaypointStarted(uint nodeId, uint pathId) { }
@@ -479,7 +481,6 @@ namespace Game.AI
// Object destruction is handled by Unit::RemoveCharmedBy
public virtual PlayerAI GetAIForCharmedPlayer(Player who) { return null; }
/// <summary>
/// Should return true if the NPC is target of an escort quest
/// If onlyIfActive is set, should return true only if the escort quest is currently active