mirror of
https://github.com/EQEmu/Server.git
synced 2025-12-15 12:31:31 +00:00
[Commands] Cleanup #heal Command. (#1717)
* [Commands] Cleanup #heal Command. - Add message. * Remove target requirement. * Add self message. * Typo.
This commit is contained in:
parent
8d9415191a
commit
110d2a0e10
@ -4366,10 +4366,20 @@ void command_nudge(Client* c, const Seperator* sep)
|
|||||||
|
|
||||||
void command_heal(Client *c, const Seperator *sep)
|
void command_heal(Client *c, const Seperator *sep)
|
||||||
{
|
{
|
||||||
if (c->GetTarget()==0)
|
auto target = c->GetTarget() ? c->GetTarget() : c;
|
||||||
c->Message(Chat::White, "Error: #Heal: No Target.");
|
target->Heal();
|
||||||
else
|
if (c != target) {
|
||||||
c->GetTarget()->Heal();
|
c->Message(
|
||||||
|
Chat::White,
|
||||||
|
fmt::format(
|
||||||
|
"Healed {} ({}) to full.",
|
||||||
|
target->GetCleanName(),
|
||||||
|
target->GetID()
|
||||||
|
).c_str()
|
||||||
|
);
|
||||||
|
} else {
|
||||||
|
c->Message(Chat::White, "Healed yourself to full.");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void command_appearance(Client *c, const Seperator *sep)
|
void command_appearance(Client *c, const Seperator *sep)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user