aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/server/scripts/Spells/spell_dk.cpp10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/server/scripts/Spells/spell_dk.cpp b/src/server/scripts/Spells/spell_dk.cpp
index 6a6ee144aac..5ae0e1601c5 100644
--- a/src/server/scripts/Spells/spell_dk.cpp
+++ b/src/server/scripts/Spells/spell_dk.cpp
@@ -322,13 +322,14 @@ class spell_dk_blood_gorged : public SpellScriptLoader
class CorpseExplosionCheck
{
public:
- explicit CorpseExplosionCheck(uint64 casterGUID) : _casterGUID(casterGUID) { }
+ explicit CorpseExplosionCheck(uint64 casterGUID, bool allowGhoul) : _casterGUID(casterGUID),
+ _allowGhoul(allowGhoul) { }
bool operator()(WorldObject* obj) const
{
if (Unit* target = obj->ToUnit())
{
- if ((target->isDead() || (target->GetEntry() == NPC_DK_GHOUL && target->GetOwnerGUID() == _casterGUID))
+ if ((target->isDead() || (_allowGhoul && target->GetEntry() == NPC_DK_GHOUL && target->GetOwnerGUID() == _casterGUID))
&& !(target->GetCreatureTypeMask() & CREATURE_TYPEMASK_MECHANICAL_OR_ELEMENTAL)
&& target->GetDisplayId() == target->GetNativeDisplayId())
return false;
@@ -339,6 +340,7 @@ public:
private:
uint64 _casterGUID;
+ bool _allowGhoul;
};
// 49158 - Corpse Explosion (51325, 51326, 51327, 51328)
@@ -369,7 +371,7 @@ class spell_dk_corpse_explosion : public SpellScriptLoader
void CheckTarget(WorldObject*& target)
{
- if (CorpseExplosionCheck(GetCaster()->GetGUID())(target))
+ if (CorpseExplosionCheck(GetCaster()->GetGUID(), true)(target))
target = NULL;
_target = target;
@@ -380,7 +382,7 @@ class spell_dk_corpse_explosion : public SpellScriptLoader
WorldObject* target = _target;
if (!target)
{
- targets.remove_if(CorpseExplosionCheck(GetCaster()->GetGUID()));
+ targets.remove_if(CorpseExplosionCheck(GetCaster()->GetGUID(), false));
if (targets.empty())
{
FinishCast(SPELL_FAILED_CANT_DO_THAT_RIGHT_NOW);