mirror of
https://github.com/EQEmu/Server.git
synced 2025-12-15 16:41:29 +00:00
[Commands] Cleanup #mana Command. (#1718)
* [Commands] Cleanup #mana Command. - Add message. * Add self message.
This commit is contained in:
parent
110d2a0e10
commit
f8c2e85f3e
@ -3087,14 +3087,25 @@ void command_size(Client *c, const Seperator *sep)
|
|||||||
|
|
||||||
void command_mana(Client *c, const Seperator *sep)
|
void command_mana(Client *c, const Seperator *sep)
|
||||||
{
|
{
|
||||||
Mob *t;
|
auto target = c->GetTarget() ? c->GetTarget() : c;
|
||||||
|
if(target->IsClient()) {
|
||||||
|
target->CastToClient()->SetMana(target->CastToClient()->CalcMaxMana());
|
||||||
|
} else {
|
||||||
|
target->SetMana(target->CalcMaxMana());
|
||||||
|
}
|
||||||
|
|
||||||
t = c->GetTarget() ? c->GetTarget() : c;
|
if (c != target) {
|
||||||
|
c->Message(
|
||||||
if(t->IsClient())
|
Chat::White,
|
||||||
t->CastToClient()->SetMana(t->CastToClient()->CalcMaxMana());
|
fmt::format(
|
||||||
else
|
"Set {} ({}) to full Mana.",
|
||||||
t->SetMana(t->CalcMaxMana());
|
target->GetCleanName(),
|
||||||
|
target->GetID()
|
||||||
|
).c_str()
|
||||||
|
);
|
||||||
|
} else {
|
||||||
|
c->Message(Chat::White, "Restored your Mana to full.");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void command_flymode(Client *c, const Seperator *sep)
|
void command_flymode(Client *c, const Seperator *sep)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user