mirror of
https://github.com/EQEmu/Server.git
synced 2025-12-14 03:11:28 +00:00
[Commands] Cleanup #interrupt Command (#3044)
* [Commands] Cleanup #interrupt Command # Notes - Cleanup messages and logic. * Update command.cpp
This commit is contained in:
parent
8393e50aa8
commit
457e800c73
@ -188,7 +188,7 @@ int command_init(void)
|
|||||||
command_add("incstat", "Increases or Decreases a client's stats permanently.", AccountStatus::GMMgmt, command_incstat) ||
|
command_add("incstat", "Increases or Decreases a client's stats permanently.", AccountStatus::GMMgmt, command_incstat) ||
|
||||||
command_add("instance", "Modify Instances", AccountStatus::GMMgmt, command_instance) ||
|
command_add("instance", "Modify Instances", AccountStatus::GMMgmt, command_instance) ||
|
||||||
command_add("interrogateinv", "use [help] argument for available options", AccountStatus::Player, command_interrogateinv) ||
|
command_add("interrogateinv", "use [help] argument for available options", AccountStatus::Player, command_interrogateinv) ||
|
||||||
command_add("interrupt", "[message id] [color] - Interrupt your casting. Arguments are optional.", AccountStatus::Guide, command_interrupt) ||
|
command_add("interrupt", "[Message ID] [Color] - Interrupt your casting. Arguments are optional.", AccountStatus::Guide, command_interrupt) ||
|
||||||
command_add("invsnapshot", "Manipulates inventory snapshots for your current target", AccountStatus::QuestTroupe, command_invsnapshot) ||
|
command_add("invsnapshot", "Manipulates inventory snapshots for your current target", AccountStatus::QuestTroupe, command_invsnapshot) ||
|
||||||
command_add("invul", "[On|Off]] - Turn player target's or your invulnerable flag on or off", AccountStatus::QuestTroupe, command_invul) ||
|
command_add("invul", "[On|Off]] - Turn player target's or your invulnerable flag on or off", AccountStatus::QuestTroupe, command_invul) ||
|
||||||
command_add("ipban", "[IP] - Ban IP", AccountStatus::GMMgmt, command_ipban) ||
|
command_add("ipban", "[IP] - Ban IP", AccountStatus::GMMgmt, command_ipban) ||
|
||||||
|
|||||||
@ -2,15 +2,18 @@
|
|||||||
|
|
||||||
void command_interrupt(Client *c, const Seperator *sep)
|
void command_interrupt(Client *c, const Seperator *sep)
|
||||||
{
|
{
|
||||||
uint16 ci_message = 0x01b7, ci_color = 0x0121;
|
const auto arguments = sep->argnum;
|
||||||
|
|
||||||
if (sep->arg[1][0]) {
|
uint16 interrupt_message = 0x01b7, interrupt_color = 0x0121;
|
||||||
ci_message = Strings::ToInt(sep->arg[1]);
|
|
||||||
}
|
if (arguments >= 1 && sep->IsNumber(1)) {
|
||||||
if (sep->arg[2][0]) {
|
interrupt_message = static_cast<uint16>(Strings::ToUnsignedInt(sep->arg[1]));
|
||||||
ci_color = Strings::ToInt(sep->arg[2]);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
c->InterruptSpell(ci_message, ci_color);
|
if (arguments == 2 && sep->IsNumber(2)) {
|
||||||
|
interrupt_color = static_cast<uint16>(Strings::ToUnsignedInt(sep->arg[2]));
|
||||||
|
}
|
||||||
|
|
||||||
|
c->InterruptSpell(interrupt_message, interrupt_color);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user