mirror of
https://github.com/EQEmu/Server.git
synced 2025-12-12 17:51:28 +00:00
[Commands] Cleanup #npcemote Command. (#2106)
* [Commands] Cleanup #npcemote Command. - Cleanup messages and logic. * Update npcemote.cpp
This commit is contained in:
parent
37fefad58e
commit
a847e461c1
@ -251,7 +251,7 @@ int command_init(void)
|
|||||||
command_add("npccast", "[targetname/entityid] [spellid] - Causes NPC target to cast spellid on targetname/entityid", AccountStatus::QuestTroupe, command_npccast) ||
|
command_add("npccast", "[targetname/entityid] [spellid] - Causes NPC target to cast spellid on targetname/entityid", AccountStatus::QuestTroupe, command_npccast) ||
|
||||||
command_add("npcedit", "[column] [value] - Mega NPC editing command", AccountStatus::GMAdmin, command_npcedit) ||
|
command_add("npcedit", "[column] [value] - Mega NPC editing command", AccountStatus::GMAdmin, command_npcedit) ||
|
||||||
command_add("npceditmass", "[name-search] [column] [value] - Mass (Zone wide) NPC data editing command", AccountStatus::GMAdmin, command_npceditmass) ||
|
command_add("npceditmass", "[name-search] [column] [value] - Mass (Zone wide) NPC data editing command", AccountStatus::GMAdmin, command_npceditmass) ||
|
||||||
command_add("npcemote", "[message] - Make your NPC target emote a message.", AccountStatus::GMLeadAdmin, command_npcemote) ||
|
command_add("npcemote", "[Message] - Make your NPC target emote a message.", AccountStatus::GMLeadAdmin, command_npcemote) ||
|
||||||
command_add("npcloot", "- Manipulate the loot an NPC is carrying. Use #npcloot help for more information.", AccountStatus::QuestTroupe, command_npcloot) ||
|
command_add("npcloot", "- Manipulate the loot an NPC is carrying. Use #npcloot help for more information.", AccountStatus::QuestTroupe, command_npcloot) ||
|
||||||
command_add("npcsay", "[Message] - Make your NPC target say a message.", AccountStatus::GMLeadAdmin, command_npcsay) ||
|
command_add("npcsay", "[Message] - Make your NPC target say a message.", AccountStatus::GMLeadAdmin, command_npcsay) ||
|
||||||
command_add("npcshout", "[Message] - Make your NPC target shout a message.", AccountStatus::GMLeadAdmin, command_npcshout) ||
|
command_add("npcshout", "[Message] - Make your NPC target shout a message.", AccountStatus::GMLeadAdmin, command_npcshout) ||
|
||||||
|
|||||||
@ -2,11 +2,18 @@
|
|||||||
|
|
||||||
void command_npcemote(Client *c, const Seperator *sep)
|
void command_npcemote(Client *c, const Seperator *sep)
|
||||||
{
|
{
|
||||||
if (c->GetTarget() && c->GetTarget()->IsNPC() && sep->arg[1][0]) {
|
if (!c->GetTarget() || !c->GetTarget()->IsNPC()) {
|
||||||
c->GetTarget()->Emote(sep->argplus[1]);
|
c->Message(Chat::White, "You must target an NPC to use this command.");
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
else {
|
|
||||||
c->Message(Chat::White, "Usage: #npcemote message (requires NPC target");
|
int arguments = sep->argnum;
|
||||||
|
if (!arguments) {
|
||||||
|
c->Message(Chat::White, "Usage: #npcemote [Message]");
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
std::string message = sep->argplus[1];
|
||||||
|
c->GetTarget()->Emote(message.c_str());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user