Script/Spell: Unlocking Zuluhed's Chains

Closes #996
This commit is contained in:
Gacko authored and Gacko committed 2013-03-13 18:45:31 +01:00
1 parent 3bc7e5a7c8
commit 9ae1ef2cf8
1 file changed
+3 -8
@@ -1891,16 +1891,11 @@ class spell_unlocking_zuluheds_chains : public SpellScriptLoader
{
PrepareSpellScript(spell_unlocking_zuluheds_chains_SpellScript);
bool Load()
{
return GetCaster()->GetTypeId() == TYPEID_PLAYER;
}
void HandleAfterHit()
{
Player* caster = GetCaster()->ToPlayer();
if (caster->GetQuestStatus(QUEST_ZULUHED) == QUEST_STATUS_INCOMPLETE)
caster->KilledMonsterCredit(NPC_KARYNAKU, 0);
if (GetCaster()->GetTypeId() == TYPEID_PLAYER)
if (Creature* karynaku = GetCaster()->FindNearestCreature(NPC_KARYNAKU, 15.0f))
GetCaster()->ToPlayer()->CastedCreatureOrGO(NPC_KARYNAKU, karynaku->GetGUID(), GetSpellInfo()->Id);
}
void Register()