mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-30 21:57:01 +01:00
Core/DB/Achievements:
- fixed arena season title achievements and rewards - added mailtemplate support for `achievement_reward` table - fixed typo in GetBattleMasterBG which causes achievement reward mail expire in 1 day Ref #8777
This commit is contained in:
@@ -277,7 +277,7 @@ public:
|
||||
|
||||
if (titleInfo && target->HasTitle(titleInfo))
|
||||
{
|
||||
std::string name = titleInfo->name[loc];
|
||||
std::string name = target->getGender() == GENDER_MALE ? titleInfo->nameMale[loc] : titleInfo->nameFemale[loc];
|
||||
if (name.empty())
|
||||
continue;
|
||||
|
||||
|
||||
@@ -1183,8 +1183,9 @@ public:
|
||||
CharTitlesEntry const* titleInfo = sCharTitlesStore.LookupEntry(id);
|
||||
if (titleInfo)
|
||||
{
|
||||
/// @todo: implement female support
|
||||
int locale = handler->GetSessionDbcLocale();
|
||||
std::string name = titleInfo->name[locale];
|
||||
std::string name = titleInfo->nameMale[locale];
|
||||
if (name.empty())
|
||||
continue;
|
||||
|
||||
@@ -1196,7 +1197,7 @@ public:
|
||||
if (locale == handler->GetSessionDbcLocale())
|
||||
continue;
|
||||
|
||||
name = titleInfo->name[locale];
|
||||
name = titleInfo->nameMale[locale];
|
||||
if (name.empty())
|
||||
continue;
|
||||
|
||||
|
||||
@@ -96,7 +96,7 @@ public:
|
||||
target->SetTitle(titleInfo); // to be sure that title now known
|
||||
target->SetUInt32Value(PLAYER_CHOSEN_TITLE, titleInfo->bit_index);
|
||||
|
||||
handler->PSendSysMessage(LANG_TITLE_CURRENT_RES, id, titleInfo->name[handler->GetSessionDbcLocale()], tNameLink.c_str());
|
||||
handler->PSendSysMessage(LANG_TITLE_CURRENT_RES, id, target->getGender() == GENDER_MALE ? titleInfo->nameMale[handler->GetSessionDbcLocale()] : titleInfo->nameFemale[handler->GetSessionDbcLocale()], tNameLink.c_str());
|
||||
|
||||
return true;
|
||||
}
|
||||
@@ -139,7 +139,7 @@ public:
|
||||
std::string tNameLink = handler->GetNameLink(target);
|
||||
|
||||
char titleNameStr[80];
|
||||
snprintf(titleNameStr, 80, titleInfo->name[handler->GetSessionDbcLocale()], target->GetName().c_str());
|
||||
snprintf(titleNameStr, 80, target->getGender() == GENDER_MALE ? titleInfo->nameMale[handler->GetSessionDbcLocale()] : titleInfo->nameFemale[handler->GetSessionDbcLocale()], target->GetName().c_str());
|
||||
|
||||
target->SetTitle(titleInfo);
|
||||
handler->PSendSysMessage(LANG_TITLE_ADD_RES, id, titleNameStr, tNameLink.c_str());
|
||||
@@ -187,7 +187,7 @@ public:
|
||||
std::string tNameLink = handler->GetNameLink(target);
|
||||
|
||||
char titleNameStr[80];
|
||||
snprintf(titleNameStr, 80, titleInfo->name[handler->GetSessionDbcLocale()], target->GetName().c_str());
|
||||
snprintf(titleNameStr, 80, target->getGender() == GENDER_MALE ? titleInfo->nameMale[handler->GetSessionDbcLocale()] : titleInfo->nameFemale[handler->GetSessionDbcLocale()], target->GetName().c_str());
|
||||
|
||||
handler->PSendSysMessage(LANG_TITLE_REMOVE_RES, id, titleNameStr, tNameLink.c_str());
|
||||
|
||||
|
||||
Reference in New Issue
Block a user