mirror of
https://github.com/EQEmu/Server.git
synced 2026-05-16 22:58:34 +00:00
[Quest API] Add Restore Methods for Health, Mana, and Endurance to Perl/Lua (#4179)
* [Quest API] Add Restore Methods for Health, Mana, and Endurance to Perl/Lua - Add `$mob->RestoreEndurance()`. - Add `$mob->RestoreHealth()`. - Add `$mob->RestoreMana()`. - Add `mob:RestoreEndurance()`. - Add `mob:RestoreHealth()`. - Add `mob:RestoreMana()`. - Allows operators to easily restore a mob to full health, mana, or endurance. - `RestoreHealth` is just a more verbosely named `Heal`. - Convert spots in source to use these short hands instead of directly using `SetEndurance(GetMaxEndurance())`, `SetHP(GetMaxHP())`, or `SetMana(GetMaxMana())`. * Update mob.h * Update mob.h
This commit is contained in:
+2
-2
@@ -246,7 +246,7 @@ NPC::NPC(const NPCType *npc_type_data, Spawn2 *in_respawn, const glm::vec4 &posi
|
||||
charm_atk = npc_type_data->charm_atk;
|
||||
|
||||
CalcMaxMana();
|
||||
SetMana(GetMaxMana());
|
||||
RestoreMana();
|
||||
|
||||
MerchantType = npc_type_data->merchanttype;
|
||||
merchant_open = (
|
||||
@@ -448,7 +448,7 @@ NPC::NPC(const NPCType *npc_type_data, Spawn2 *in_respawn, const glm::vec4 &posi
|
||||
|
||||
npc_scale_manager->ScaleNPC(this);
|
||||
|
||||
SetMana(GetMaxMana());
|
||||
RestoreMana();
|
||||
|
||||
if (GetBodyType() == BT_Animal && !RuleB(NPC, AnimalsOpenDoors)) {
|
||||
m_can_open_doors = false;
|
||||
|
||||
Reference in New Issue
Block a user