mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-19 08:55:32 +01:00
Scripts/Gilneas: fixed the issue that worgen runts sometimes do not attack the player when entering the prison top
This commit is contained in:
@@ -310,11 +310,11 @@ class npc_worgen_runt : public CreatureScript
|
||||
case EVENT_JUMP_TO_PRISON:
|
||||
me->GetMotionMaster()->MoveJump(worgenRuntJumpPos[_worgenID], 16.0f, _worgenID < WORGEN_ID_CATHEDRAL_1 ? 19.2911f : frand(3.945607f, 4.852813f));
|
||||
me->SetHomePosition(worgenRuntJumpPos[_worgenID]);
|
||||
_events.ScheduleEvent(EVENT_AGGRO_PLAYER, Seconds(1));
|
||||
_events.ScheduleEvent(EVENT_AGGRO_PLAYER, Seconds(2));
|
||||
break;
|
||||
case EVENT_AGGRO_PLAYER:
|
||||
if (Unit* player = ObjectAccessor::GetPlayer(*me, _playerGuid))
|
||||
if (me->IsAIEnabled && me->IsInDist(&player->GetPosition(), 50.0f))
|
||||
if (me->IsAIEnabled && me->IsInDist(&player->GetPosition(), 100.0f))
|
||||
me->AI()->AttackStart(player);
|
||||
break;
|
||||
default:
|
||||
|
||||
Reference in New Issue
Block a user