[Languages] Cleanup language constants, use repositories (#3838)

* [Languages] Cleanup languages constants

# Notes
- Cleanup formatting and logic where necessary.
- Cleaned up constants to use a namespace with `constexpr` instead.
- Changed `LoadCharacterLanguages` to use a repository instead.

* Lua GroupMessage uint8/language_id

* Lua More uint8/language_id
This commit is contained in:
Alex King
2024-01-06 23:17:10 -05:00
committed by GitHub
parent 43c4b13978
commit 122fe398b4
34 changed files with 393 additions and 393 deletions
+2 -2
View File
@@ -1282,7 +1282,7 @@ uint16 EntityList::GetFreeID()
// if no language skill is specified, sent with 100 skill
void EntityList::ChannelMessage(Mob *from, uint8 chan_num, uint8 language, const char *message, ...)
{
ChannelMessage(from, chan_num, language, 100, message);
ChannelMessage(from, chan_num, language, Language::MaxValue, message);
}
void EntityList::ChannelMessage(Mob *from, uint8 chan_num, uint8 language,
@@ -4588,7 +4588,7 @@ void EntityList::GroupMessage(uint32 gid, const char *from, const char *message)
g = it->second->GetGroup();
if (g) {
if (g->GetID() == gid)
it->second->ChannelMessageSend(from, it->second->GetName(), ChatChannel_Group, 0, 100, message);
it->second->ChannelMessageSend(from, it->second->GetName(), ChatChannel_Group, Language::CommonTongue, Language::MaxValue, message);
}
}
++it;