Closed click closed 12 years ago
Author: silviu what you did here is redundant check as unit typeid will always be valid and TYPEID_UNIT.
diff --git a/src/server/game/Spells/SpellEffects.cpp b/src/server/game/Spells/SpellEffects.cpp
index 389c848..3c3f37a 100755
--- a/src/server/game/Spells/SpellEffects.cpp
+++ b/src/server/game/Spells/SpellEffects.cpp
@@ -797,6 +797,15 @@ void Spell::EffectDummy(SpellEffIndex effIndex)
unitTarget->ToCreature()->setDeathState(JUST_ALIVED);
return;
}
+ case 11885: // Capture Treant
+ case 11886: // Capture Beast
+ case 11887: // Capture Hippogryph
+ case 11888: // Capture Faerie Dragon
+ case 11889: // Capture Mountain Giant
+ if (!unitTarget || unitTarget->GetTypeId() != TYPEID_CORPSE)
+ return;
+ unitTarget->ToCreature()->ForcedDespawn();
+ return;
case 12162: // Deep wounds
case 12850: // (now good common check for this spells)
case 12868:
pretty sure it should be this
also should be in a spell script which im working on.
@kandera TYPEID_CORPSE is not set for creatures NEVER, even if they are dead
diff --git a/src/server/game/Spells/SpellEffects.cpp b/src/server/game/Spells/SpellEffects.cpp
index 389c848..3c3f37a 100755
--- a/src/server/game/Spells/SpellEffects.cpp
+++ b/src/server/game/Spells/SpellEffects.cpp
@@ -797,6 +797,14 @@ void Spell::EffectDummy(SpellEffIndex effIndex)
unitTarget->ToCreature()->setDeathState(JUST_ALIVED);
return;
}
+ case 11885: // Capture Treant
+ case 11886: // Capture Beast
+ case 11887: // Capture Hippogryph
+ case 11888: // Capture Faerie Dragon
+ case 11889: // Capture Mountain Giant
+ if (unitTarget && unitTarget->isDead())
+ unitTarget->ToCreature()->ForcedDespawn();
+ return;
case 12162: // Deep wounds
case 12850: // (now good common check for this spells)
case 12868:
how about this? :D
Implement dummy effect for spells triggered by Treant Muisek Vessel, Mountain Giant Muissek Vessel, Hippogryph Muisek Vessel, Faerie Dragon Muisek Vessel and Beast Muisek Vessel. Unit creatures will properly despawn("shrink") after using one of these items on them. [http://pastebin.com/NvybVXr5/ Patch on pastebin]