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
This commit is contained in:
Trista committed 2012-12-17 04:37:27 +02:00
1 parent 1bd820e50f
commit 48141bbfa6
2 files changed
+94 -1

No files matched your search

@@ -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();
}