diff options
author | joschiwald <joschiwald.trinity@gmail.com> | 2014-02-10 00:14:29 +0100 |
---|---|---|
committer | joschiwald <joschiwald.trinity@gmail.com> | 2014-02-10 00:14:29 +0100 |
commit | b72273014f2f290f9524a3f9b1596528773da9fb (patch) | |
tree | 8d83446e20f95378fa21788bedfc0062dc1c95b3 /src/server/scripts | |
parent | a5a6799b4e46456decbac09622f0bef0ac1976bb (diff) |
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
Diffstat (limited to 'src/server/scripts')
-rw-r--r-- | src/server/scripts/Commands/cs_character.cpp | 2 | ||||
-rw-r--r-- | src/server/scripts/Commands/cs_lookup.cpp | 5 | ||||
-rw-r--r-- | src/server/scripts/Commands/cs_titles.cpp | 6 |
3 files changed, 7 insertions, 6 deletions
diff --git a/src/server/scripts/Commands/cs_character.cpp b/src/server/scripts/Commands/cs_character.cpp index f9ef827e8c3..87bb1fefdd2 100644 --- a/src/server/scripts/Commands/cs_character.cpp +++ b/src/server/scripts/Commands/cs_character.cpp @@ -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; diff --git a/src/server/scripts/Commands/cs_lookup.cpp b/src/server/scripts/Commands/cs_lookup.cpp index f2b4f54363b..57cf2cba260 100644 --- a/src/server/scripts/Commands/cs_lookup.cpp +++ b/src/server/scripts/Commands/cs_lookup.cpp @@ -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; diff --git a/src/server/scripts/Commands/cs_titles.cpp b/src/server/scripts/Commands/cs_titles.cpp index 20bffdbb792..3d429deb3ef 100644 --- a/src/server/scripts/Commands/cs_titles.cpp +++ b/src/server/scripts/Commands/cs_titles.cpp @@ -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()); |