feat(Core/Command): add GM spectator to allow cross-faction /follow (#22393)

This commit is contained in:
Jelle Meeus
2025-06-30 05:49:47 +02:00
committed by GitHub
parent ab5af303ab
commit 656694b383
5 changed files with 37 additions and 8 deletions

View File

@@ -20791,6 +20791,10 @@ void Unit::PatchValuesUpdate(ByteBuffer& valuesUpdateBuf, BuildValuesCachePosPoi
{
valuesUpdateBuf.put(posPointers.UnitFieldFactionTemplatePos, uint32(target->GetFaction()));
}
else if (target->IsGMSpectator() && IsControlledByPlayer())
{
valuesUpdateBuf.put(posPointers.UnitFieldFactionTemplatePos, uint32(target->GetFaction()));
}
}
sScriptMgr->OnPatchValuesUpdate(this, valuesUpdateBuf, posPointers, target);