[Commands] Cleanup #emotesearch and #emoteview Command. (#2494)

* [Commands] Cleanup #emoteview Command.

Cleanup command messages and logic.

Add constants for Emote Events and Emote Types and replace all the old constants with the new constants.

* Update emoteview.cpp

* Cleanup #emotesearch Command.
This commit is contained in:
Kinglykrab
2022-10-29 21:22:17 -04:00
committed by GitHub
parent dcbc9a358f
commit 53dcd14534
11 changed files with 266 additions and 109 deletions
+2 -2
View File
@@ -1925,7 +1925,7 @@ void Mob::AI_Event_Engaged(Mob *attacker, bool yell_for_help)
parse->EventNPC(EVENT_COMBAT, CastToNPC(), attacker, "1", 0);
uint32 emoteid = GetEmoteID();
if (emoteid != 0) {
CastToNPC()->DoNPCEmote(ENTERCOMBAT, emoteid);
CastToNPC()->DoNPCEmote(EQ::constants::EmoteEventTypes::EnterCombat, emoteid);
}
std::string mob_name = GetCleanName();
combat_record.Start(mob_name);
@@ -1958,7 +1958,7 @@ void Mob::AI_Event_NoLongerEngaged() {
uint32 emoteid = CastToNPC()->GetEmoteID();
parse->EventNPC(EVENT_COMBAT, CastToNPC(), nullptr, "0", 0);
if (emoteid != 0) {
CastToNPC()->DoNPCEmote(LEAVECOMBAT, emoteid);
CastToNPC()->DoNPCEmote(EQ::constants::EmoteEventTypes::LeaveCombat, emoteid);
}
combat_record.Stop();
CastToNPC()->SetCombatEvent(false);