diff options
| author | Shauren <shauren.trinity@gmail.com> | 2020-06-27 13:33:17 +0200 |
|---|---|---|
| committer | Shauren <shauren.trinity@gmail.com> | 2020-06-27 13:33:17 +0200 |
| commit | deca201f7787f31187e2b9fab9cba7760313e786 (patch) | |
| tree | 25c2b18ccd39760e2665a99c247980b606279e63 /src/server/game/Chat/ChatLink.cpp | |
| parent | eccc015ce7c9d54cb79e113706ef028cfc34b144 (diff) | |
Core/DataStores: Simplified string memory allocation in db2 files, dropped unneccessary level of indirection
Diffstat (limited to 'src/server/game/Chat/ChatLink.cpp')
| -rw-r--r-- | src/server/game/Chat/ChatLink.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/server/game/Chat/ChatLink.cpp b/src/server/game/Chat/ChatLink.cpp index d9f28c0b987..5e17714555c 100644 --- a/src/server/game/Chat/ChatLink.cpp +++ b/src/server/game/Chat/ChatLink.cpp @@ -496,10 +496,10 @@ bool SpellChatLink::ValidateName(char* buffer, char const* context) return false; } - for (uint8 i = 0; i < TOTAL_LOCALES; ++i) + for (LocaleConstant i = LOCALE_enUS; i < TOTAL_LOCALES; i = LocaleConstant(i + 1)) { - uint32 skillLineNameLength = strlen(skillLine->DisplayName->Str[i]); - if (skillLineNameLength > 0 && strncmp(skillLine->DisplayName->Str[i], buffer, skillLineNameLength) == 0) + uint32 skillLineNameLength = strlen(skillLine->DisplayName[i]); + if (skillLineNameLength > 0 && strncmp(skillLine->DisplayName[i], buffer, skillLineNameLength) == 0) { // found the prefix, remove it to perform spellname validation below // -2 = strlen(": ") @@ -567,12 +567,12 @@ bool AchievementChatLink::ValidateName(char* buffer, char const* context) { ChatLink::ValidateName(buffer, context); - for (uint8 locale = LOCALE_enUS; locale < TOTAL_LOCALES; ++locale) + for (LocaleConstant locale = LOCALE_enUS; locale < TOTAL_LOCALES; locale = LocaleConstant(locale + 1)) { if (locale == LOCALE_none) continue; - if (strcmp(_achievement->Title->Str[locale], buffer) == 0) + if (strcmp(_achievement->Title[locale], buffer) == 0) return true; } |
