aboutsummaryrefslogtreecommitdiff
path: root/src/server/scripts/Pet
diff options
context:
space:
mode:
authorForesterDev <11771800+ForesterDev@users.noreply.github.com>2020-06-07 11:22:13 +0300
committerGitHub <noreply@github.com>2020-06-07 10:22:13 +0200
commite3b232fe0e5c21a87d3fe71813e9d750259823f1 (patch)
tree58f7306a85e196080ec33a9aa97ba755af955618 /src/server/scripts/Pet
parent1181b636c0cec174367906808c999641ca7897fc (diff)
Core/AI: refactor SpellHit and SpellHitTarget. (#24691)
* Core/AI: refactor SpellHit and SpellHitTarget. - now caster/target is WorldObject instead of Unit - remove SpellHitByGameObject / SpellHitTargetGameObject (handled by SpellHit / SpellHitTarget) - rename parameters in scripts according parent methods * Restore logic in Algalon script * Changed check for REMORSELESS_WINTER hit to avoid dublicate call, because it has TARGET_UNIT_CASTER for effects 0/1 and TARGET_GAMEOBJECT_SRC_AREA for effect 2 * Fix build after merge
Diffstat (limited to 'src/server/scripts/Pet')
-rw-r--r--src/server/scripts/Pet/pet_dk.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/server/scripts/Pet/pet_dk.cpp b/src/server/scripts/Pet/pet_dk.cpp
index b7340c26e39..63aaf99b146 100644
--- a/src/server/scripts/Pet/pet_dk.cpp
+++ b/src/server/scripts/Pet/pet_dk.cpp
@@ -73,13 +73,13 @@ class npc_pet_dk_ebon_gargoyle : public CreatureScript
}
// Fly away when dismissed
- void SpellHit(Unit* source, SpellInfo const* spell) override
+ void SpellHit(WorldObject* caster, SpellInfo const* spellInfo) override
{
- if (spell->Id != SPELL_DK_DISMISS_GARGOYLE || !me->IsAlive())
+ if (spellInfo->Id != SPELL_DK_DISMISS_GARGOYLE || !me->IsAlive())
return;
Unit* owner = me->GetOwner();
- if (!owner || owner != source)
+ if (!owner || owner != caster)
return;
// Stop Fighting