mirror of
https://github.com/EQEmu/Server.git
synced 2025-12-13 10:31:29 +00:00
Fix CheckFlee logic
This /should/ be correct. But it doesn't explain other issues we've seen on some servers
This commit is contained in:
parent
40595de46b
commit
a94072e3ea
@ -108,8 +108,12 @@ void Mob::CheckFlee() {
|
||||
}
|
||||
|
||||
// If we got here we are allowed to roll on flee chance if there is not other hated NPC's in the area.
|
||||
|
||||
if(RuleB(Combat, FleeIfNotAlone) || GetSpecialAbility(ALWAYS_FLEE) || zone->random.Roll(flee_chance) && entity_list.GetHatedCount(hate_top, this, true) == 0) {
|
||||
// ALWAYS_FLEE, skip roll
|
||||
// if FleeIfNotAlone is true, we skip alone check
|
||||
// roll chance
|
||||
if (GetSpecialAbility(ALWAYS_FLEE) ||
|
||||
((RuleB(Combat, FleeIfNotAlone) || entity_list.GetHatedCount(hate_top, this, true) == 0) &&
|
||||
zone->random.Roll(flee_chance))) {
|
||||
currently_fleeing = true;
|
||||
StartFleeing();
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user