aboutsummaryrefslogtreecommitdiff
path: root/src/server/scripts/Spells
diff options
context:
space:
mode:
authorQAston <qaston@gmail.com>2011-09-03 16:43:15 +0200
committerQAston <qaston@gmail.com>2011-09-03 16:44:05 +0200
commit7871ead79835761584ee0f8faee58ae5c9a3001b (patch)
tree9e156705561b6b5257986b99fc19933854d9823b /src/server/scripts/Spells
parent414f048bd5c2ac5b840ed2bfe1c9345d24e2ff8f (diff)
Merge pull request 'Fix quest New Recruit(13143) & Fix quest King of the Mountain(13280&13283)' from Kiperr/TrinityCore
Diffstat (limited to 'src/server/scripts/Spells')
-rw-r--r--src/server/scripts/Spells/spell_quest.cpp40
1 files changed, 40 insertions, 0 deletions
diff --git a/src/server/scripts/Spells/spell_quest.cpp b/src/server/scripts/Spells/spell_quest.cpp
index ae8069747e3..a9ffe2e0f47 100644
--- a/src/server/scripts/Spells/spell_quest.cpp
+++ b/src/server/scripts/Spells/spell_quest.cpp
@@ -22,6 +22,7 @@
*/
#include "ScriptPCH.h"
+#include "Vehicle.h"
class spell_generic_quest_update_entry_SpellScript : public SpellScript
{
@@ -939,6 +940,44 @@ class spell_q12805_lifeblood_dummy : public SpellScriptLoader
};
};
+/*
+ http://www.wowhead.com/quest=13283 King of the Mountain
+ http://www.wowhead.com/quest=13280 King of the Mountain
+ 59643 Plant Horde Battle Standard
+ 4338 Plant Alliance Battle Standard
+ */
+enum eBattleStandard
+{
+ NPC_KING_OF_THE_MOUNTAINT_KC = 31766,
+};
+class spell_q13280_13283_plant_battle_standard: public SpellScriptLoader
+{
+public:
+ spell_q13280_13283_plant_battle_standard() : SpellScriptLoader("spell_q13280_13283_plant_battle_standard") { }
+
+ class spell_q13280_13283_plant_battle_standard_SpellScript : public SpellScript
+ {
+ PrepareSpellScript(spell_q13280_13283_plant_battle_standard_SpellScript)
+ void HandleDummy(SpellEffIndex /*effIndex*/)
+ {
+ Unit* caster = GetCaster();
+ if (caster->IsVehicle())
+ if (Unit* player = caster->GetVehicleKit()->GetPassenger(0))
+ player->ToPlayer()->KilledMonsterCredit(NPC_KING_OF_THE_MOUNTAINT_KC,0);
+ }
+
+ void Register()
+ {
+ OnEffect += SpellEffectFn(spell_q13280_13283_plant_battle_standard_SpellScript::HandleDummy, EFFECT_0, SPELL_EFFECT_DUMMY);
+ }
+ };
+
+ SpellScript* GetSpellScript() const
+ {
+ return new spell_q13280_13283_plant_battle_standard_SpellScript();
+ }
+};
+
void AddSC_quest_spell_scripts()
{
new spell_q55_sacred_cleansing();
@@ -961,4 +1000,5 @@ void AddSC_quest_spell_scripts()
new spell_q12659_ahunaes_knife();
new spell_q9874_liquid_fire();
new spell_q12805_lifeblood_dummy();
+ new spell_q13280_13283_plant_battle_standard();
}