aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorTrista <aconstantgoal@abv.bg>2012-12-17 04:28:36 +0200
committerTrista <aconstantgoal@abv.bg>2012-12-17 04:37:27 +0200
commit48141bbfa6887095f5b4a687ca3bde516c751771 (patch)
tree03f02c3bf7de22697e396b713cf7f01df244d21b /src
parent1bd820e50f4049d08fc828a4bb6102e8b5db1db9 (diff)
Core/Quest: Song of Wind and Water
* cleanned a bit and edited old @Treak fix, credits go to him, the quest will* work 100% blizzlike when target_unit_master #8643 gets a fix for vehicle. What concerns the quest is done. I've already fixed the core kill_credit issue, but needs to be discussed. * leaving the vehicle_AI until they get integrated correctly to SAI, this can be easily converted after. Currently need to make some hacks to make it work close to good if using SAI. (specificly terrain acts weird at that place) Closes: #5424
Diffstat (limited to 'src')
-rw-r--r--src/server/scripts/Northrend/sholazar_basin.cpp57
1 files changed, 56 insertions, 1 deletions
diff --git a/src/server/scripts/Northrend/sholazar_basin.cpp b/src/server/scripts/Northrend/sholazar_basin.cpp
index c0635f897d9..46ee4e04eed 100644
--- a/src/server/scripts/Northrend/sholazar_basin.cpp
+++ b/src/server/scripts/Northrend/sholazar_basin.cpp
@@ -18,7 +18,7 @@
/* ScriptData
SDName: Sholazar_Basin
SD%Complete: 100
-SDComment: Quest support: 12570, 12573, 12621.
+SDComment: Quest support: 12570, 12573, 12621, 12726
SDCategory: Sholazar_Basin
EndScriptData */
@@ -26,6 +26,7 @@ EndScriptData */
npc_injured_rainspeaker_oracle
npc_vekjik
avatar_of_freya
+npc_haiphoon (Quest: "Song of Wind and Water")
EndContentData */
#include "ScriptMgr.h"
@@ -984,6 +985,59 @@ public:
}
};
+/*######
+## Quest: Song of Wind and Water ID: 12726
+######*/
+/*This quest precisly needs core script since battle vehicles are not well integrated with SAI,
+may be easily converted to SAI when they get.*/
+enum SongOfWindAndWater
+{
+ // Spells
+ SPELL_DEVOUR_WIND = 52862,
+ SPELL_DEVOUR_WATER = 52864,
+ // NPCs
+ NPC_HAIPHOON_WATER = 28999,
+ NPC_HAIPHOON_AIR = 28985
+};
+
+class npc_haiphoon : public CreatureScript
+{
+public:
+ npc_haiphoon() : CreatureScript("npc_haiphoon") { }
+
+ struct npc_haiphoonAI : public VehicleAI
+ {
+ npc_haiphoonAI(Creature* creature) : VehicleAI(creature) { }
+
+ void SpellHitTarget(Unit* target, SpellInfo const* spell)
+ {
+ if (target == me)
+ return;
+
+ if (spell->Id == SPELL_DEVOUR_WIND)
+ {
+ if (Player* player = me->GetCharmerOrOwnerPlayerOrPlayerItself())
+ {
+ me->UpdateEntry(NPC_HAIPHOON_AIR);
+ }
+ }
+
+ if (spell->Id == SPELL_DEVOUR_WATER)
+ {
+ if (Player* player = me->GetCharmerOrOwnerPlayerOrPlayerItself())
+ {
+ me->UpdateEntry(NPC_HAIPHOON_WATER);
+ }
+ }
+ }
+ };
+
+ CreatureAI* GetAI(Creature* creature) const
+ {
+ return new npc_haiphoonAI(creature);
+ }
+};
+
void AddSC_sholazar_basin()
{
new npc_injured_rainspeaker_oracle();
@@ -995,4 +1049,5 @@ void AddSC_sholazar_basin()
new npc_jungle_punch_target();
new spell_q12620_the_lifewarden_wrath();
new spell_q12589_shoot_rjr();
+ new npc_haiphoon();
}