mirror of
https://github.com/EQEmu/Server.git
synced 2025-12-12 01:11:29 +00:00
* [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
21 lines
322 B
C++
Executable File
21 lines
322 B
C++
Executable File
#include "../../client.h"
|
|
|
|
void SetHPFull(Client *c, const Seperator *sep)
|
|
{
|
|
Mob* t = c;
|
|
if (c->GetTarget()) {
|
|
t = c->GetTarget();
|
|
}
|
|
|
|
t->RestoreHealth();
|
|
|
|
c->Message(
|
|
Chat::White,
|
|
fmt::format(
|
|
"Set {} to full Health ({}).",
|
|
c->GetTargetDescription(t),
|
|
Strings::Commify(t->GetMaxHP())
|
|
).c_str()
|
|
);
|
|
}
|