mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-24 14:16:31 +00:00
fix(Scripts/HellfirePeninsula): fix quest 9410 a spirit guide (#17925)
This commit is contained in:
@@ -158,8 +158,8 @@ enum AncestralWolf
|
||||
{
|
||||
EMOTE_WOLF_LIFT_HEAD = 0,
|
||||
EMOTE_WOLF_HOWL = 1,
|
||||
SAY_WOLF_WELCOME = 2,
|
||||
SPELL_ANCESTRAL_WOLF_BUFF = 29981,
|
||||
SAY_WOLF_WELCOME = 0,
|
||||
SPELL_GUIDED_BY_THE_SPIRITS = 29938,
|
||||
NPC_RYGA = 17123
|
||||
};
|
||||
|
||||
@@ -173,18 +173,19 @@ public:
|
||||
npc_ancestral_wolfAI(Creature* creature) : npc_escortAI(creature)
|
||||
{
|
||||
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
|
||||
{
|
||||
ryga = nullptr;
|
||||
me->CastSpell(me, SPELL_ANCESTRAL_WOLF_BUFF, false);
|
||||
me->SetReactState(REACT_PASSIVE);
|
||||
}
|
||||
|
||||
void MoveInLineOfSight(Unit* who) override
|
||||
|
||||
{
|
||||
if (!ryga && who->GetEntry() == NPC_RYGA && me->IsWithinDistInMap(who, 15.0f))
|
||||
if (Creature* temp = who->ToCreature())
|
||||
@@ -195,7 +196,6 @@ public:
|
||||
|
||||
void WaypointReached(uint32 waypointId) override
|
||||
{
|
||||
me->CastSpell(me, SPELL_ANCESTRAL_WOLF_BUFF, false);
|
||||
switch (waypointId)
|
||||
{
|
||||
case 0:
|
||||
@@ -205,8 +205,51 @@ public:
|
||||
Talk(EMOTE_WOLF_HOWL);
|
||||
break;
|
||||
case 50:
|
||||
if (ryga && ryga->IsAlive() && !ryga->IsInCombat())
|
||||
ryga->AI()->Talk(SAY_WOLF_WELCOME);
|
||||
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);
|
||||
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;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user