mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-17 10:55:43 +00:00
fix(Scripts/TempleOfAhnQiraj): Fix Twin Emperor's critters aggroing p… (#13365)
…layers randomly
This commit is contained in:
@@ -445,6 +445,19 @@ struct npc_ahnqiraji_critter : public ScriptedAI
|
||||
me->RestoreFaction();
|
||||
|
||||
_scheduler.CancelAll();
|
||||
|
||||
// Don't attack nearby players randomly if they are the Twin's pet bugs.
|
||||
if (CreatureData const* crData = me->GetCreatureData())
|
||||
{
|
||||
ObjectGuid dbtableHighGuid = ObjectGuid::Create<HighGuid::Unit>(crData->id1, me->GetSpawnId());
|
||||
ObjectGuid targetGuid = sObjectMgr->GetLinkedRespawnGuid(dbtableHighGuid);
|
||||
|
||||
if (targetGuid.GetEntry() == NPC_VEKLOR)
|
||||
{
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
_scheduler.Schedule(100ms, [this](TaskContext context)
|
||||
{
|
||||
if (Player* player = me->SelectNearestPlayer(10.f))
|
||||
|
||||
Reference in New Issue
Block a user