fix(Scripts/TempleOfAhnQiraj): Fix Twin Emperor's critters aggroing p… (#13365)
…layers randomly
This commit is contained in:
parent
4cf0906a91
commit
0cb13b1242
1 changed files with 13 additions and 0 deletions
|
|
@ -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))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue