mirror of
https://github.com/EQEmu/Server.git
synced 2025-12-13 06:21:28 +00:00
[Commands] Cleanup #freeze and #unfreeze Commands. (#2102)
- Cleanup messages and logic. - Remove the ability to #freeze yourself.
This commit is contained in:
parent
e08afb1234
commit
35044becc1
@ -2,11 +2,15 @@
|
||||
|
||||
void command_freeze(Client *c, const Seperator *sep)
|
||||
{
|
||||
if (c->GetTarget() != 0) {
|
||||
c->GetTarget()->SendAppearancePacket(AT_Anim, ANIM_FREEZE);
|
||||
}
|
||||
else {
|
||||
c->Message(Chat::White, "ERROR: Freeze requires a target.");
|
||||
if (c->GetTarget()) {
|
||||
auto target = c->GetTarget();
|
||||
if (target != c) {
|
||||
target->SendAppearancePacket(AT_Anim, ANIM_FREEZE);
|
||||
} else {
|
||||
c->Message(Chat::White, "You cannot freeze yourself.");
|
||||
}
|
||||
} else {
|
||||
c->Message(Chat::White, "You must have a target to use this command.");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -2,11 +2,11 @@
|
||||
|
||||
void command_unfreeze(Client *c, const Seperator *sep)
|
||||
{
|
||||
if (c->GetTarget() != 0) {
|
||||
c->GetTarget()->SendAppearancePacket(AT_Anim, ANIM_STAND);
|
||||
}
|
||||
else {
|
||||
c->Message(Chat::White, "ERROR: Unfreeze requires a target.");
|
||||
if (!c->GetTarget()) {
|
||||
c->Message(Chat::White, "You must have a target to use this command.");
|
||||
return;
|
||||
}
|
||||
|
||||
c->GetTarget()->SendAppearancePacket(AT_Anim, ANIM_STAND);
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user