1
0

Make sure a spawn that is available gets locked into the encounter if the encounter size is 0.

This commit is contained in:
Emagi 2025-05-30 10:27:34 -04:00
parent cde778bb1a
commit 80f56f68c4

View File

@ -1342,7 +1342,7 @@ void Entity::AddHate(Entity* attacker, sint32 hate) {
((NPC*)this)->Brain()->AddHate(attacker, hate);
int8 loot_state = ((NPC*)this)->GetLockedNoLoot();
// if encounter size is 0 then add the attacker to the encounter
if ((loot_state != ENCOUNTER_STATE_AVAILABLE && loot_state != ENCOUNTER_STATE_BROKEN && ((NPC*)this)->Brain()->GetEncounterSize() == 0)) {
if ((loot_state != ENCOUNTER_STATE_BROKEN && ((NPC*)this)->Brain()->GetEncounterSize() == 0)) {
((NPC*)this)->Brain()->AddToEncounter(attacker);
AddTargetToEncounter(attacker);
}