[NPCs] Convert Load of NPC Emotes to Repositories (#3954)

* [NPCs] Convert Load of NPC Emotes to Repositories

- Convert `LoadNPCEmotes()` to repositories.

* Cleanup
This commit is contained in:
Alex King
2024-01-13 00:33:11 -05:00
committed by GitHub
parent 4c028b85f0
commit fc627ed52d
11 changed files with 112 additions and 90 deletions
+2 -5
View File
@@ -6203,10 +6203,7 @@ void Client::CheckLDoNHail(NPC* n)
void Client::CheckEmoteHail(NPC* n, const char* message)
{
if (
!Strings::BeginsWith(message, "hail") &&
!Strings::BeginsWith(message, "Hail")
) {
if (!Strings::BeginsWith(Strings::ToLower(message), "hail")) {
return;
}
@@ -6214,7 +6211,7 @@ void Client::CheckEmoteHail(NPC* n, const char* message)
return;
}
const auto emote_id = n->GetEmoteID();
const uint32 emote_id = n->GetEmoteID();
if (emote_id) {
n->DoNPCEmote(EQ::constants::EmoteEventTypes::Hailed, emote_id, this);
}