*Fix Quest Skywing. By Farah

--HG--
branch : trunk
This commit is contained in:
megamage
2009-08-10 15:28:49 -05:00
parent 3b3a878199
commit 0ed719c558
4 changed files with 88 additions and 2 deletions

View File

@@ -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','');

View File

@@ -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

View File

@@ -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','');

View File

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