diff options
author | megamage <none@none> | 2009-08-10 15:28:49 -0500 |
---|---|---|
committer | megamage <none@none> | 2009-08-10 15:28:49 -0500 |
commit | 0ed719c558e90fe2fb9ec4c2afb2fdce758e0654 (patch) | |
tree | 374517e4edf3055cbd89b4e81fd6fe846516c690 /src | |
parent | 3b3a878199aa85647ce9d515e4ff6ebe2f71be88 (diff) |
*Fix Quest Skywing. By Farah
--HG--
branch : trunk
Diffstat (limited to 'src')
-rw-r--r-- | src/bindings/scripts/scripts/zone/terokkar_forest/terokkar_forest.cpp | 69 |
1 files changed, 67 insertions, 2 deletions
diff --git a/src/bindings/scripts/scripts/zone/terokkar_forest/terokkar_forest.cpp b/src/bindings/scripts/scripts/zone/terokkar_forest/terokkar_forest.cpp index d54db15dac5..75bc9d3045e 100644 --- a/src/bindings/scripts/scripts/zone/terokkar_forest/terokkar_forest.cpp +++ b/src/bindings/scripts/scripts/zone/terokkar_forest/terokkar_forest.cpp @@ -16,8 +16,8 @@ /* ScriptData SDName: Terokkar_Forest -SD%Complete: 80 -SDComment: Quest support: 9889, 10009, 10873, 10896, 11096, 10052, 10051. Skettis->Ogri'la Flight +SD%Complete: 85 +SDComment: Quest support: 9889, 10009, 10873, 10896, 10898, 11096, 10052, 10051. Skettis->Ogri'la Flight SDCategory: Terokkar Forest EndScriptData */ @@ -167,6 +167,66 @@ CreatureAI* GetAI_mob_infested_root_walker(Creature *_Creature) return new mob_infested_root_walkerAI (_Creature); } + +/*###### +## mob_skywing +######*/ +struct TRINITY_DLL_DECL npc_skywingAI : public npc_escortAI +{ +public: + npc_skywingAI(Creature *c) : npc_escortAI(c) {} + + void WaypointReached(uint32 i) + { + Player *pPlayer = Unit::GetPlayer(PlayerGUID); + if( !pPlayer ) + return; + + switch(i) + { + case 8: + pPlayer->AreaExploredOrEventHappens(10898); + break; + } + } + + void EnterCombat(Unit* who) {} + + void MoveInLineOfSight(Unit *who) + { + if( IsBeingEscorted ) + return; + + if( who->GetTypeId() == TYPEID_PLAYER ) + { + if( CAST_PLR(who)->GetQuestStatus(10898) == QUEST_STATUS_INCOMPLETE ) + { + float Radius = 10.0; + if( m_creature->IsWithinDistInMap(who, Radius) ) + { + Start(false, false, false, who->GetGUID()); + } + } + } + } + + void Reset() {} + + void UpdateAI(const uint32 diff) + { + npc_escortAI::UpdateAI(diff); + } +}; + +CreatureAI* GetAI_npc_skywingAI(Creature *_Creature) +{ + npc_skywingAI* skywingAI = new npc_skywingAI(_Creature); + + skywingAI->FillPointMovementListForCreature(); + + return skywingAI; +} + /*###### ## mob_rotting_forest_rager ######*/ @@ -565,5 +625,10 @@ void AddSC_terokkar_forest() newscript->pGOSelect = &GossipSelect_go_skull_pile; newscript->RegisterSelf(); + newscript = new Script; + newscript->Name="npc_skywing"; + newscript->GetAI = &GetAI_npc_skywingAI; + newscript->RegisterSelf(); + } |