Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- From 4a6538a663591b1a3bc0cb7d7b56e64651f9ec76 Mon Sep 17 00:00:00 2001
- From: unknown <cristi@cristis-PC.(none)>
- Date: Mon, 16 Jul 2012 04:21:49 +0300
- Subject: [PATCH] Fix for quest Walking the Dog
- ---
- src/server/scripts/Spells/spell_generic.cpp | 78 +++++++++++++++++++++++++++
- 1 file changed, 78 insertions(+)
- diff --git a/src/server/scripts/Spells/spell_generic.cpp b/src/server/scripts/Spells/spell_generic.cpp
- index 7698b15..5ebea1f 100644
- --- a/src/server/scripts/Spells/spell_generic.cpp
- +++ b/src/server/scripts/Spells/spell_generic.cpp
- @@ -2109,6 +2109,8 @@ public:
- }
- };
- +
- +
- enum TournamentPennantSpells
- {
- SPELL_PENNANT_STORMWIND_ASPIRANT = 62595,
- @@ -2395,6 +2397,81 @@ public:
- }
- };
- +/*####
- +### Spell Feed Spawn Of Smolderos
- +### @Support for quest 25294
- +#######*/
- +
- +enum eWalkingTheDogEntries
- +{
- + SPELL_FEED_SPAWN_OF_SMOLDEROS = 74142,
- + NPC_SMOLDEROS = 39659,
- + QUEST_WALKING_THE_DOG = 25294,
- + ZONE_DARKWHISPER_GORGE = 4991,
- + QUEST_CREDIT = 39673
- +
- +};
- +
- +
- +class spell_feed_spawn_of_smolderos : public SpellScriptLoader
- +{
- +public:
- + spell_feed_spawn_of_smolderos() : SpellScriptLoader("spell_feed_spawn_of_smolderos") {}
- +
- + class spell_feed_spawn_of_smolderos_SpellScript : public SpellScript
- + {
- + PrepareSpellScript(spell_feed_spawn_of_smolderos_SpellScript)
- +
- + bool Validate(SpellInfo const * /*spellInfo*/)
- + {
- + if (!sSpellMgr->GetSpellInfo(SPELL_FEED_SPAWN_OF_SMOLDEROS))
- + return false;
- + return true;
- + }
- +
- + SpellCastResult CheckIfInZone()
- + {
- + Unit* caster = GetCaster();
- +
- + if(caster && caster->GetAreaId()==ZONE_DARKWHISPER_GORGE && SearchForSmolderos(caster))
- + return SPELL_CAST_OK;
- + else
- + return SPELL_FAILED_CANT_DO_THAT_RIGHT_NOW;
- + }
- +
- + void HandleDummy(SpellEffIndex /*effIndex*/)
- + {
- + if (Unit* caster = GetCaster())
- + if (Player* player = caster->ToPlayer())
- + {
- + player->KilledMonsterCredit(QUEST_CREDIT, 0);
- + }
- + }
- +
- + bool SearchForSmolderos(Unit* caster)
- + {
- + std::list<Creature*> lSmolderos;
- + caster->GetCreatureListWithEntryInGrid(lSmolderos,NPC_SMOLDEROS,10.0f);
- +
- + if(lSmolderos.size()>0)
- + return true;
- + else
- + return false;
- + }
- +
- + void Register()
- + {
- + OnCheckCast += SpellCheckCastFn(spell_feed_spawn_of_smolderos_SpellScript::CheckIfInZone);
- + OnEffectHit += SpellEffectFn(spell_feed_spawn_of_smolderos_SpellScript::HandleDummy, EFFECT_0, SPELL_EFFECT_DUMMY);
- + }
- + };
- +
- + SpellScript* GetSpellScript() const
- + {
- + return new spell_feed_spawn_of_smolderos_SpellScript();
- + }
- +};
- +
- void AddSC_generic_spell_scripts()
- {
- new spell_gen_absorb0_hitlimit1();
- @@ -2439,4 +2516,5 @@ void AddSC_generic_spell_scripts()
- new spell_gen_summon_tournament_mount();
- new spell_gen_on_tournament_mount();
- new spell_gen_tournament_pennant();
- + new spell_feed_spawn_of_smolderos();
- }
- --
- 1.7.10.msysgit.1
Advertisement
Add Comment
Please, Sign In to add comment