mirror of
https://github.com/EQEmu/Server.git
synced 2026-02-16 17:02:28 +00:00
commit
2db47adf7b
@ -526,6 +526,7 @@ RULE_INT(NPC, NPCGatePercent, 20, "% at which the NPC Will attempt to gate at")
|
||||
RULE_BOOL(NPC, NPCGateNearBind, false, "Will NPC attempt to gate when near bind location?")
|
||||
RULE_INT(NPC, NPCGateDistanceBind, 75, "Distance from bind before NPC will attempt to gate")
|
||||
RULE_BOOL(NPC, NPCHealOnGate, true, "Will the NPC Heal on Gate")
|
||||
RULE_BOOL(NPC, UseMeditateBasedManaRegen, false, "Based NPC ooc regen on Meditate skill")
|
||||
RULE_REAL(NPC, NPCHealOnGateAmount, 25, "How much the npc will heal on gate if enabled")
|
||||
RULE_CATEGORY_END()
|
||||
|
||||
|
||||
17
zone/npc.cpp
17
zone/npc.cpp
@ -778,7 +778,20 @@ bool NPC::Process()
|
||||
}
|
||||
|
||||
if (GetMana() < GetMaxMana()) {
|
||||
SetMana(GetMana() + mana_regen + npc_sitting_regen_bonus);
|
||||
if (RuleB(NPC, UseMeditateBasedManaRegen)) {
|
||||
int32 npc_idle_mana_regen_bonus = 2;
|
||||
uint16 meditate_skill = GetSkill(EQEmu::skills::SkillMeditate);
|
||||
if (!IsEngaged() && meditate_skill > 0) {
|
||||
uint8 clevel = GetLevel();
|
||||
npc_idle_mana_regen_bonus =
|
||||
(((meditate_skill / 10) +
|
||||
(clevel - (clevel / 4))) / 4) + 4;
|
||||
}
|
||||
SetMana(GetMana() + mana_regen + npc_idle_mana_regen_bonus);
|
||||
}
|
||||
else {
|
||||
SetMana(GetMana() + mana_regen + npc_sitting_regen_bonus);
|
||||
}
|
||||
}
|
||||
|
||||
SendHPUpdate();
|
||||
@ -3195,4 +3208,4 @@ void NPC::AIYellForHelp(Mob *sender, Mob *attacker)
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user