Core/Chat: Load chat language data from db2 and implement serverside chat translations

Port From (https://github.com/TrinityCore/TrinityCore/commit/3b578fc6b95bfc812962fcef7930d8646016d184)
This commit is contained in:
hondacrx
2021-05-03 20:50:13 -04:00
parent 7b739de0e9
commit 017a25f179
11 changed files with 343 additions and 72 deletions
+2 -2
View File
@@ -106,14 +106,14 @@ namespace Game
}
// prevent talking at unknown language (cheating)
LanguageDesc langDesc = ObjectManager.GetLanguageDescByID(lang);
LanguageDesc langDesc = Global.LanguageMgr.GetLanguageDescById(lang);
if (langDesc == null)
{
SendNotification(CypherStrings.UnknownLanguage);
return;
}
if (langDesc.skill_id != 0 && !sender.HasSkill((SkillType)langDesc.skill_id))
if (langDesc.SkillId != 0 && !sender.HasSkill((SkillType)langDesc.SkillId))
{
// also check SPELL_AURA_COMPREHEND_LANGUAGE (client offers option to speak in that language)
var langAuras = sender.GetAuraEffectsByType(AuraType.ComprehendLanguage);