mirror of
https://github.com/EQEmu/Server.git
synced 2025-12-12 22:01:30 +00:00
- Add #sethp [Health] command to set an NPC or player's health to a specified amount, or to max if the amount is greater than their max. - Cleanup #heal command message and logic.
30 lines
421 B
C++
Executable File
30 lines
421 B
C++
Executable File
#include "../client.h"
|
|
|
|
void command_heal(Client *c, const Seperator *sep)
|
|
{
|
|
Mob* target = c;
|
|
if (c->GetTarget()) {
|
|
target = c->GetTarget();
|
|
}
|
|
|
|
target->Heal();
|
|
|
|
c->Message(
|
|
Chat::White,
|
|
fmt::format(
|
|
"Set {} to full Health ({}).",
|
|
(
|
|
c == target ?
|
|
"yourself" :
|
|
fmt::format(
|
|
"{} ({})",
|
|
target->GetCleanName(),
|
|
target->GetID()
|
|
)
|
|
),
|
|
target->GetMaxHP()
|
|
).c_str()
|
|
);
|
|
}
|
|
|