mirror of
https://github.com/EQEmu/Server.git
synced 2026-06-10 02:31:03 +00:00
[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:
+8
-8
@@ -788,9 +788,9 @@ void Lua_Mob::Say(const char *message) {
|
||||
self->Say(message);
|
||||
}
|
||||
|
||||
void Lua_Mob::Say(const char* message, int language) {
|
||||
void Lua_Mob::Say(const char* message, uint8 language_id) {
|
||||
Lua_Safe_Call_Void();
|
||||
entity_list.ChannelMessage(self, ChatChannel_Say, language, message); // these run through the client channels and probably shouldn't for NPCs, but oh well
|
||||
entity_list.ChannelMessage(self, ChatChannel_Say, language_id, message); // these run through the client channels and probably shouldn't for NPCs, but oh well
|
||||
}
|
||||
|
||||
void Lua_Mob::QuestSay(Lua_Client client, const char *message) {
|
||||
@@ -798,7 +798,7 @@ void Lua_Mob::QuestSay(Lua_Client client, const char *message) {
|
||||
Journal::Options journal_opts;
|
||||
journal_opts.speak_mode = Journal::SpeakMode::Say;
|
||||
journal_opts.journal_mode = RuleB(NPC, EnableNPCQuestJournal) ? Journal::Mode::Log2 : Journal::Mode::None;
|
||||
journal_opts.language = 0;
|
||||
journal_opts.language = Language::CommonTongue;
|
||||
journal_opts.message_type = Chat::NPCQuestSay;
|
||||
journal_opts.target_spawn_id = 0;
|
||||
self->QuestJournalledSay(client, message, journal_opts);
|
||||
@@ -811,7 +811,7 @@ void Lua_Mob::QuestSay(Lua_Client client, const char *message, luabind::adl::obj
|
||||
// defaults
|
||||
journal_opts.speak_mode = Journal::SpeakMode::Say;
|
||||
journal_opts.journal_mode = Journal::Mode::Log2;
|
||||
journal_opts.language = 0;
|
||||
journal_opts.language = Language::CommonTongue;
|
||||
journal_opts.message_type = Chat::NPCQuestSay;
|
||||
journal_opts.target_spawn_id = 0;
|
||||
|
||||
@@ -861,9 +861,9 @@ void Lua_Mob::Shout(const char *message) {
|
||||
self->Shout(message);
|
||||
}
|
||||
|
||||
void Lua_Mob::Shout(const char* message, int language) {
|
||||
void Lua_Mob::Shout(const char* message, uint8 language_id) {
|
||||
Lua_Safe_Call_Void();
|
||||
entity_list.ChannelMessage(self, ChatChannel_Shout, language, message);
|
||||
entity_list.ChannelMessage(self, ChatChannel_Shout, language_id, message);
|
||||
}
|
||||
|
||||
void Lua_Mob::Emote(const char *message) {
|
||||
@@ -3638,7 +3638,7 @@ luabind::scope lua_register_mob() {
|
||||
.def("ResumeTimer", &Lua_Mob::ResumeTimer)
|
||||
.def("RunTo", (void(Lua_Mob::*)(double, double, double))&Lua_Mob::RunTo)
|
||||
.def("Say", (void(Lua_Mob::*)(const char*))& Lua_Mob::Say)
|
||||
.def("Say", (void(Lua_Mob::*)(const char*, int))& Lua_Mob::Say)
|
||||
.def("Say", (void(Lua_Mob::*)(const char*, uint8))& Lua_Mob::Say)
|
||||
.def("SeeHide", (bool(Lua_Mob::*)(void))&Lua_Mob::SeeHide)
|
||||
.def("SeeImprovedHide", (bool(Lua_Mob::*)(bool))&Lua_Mob::SeeImprovedHide)
|
||||
.def("SeeInvisible", (uint8(Lua_Mob::*)(void))&Lua_Mob::SeeInvisible)
|
||||
@@ -3705,7 +3705,7 @@ luabind::scope lua_register_mob() {
|
||||
.def("StopAllTimers", &Lua_Mob::StopAllTimers)
|
||||
.def("StopTimer", &Lua_Mob::StopTimer)
|
||||
.def("Shout", (void(Lua_Mob::*)(const char*))& Lua_Mob::Shout)
|
||||
.def("Shout", (void(Lua_Mob::*)(const char*, int))& Lua_Mob::Shout)
|
||||
.def("Shout", (void(Lua_Mob::*)(const char*, uint8))& Lua_Mob::Shout)
|
||||
.def("Signal", (void(Lua_Mob::*)(int))&Lua_Mob::Signal)
|
||||
.def("SpellEffect", &Lua_Mob::SpellEffect)
|
||||
.def("SpellFinished", (bool(Lua_Mob::*)(int,Lua_Mob))&Lua_Mob::SpellFinished)
|
||||
|
||||
Reference in New Issue
Block a user