Fix invisible group mobs bug

This is a simplified adaptation of
29e7bd25a4f888e9d72fa01f84df98de79f861d1 from Retrobution.

Co-authored-by: Jade <jadeshrinemaiden@gmail.com>
This commit is contained in:
dongresource 2021-09-19 04:20:24 +02:00
parent 25ce0f6d82
commit bb4029a9bf

View File

@ -98,11 +98,17 @@ void MobAI::groupRetreat(Mob *mob) {
}
Mob* followerMob = (Mob*)NPCManager::NPCs[leadMob->groupMember[i]];
if (followerMob->state != MobState::COMBAT)
continue;
followerMob->target = nullptr;
followerMob->state = MobState::RETREAT;
clearDebuff(followerMob);
}
if (leadMob->state != MobState::COMBAT)
return;
leadMob->target = nullptr;
leadMob->state = MobState::RETREAT;
clearDebuff(leadMob);