Core/Spells GameObjects needs to be spawned in order to be acceptable as a SpellFocus (#17594)

This commit is contained in:
Gustavo authored and Aokromes committed 2016-07-20 19:33:29 +02:00
1 parent 286e796a55
commit 0d412494ef
2 files changed
+4 -13

No files matched your search

+1 -13
View File
@@ -1080,9 +1080,7 @@ enum RedSnapperVeryTasty
ITEM_RED_SNAPPER = 23614,
SPELL_CAST_NET = 29866,
SPELL_NEW_SUMMON_TEST = 49214,
GO_SCHOOL_OF_RED_SNAPPER = 181616
SPELL_NEW_SUMMON_TEST = 49214
};
class spell_q9452_cast_net: public SpellScriptLoader
@@ -1099,15 +1097,6 @@ class spell_q9452_cast_net: public SpellScriptLoader
return GetCaster()->GetTypeId() == TYPEID_PLAYER;
}
SpellCastResult CheckCast()
{
GameObject* go = GetCaster()->FindNearestGameObject(GO_SCHOOL_OF_RED_SNAPPER, 3.0f);
if (!go || go->GetRespawnTime())
return SPELL_FAILED_REQUIRES_SPELL_FOCUS;
return SPELL_CAST_OK;
}
void HandleDummy(SpellEffIndex /*effIndex*/)
{
Player* caster = GetCaster()->ToPlayer();
@@ -1127,7 +1116,6 @@ class spell_q9452_cast_net: public SpellScriptLoader
void Register() override
{
OnCheckCast += SpellCheckCastFn(spell_q9452_cast_net_SpellScript::CheckCast);
OnEffectHit += SpellEffectFn(spell_q9452_cast_net_SpellScript::HandleDummy, EFFECT_0, SPELL_EFFECT_DUMMY);
OnEffectHitTarget += SpellEffectFn(spell_q9452_cast_net_SpellScript::HandleActiveObject, EFFECT_1, SPELL_EFFECT_ACTIVATE_OBJECT);
}