fix(Scripts/HellfirePeninsula): fix quest 9410 a spirit guide (#17925)
This commit is contained in:
@@ -0,0 +1,7 @@
|
|||||||
|
-- add a time to script_waypoint
|
||||||
|
DELETE FROM `script_waypoint` WHERE `entry`=17077 AND `pointid` IN (50, 51, 52, 53);
|
||||||
|
INSERT INTO `script_waypoint` (`entry`, `pointid`, `location_x`, `location_y`, `location_z`, `waittime`, `point_comment`) VALUES
|
||||||
|
(17077, 50, 519.146, 3886.7, 190.128, 8000, 'RYGA_MOVEMENT_TO_WOLF'),
|
||||||
|
(17077, 51, 519.146, 3886.7, 190.128, 13000, 'RYGA_TIME_MOVEMENT_TO_WOLF'),
|
||||||
|
(17077, 52, 519.146, 3886.7, 190.128, 5000, 'RYGA_TIME_RETURN_SPAWN'),
|
||||||
|
(17077, 53, 519.146, 3886.7, 190.128, 50000, 'DESPAWN_WOLF');
|
||||||
@@ -158,8 +158,8 @@ enum AncestralWolf
|
|||||||
{
|
{
|
||||||
EMOTE_WOLF_LIFT_HEAD = 0,
|
EMOTE_WOLF_LIFT_HEAD = 0,
|
||||||
EMOTE_WOLF_HOWL = 1,
|
EMOTE_WOLF_HOWL = 1,
|
||||||
SAY_WOLF_WELCOME = 2,
|
SAY_WOLF_WELCOME = 0,
|
||||||
SPELL_ANCESTRAL_WOLF_BUFF = 29981,
|
SPELL_GUIDED_BY_THE_SPIRITS = 29938,
|
||||||
NPC_RYGA = 17123
|
NPC_RYGA = 17123
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -173,18 +173,19 @@ public:
|
|||||||
npc_ancestral_wolfAI(Creature* creature) : npc_escortAI(creature)
|
npc_ancestral_wolfAI(Creature* creature) : npc_escortAI(creature)
|
||||||
{
|
{
|
||||||
if (creature->GetOwner() && creature->GetOwner()->GetTypeId() == TYPEID_PLAYER)
|
if (creature->GetOwner() && creature->GetOwner()->GetTypeId() == TYPEID_PLAYER)
|
||||||
Start(false, true, creature->GetOwner()->GetGUID());
|
Start(false, false, creature->GetOwner()->GetGUID());
|
||||||
|
creature->SetSpeed(MOVE_WALK, 1.5f);
|
||||||
|
DoCast(SPELL_GUIDED_BY_THE_SPIRITS);
|
||||||
|
Reset();
|
||||||
}
|
}
|
||||||
|
|
||||||
void Reset() override
|
void Reset() override
|
||||||
{
|
{
|
||||||
ryga = nullptr;
|
ryga = nullptr;
|
||||||
me->CastSpell(me, SPELL_ANCESTRAL_WOLF_BUFF, false);
|
|
||||||
me->SetReactState(REACT_PASSIVE);
|
me->SetReactState(REACT_PASSIVE);
|
||||||
}
|
}
|
||||||
|
|
||||||
void MoveInLineOfSight(Unit* who) override
|
void MoveInLineOfSight(Unit* who) override
|
||||||
|
|
||||||
{
|
{
|
||||||
if (!ryga && who->GetEntry() == NPC_RYGA && me->IsWithinDistInMap(who, 15.0f))
|
if (!ryga && who->GetEntry() == NPC_RYGA && me->IsWithinDistInMap(who, 15.0f))
|
||||||
if (Creature* temp = who->ToCreature())
|
if (Creature* temp = who->ToCreature())
|
||||||
@@ -195,7 +196,6 @@ public:
|
|||||||
|
|
||||||
void WaypointReached(uint32 waypointId) override
|
void WaypointReached(uint32 waypointId) override
|
||||||
{
|
{
|
||||||
me->CastSpell(me, SPELL_ANCESTRAL_WOLF_BUFF, false);
|
|
||||||
switch (waypointId)
|
switch (waypointId)
|
||||||
{
|
{
|
||||||
case 0:
|
case 0:
|
||||||
@@ -205,8 +205,51 @@ public:
|
|||||||
Talk(EMOTE_WOLF_HOWL);
|
Talk(EMOTE_WOLF_HOWL);
|
||||||
break;
|
break;
|
||||||
case 50:
|
case 50:
|
||||||
if (ryga && ryga->IsAlive() && !ryga->IsInCombat())
|
if (Creature* ryga = me->FindNearestCreature(NPC_RYGA, 70))
|
||||||
|
{
|
||||||
|
if (ryga->IsAlive() && !ryga->IsInCombat())
|
||||||
|
{
|
||||||
|
ryga->SetWalk(true);
|
||||||
|
ryga->SetSpeed(MOVE_WALK, 1.0f);
|
||||||
|
ryga->GetMotionMaster()->MovePoint(0, 515.877991f, 3885.67627f, 190.470535f, true);
|
||||||
|
Reset();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case 51:
|
||||||
|
if (Creature* ryga = me->FindNearestCreature(NPC_RYGA, 70))
|
||||||
|
{
|
||||||
|
if (ryga->IsAlive() && !ryga->IsInCombat())
|
||||||
|
{
|
||||||
|
ryga->SetFacingTo(0.2602f);
|
||||||
|
ryga->SetStandState(UNIT_STAND_STATE_KNEEL);
|
||||||
ryga->AI()->Talk(SAY_WOLF_WELCOME);
|
ryga->AI()->Talk(SAY_WOLF_WELCOME);
|
||||||
|
Reset();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case 52:
|
||||||
|
if (Creature* ryga = me->FindNearestCreature(NPC_RYGA, 70))
|
||||||
|
{
|
||||||
|
if (ryga->IsAlive() && !ryga->IsInCombat())
|
||||||
|
{
|
||||||
|
ryga->SetStandState(UNIT_STAND_STATE_STAND);
|
||||||
|
ryga->SetWalk(true);
|
||||||
|
ryga->SetSpeed(MOVE_WALK, 1.0f);
|
||||||
|
ryga->GetMotionMaster()->MovePoint(0, 504.59201f, 3882.12988f, 192.156006f, true);
|
||||||
|
Reset();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case 53:
|
||||||
|
if (Creature* ryga = me->FindNearestCreature(NPC_RYGA, 70))
|
||||||
|
{
|
||||||
|
if (ryga->IsAlive() && !ryga->IsInCombat())
|
||||||
|
{
|
||||||
|
ryga->SetFacingTo(5.79449f);
|
||||||
|
Reset();
|
||||||
|
}
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user