aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sql/updates/world/2012_04_26_00_world_conditions.sql1
-rw-r--r--src/server/scripts/Spells/spell_generic.cpp7
2 files changed, 4 insertions, 4 deletions
diff --git a/sql/updates/world/2012_04_26_00_world_conditions.sql b/sql/updates/world/2012_04_26_00_world_conditions.sql
new file mode 100644
index 00000000000..943fe386085
--- /dev/null
+++ b/sql/updates/world/2012_04_26_00_world_conditions.sql
@@ -0,0 +1 @@
+UPDATE `conditions` SET `ElseGroup` = 0, `SourceGroup` = 0 WHERE `SourceEntry` IN (46485,46488) AND `ConditionValue2` = 26817;
diff --git a/src/server/scripts/Spells/spell_generic.cpp b/src/server/scripts/Spells/spell_generic.cpp
index 3f75c7d41a9..13ea2740abb 100644
--- a/src/server/scripts/Spells/spell_generic.cpp
+++ b/src/server/scripts/Spells/spell_generic.cpp
@@ -2672,14 +2672,13 @@ public:
void HandleDummy(SpellEffIndex effIndex)
{
- GetCaster()->ToCreature()->DespawnOrUnsummon();
+ if (GetSpellInfo()->Effects[effIndex].Effect == SPELL_EFFECT_DUMMY || GetSpellInfo()->Effects[effIndex].Effect = SPELL_EFFECT_SCRIPT_EFFECT)
+ GetCaster()->ToCreature()->DespawnOrUnsummon();
}
void Register()
{
- OnEffectHitTarget += SpellEffectFn(spell_gen_despawn_self_SpellScript::HandleDummy, EFFECT_FIRST_FOUND, SPELL_EFFECT_DUMMY);
- OnEffectHitTarget += SpellEffectFn(spell_gen_despawn_self_SpellScript::HandleDummy, EFFECT_FIRST_FOUND, SPELL_EFFECT_SCRIPT_EFFECT);
-
+ OnEffectHitTarget += SpellEffectFn(spell_gen_despawn_self_SpellScript::HandleDummy, EFFECT_ALL, SPELL_EFFECT_ANY);
}
};