mirror of
https://github.com/EQEmu/Server.git
synced 2025-12-12 05:21:29 +00:00
Add a level cap to gray con flee
This commit is contained in:
parent
a1b384c254
commit
8302f7cc26
@ -419,6 +419,7 @@ RULE_BOOL(Combat, EnableFearPathing, true)
|
|||||||
RULE_REAL(Combat, FleeMultiplier, 2.0) // Determines how quickly a NPC will slow down while fleeing. Decrease multiplier to slow NPC down quicker.
|
RULE_REAL(Combat, FleeMultiplier, 2.0) // Determines how quickly a NPC will slow down while fleeing. Decrease multiplier to slow NPC down quicker.
|
||||||
RULE_BOOL(Combat, FleeGray, true) // If true FleeGrayHPRatio will be used.
|
RULE_BOOL(Combat, FleeGray, true) // If true FleeGrayHPRatio will be used.
|
||||||
RULE_INT(Combat, FleeGrayHPRatio, 50) //HP % when a Gray NPC begins to flee.
|
RULE_INT(Combat, FleeGrayHPRatio, 50) //HP % when a Gray NPC begins to flee.
|
||||||
|
RULE_INT(Combat, FleeGrayMaxLevel, 18) // NPC's above this level won't do gray/green con flee
|
||||||
RULE_INT(Combat, FleeHPRatio, 25) //HP % when a NPC begins to flee.
|
RULE_INT(Combat, FleeHPRatio, 25) //HP % when a NPC begins to flee.
|
||||||
RULE_BOOL(Combat, FleeIfNotAlone, false) // If false, mobs won't flee if other mobs are in combat with it.
|
RULE_BOOL(Combat, FleeIfNotAlone, false) // If false, mobs won't flee if other mobs are in combat with it.
|
||||||
RULE_BOOL(Combat, AdjustProcPerMinute, true)
|
RULE_BOOL(Combat, AdjustProcPerMinute, true)
|
||||||
|
|||||||
@ -62,7 +62,7 @@ void Mob::CheckFlee() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// If no special flee_percent check for Gray or Other con rates
|
// If no special flee_percent check for Gray or Other con rates
|
||||||
if(GetLevelCon(hate_top->GetLevel(), GetLevel()) == CON_GRAY && fleeratio == 0 && RuleB(Combat, FleeGray)) {
|
if(GetLevelCon(hate_top->GetLevel(), GetLevel()) == CON_GRAY && fleeratio == 0 && RuleB(Combat, FleeGray) && GetLevel() <= RuleI(Combat, FleeGrayMaxLevel)) {
|
||||||
fleeratio = RuleI(Combat, FleeGrayHPRatio);
|
fleeratio = RuleI(Combat, FleeGrayHPRatio);
|
||||||
} else if(fleeratio == 0) {
|
} else if(fleeratio == 0) {
|
||||||
fleeratio = RuleI(Combat, FleeHPRatio );
|
fleeratio = RuleI(Combat, FleeHPRatio );
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user