mirror of
https://github.com/EQEmu/Server.git
synced 2026-05-16 22:58:34 +00:00
+15
-2
@@ -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)
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user