aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormegamage <none@none>2009-08-10 15:28:49 -0500
committermegamage <none@none>2009-08-10 15:28:49 -0500
commit0ed719c558e90fe2fb9ec4c2afb2fdce758e0654 (patch)
tree374517e4edf3055cbd89b4e81fd6fe846516c690
parent3b3a878199aa85647ce9d515e4ff6ebe2f71be88 (diff)
*Fix Quest Skywing. By Farah
--HG-- branch : trunk
-rw-r--r--sql/FULL/world_script_waypoints.sql10
-rw-r--r--sql/FULL/world_scripts_full.sql1
-rw-r--r--sql/updates/4872_world_scripts.sql10
-rw-r--r--src/bindings/scripts/scripts/zone/terokkar_forest/terokkar_forest.cpp69
4 files changed, 88 insertions, 2 deletions
diff --git a/sql/FULL/world_script_waypoints.sql b/sql/FULL/world_script_waypoints.sql
index 662efe7c30d..4bee03e175b 100644
--- a/sql/FULL/world_script_waypoints.sql
+++ b/sql/FULL/world_script_waypoints.sql
@@ -780,3 +780,13 @@ INSERT INTO `script_waypoint` VALUES
(3678, 24, 114.777, 237.155, -96.0304, 2500, 'NARALEX_EVENT_FINISHED');
/* EOF */
+
+insert into `script_waypoint` (`entry`, `pointid`, `location_x`, `location_y`, `location_z`, `waittime`, `point_comment`) values('22424','0','-3605.719971','4175.580078','-0.031817','0','START_SKYWING');
+insert into `script_waypoint` (`entry`, `pointid`, `location_x`, `location_y`, `location_z`, `waittime`, `point_comment`) values('22424','1','-3602.311279','4253.213867','0.562436','0','');
+insert into `script_waypoint` (`entry`, `pointid`, `location_x`, `location_y`, `location_z`, `waittime`, `point_comment`) values('22424','2','-3529.151367','4263.524414','-7.871151','0','');
+insert into `script_waypoint` (`entry`, `pointid`, `location_x`, `location_y`, `location_z`, `waittime`, `point_comment`) values('22424','3','-3448.130371','4257.990723','-11.626289','0','');
+insert into `script_waypoint` (`entry`, `pointid`, `location_x`, `location_y`, `location_z`, `waittime`, `point_comment`) values('22424','4','-3377.783936','4209.064941','-9.476727','0','');
+insert into `script_waypoint` (`entry`, `pointid`, `location_x`, `location_y`, `location_z`, `waittime`, `point_comment`) values('22424','5','-3378.211426','4154.628418','0.366330','0','');
+insert into `script_waypoint` (`entry`, `pointid`, `location_x`, `location_y`, `location_z`, `waittime`, `point_comment`) values('22424','6','-3376.920166','4085.501709','14.178538','0','');
+insert into `script_waypoint` (`entry`, `pointid`, `location_x`, `location_y`, `location_z`, `waittime`, `point_comment`) values('22424','7','-3399.274658','4055.948975','18.603474','0','');
+insert into `script_waypoint` (`entry`, `pointid`, `location_x`, `location_y`, `location_z`, `waittime`, `point_comment`) values('22424','8','-3432.678223','4054.069824','29.588032','10000',''); \ No newline at end of file
diff --git a/sql/FULL/world_scripts_full.sql b/sql/FULL/world_scripts_full.sql
index 943275f0f1a..79a6f5b3122 100644
--- a/sql/FULL/world_scripts_full.sql
+++ b/sql/FULL/world_scripts_full.sql
@@ -1165,4 +1165,5 @@ INSERT INTO `creature_ai_scripts` VALUES
UPDATE creature_template set ScriptName = 'boss_bjarngrim' where entry =28586;
UPDATE creature_template set ScriptName = 'mob_stormforged_lieutenant' where entry =29240;
+UPDATE `creature_template` SET `ScriptName` = npc_skywing WHERE `entry` = 22424; -- script quest Skywing
diff --git a/sql/updates/4872_world_scripts.sql b/sql/updates/4872_world_scripts.sql
new file mode 100644
index 00000000000..bd1ebf44051
--- /dev/null
+++ b/sql/updates/4872_world_scripts.sql
@@ -0,0 +1,10 @@
+UPDATE `creature_template` SET `ScriptName` = npc_skywing WHERE `entry` = 22424; -- script quest Skywing
+insert into `script_waypoint` (`entry`, `pointid`, `location_x`, `location_y`, `location_z`, `waittime`, `point_comment`) values('22424','0','-3605.719971','4175.580078','-0.031817','0','START_SKYWING');
+insert into `script_waypoint` (`entry`, `pointid`, `location_x`, `location_y`, `location_z`, `waittime`, `point_comment`) values('22424','1','-3602.311279','4253.213867','0.562436','0','');
+insert into `script_waypoint` (`entry`, `pointid`, `location_x`, `location_y`, `location_z`, `waittime`, `point_comment`) values('22424','2','-3529.151367','4263.524414','-7.871151','0','');
+insert into `script_waypoint` (`entry`, `pointid`, `location_x`, `location_y`, `location_z`, `waittime`, `point_comment`) values('22424','3','-3448.130371','4257.990723','-11.626289','0','');
+insert into `script_waypoint` (`entry`, `pointid`, `location_x`, `location_y`, `location_z`, `waittime`, `point_comment`) values('22424','4','-3377.783936','4209.064941','-9.476727','0','');
+insert into `script_waypoint` (`entry`, `pointid`, `location_x`, `location_y`, `location_z`, `waittime`, `point_comment`) values('22424','5','-3378.211426','4154.628418','0.366330','0','');
+insert into `script_waypoint` (`entry`, `pointid`, `location_x`, `location_y`, `location_z`, `waittime`, `point_comment`) values('22424','6','-3376.920166','4085.501709','14.178538','0','');
+insert into `script_waypoint` (`entry`, `pointid`, `location_x`, `location_y`, `location_z`, `waittime`, `point_comment`) values('22424','7','-3399.274658','4055.948975','18.603474','0','');
+insert into `script_waypoint` (`entry`, `pointid`, `location_x`, `location_y`, `location_z`, `waittime`, `point_comment`) values('22424','8','-3432.678223','4054.069824','29.588032','10000',''); \ No newline at end of file
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();
+
}