Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- From 9ae0b72bee006b971cac9a9f81118caa52cbdf6b Mon Sep 17 00:00:00 2001
- From: unknown <cristi@cristis-PC.(none)>
- Date: Sat, 14 Jul 2012 15:25:22 +0300
- Subject: [PATCH] Fix for quests BombThemAgain/Bombing Run
- ---
- .../scripts/Outland/blades_edge_mountains.cpp | 69 +++++++++++++++++++-
- 1 file changed, 68 insertions(+), 1 deletion(-)
- diff --git a/src/server/scripts/Outland/blades_edge_mountains.cpp b/src/server/scripts/Outland/blades_edge_mountains.cpp
- index c46757a..2204c7a 100644
- --- a/src/server/scripts/Outland/blades_edge_mountains.cpp
- +++ b/src/server/scripts/Outland/blades_edge_mountains.cpp
- @@ -1124,7 +1124,6 @@ class go_apexis_relic : public GameObjectScript
- if (player->HasItemCount(ITEM_APEXIS_SHARD, large ? 35 : 1))
- {
- player->CastSpell(player, large ? SPELL_TAKE_REAGENTS_GROUP : SPELL_TAKE_REAGENTS_SOLO, false);
- -
- if (Creature* bunny = player->SummonCreature(NPC_SIMON_BUNNY, go->GetPositionX(), go->GetPositionY(), go->GetPositionZ()))
- bunny->AI()->SetGUID(player->GetGUID(), large);
- }
- @@ -1133,6 +1132,73 @@ class go_apexis_relic : public GameObjectScript
- }
- };
- +/*#########
- +### Support for quests Bombing Run/Bomb them again
- +###############*/
- +
- +#define FEL_CANONBALL 185861
- +#define SPELL_THROW_BOMB 40160
- +
- +#define QUEST_BOMBING_RUN_A 11102
- +#define QUEST_BOMBING_RUN_H 11010
- +#define QUEST_BOMB_THEM_AGAIN 11023
- +
- +#define QUEST_CREDIT 23118
- +
- +#define ZONE_FORGE_CAMP 3785
- +
- +class spell_throw_bomb : public SpellScriptLoader
- +{
- +public:
- + spell_throw_bomb() : SpellScriptLoader("spell_throw_bomb") {}
- +
- + class spell_throw_bomb_SpellScript : public SpellScript
- + {
- + PrepareSpellScript(spell_throw_bomb_SpellScript)
- +
- + bool Validate(SpellInfo const* /*spell*/)
- + {
- + if (!sSpellMgr->GetSpellInfo(SPELL_THROW_BOMB))
- + return false;
- + return true;
- + }
- +
- + SpellCastResult CheckIfInZone()
- + {
- + Unit* caster = GetCaster();
- +
- + if(caster->GetAreaId()==ZONE_FORGE_CAMP)
- + return SPELL_CAST_OK;
- + else
- + return SPELL_FAILED_CANT_DO_THAT_RIGHT_NOW;
- + }
- +
- + void HandleBombEffect(SpellEffIndex effIndex)
- + {
- + Unit* caster = GetCaster();
- + Player* player = caster->ToPlayer();
- +
- + if (player && (player->GetQuestStatus(QUEST_BOMBING_RUN_A)==QUEST_STATUS_INCOMPLETE
- + || player->GetQuestStatus(QUEST_BOMBING_RUN_H)==QUEST_STATUS_INCOMPLETE
- + || player->GetQuestStatus(QUEST_BOMB_THEM_AGAIN)==QUEST_STATUS_INCOMPLETE))
- + player->KilledMonsterCredit(QUEST_CREDIT,0);
- + }
- +
- + void Register()
- + {
- + OnCheckCast += SpellCheckCastFn(spell_throw_bomb_SpellScript::CheckIfInZone);
- + OnEffectHit += SpellEffectFn(spell_throw_bomb_SpellScript::HandleBombEffect, EFFECT_0, SPELL_EFFECT_DUMMY);
- + }
- +
- + };
- +
- + SpellScript* GetSpellScript() const
- + {
- + return new spell_throw_bomb_SpellScript();
- + }
- +};
- +
- +
- void AddSC_blades_edge_mountains()
- {
- new mobs_bladespire_ogre();
- @@ -1147,4 +1213,5 @@ void AddSC_blades_edge_mountains()
- new npc_simon_bunny();
- new go_simon_cluster();
- new go_apexis_relic();
- + new spell_throw_bomb();
- }
- --
- 1.7.10.msysgit.1
Advertisement
Add Comment
Please, Sign In to add comment