[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
@@ -367,7 +367,7 @@ bool Bot::BotCastSlow(Mob* tar, uint8 botLevel, uint8 botClass, BotSpell& botSpe
if (casted_spell && GetClass() != Class::Bard) {
if (raid) {
const auto msg = fmt::format("Attempting to slow {}.", tar->GetCleanName());
raid->RaidSay(msg.c_str(), GetCleanName(), 0, 100);
raid->RaidSay(msg.c_str(), GetCleanName(), Language::CommonTongue, Language::MaxValue);
} else {
BotGroupSay(
this,
@@ -1159,7 +1159,7 @@ bool Bot::BotCastHeal(Mob* tar, uint8 botLevel, uint8 botClass, BotSpell& botSpe
} else if (IsRaidGrouped()) {
uint32 r_group = raid->GetGroup(GetName());
const auto msg = fmt::format("Casting {}.", spells[botSpell.SpellId].name);
raid->RaidGroupSay(msg.c_str(), GetCleanName(), 0, 100);
raid->RaidGroupSay(msg.c_str(), GetCleanName(), Language::CommonTongue, Language::MaxValue);
std::vector<RaidMember> raid_group_members = raid->GetRaidGroupMembers(r_group);
for (const auto& rgm : raid_group_members) {
if (rgm.member && !rgm.member->qglobal) {