fix(Core/Battlefield): Wintergrasp out of bounds error when setting neutral faction of stalker (#21340)

This commit is contained in:
Jelle Meeus
2025-02-06 09:44:27 +01:00
committed by GitHub
parent f3c96f6452
commit 6e58645751

View File

@@ -806,7 +806,10 @@ Creature* Battlefield::SpawnCreature(uint32 entry, float x, float y, float z, fl
return nullptr;
}
creature->SetFaction(BattlefieldFactions[teamId]);
// no need to set faction for neutral team
if (teamId == TEAM_ALLIANCE || teamId == TEAM_HORDE)
creature->SetFaction(BattlefieldFactions[teamId]);
creature->SetHomePosition(x, y, z, o);
// force using DB speeds -- do we really need this?