Core/Misc: Random changes here and there to minimize differences with 4.3.4 branch
This commit is contained in:
1 parent
2251d1bfae
commit
e954498560
94 files changed
+976
-951
No files matched your search
@@ -20,6 +20,7 @@
|
||||
#include "ObjectMgr.h"
|
||||
#include "SpellInfo.h"
|
||||
#include "DBCStores.h"
|
||||
#include "AchievementMgr.h"
|
||||
|
||||
// Supported shift-links (client generated and server side)
|
||||
// |color|Hachievement:achievement_id:player_guid:0:0:0:0:0:0:0:0|h[name]|h|r
|
||||
@@ -318,17 +319,12 @@ bool SpellChatLink::ValidateName(char* buffer, const char* context)
|
||||
}
|
||||
}
|
||||
|
||||
bool res = false;
|
||||
for (uint8 i = 0; i < TOTAL_LOCALES; ++i)
|
||||
if (*_spell->SpellName[i] && strcmp(_spell->SpellName[i], buffer) == 0)
|
||||
{
|
||||
res = true;
|
||||
break;
|
||||
}
|
||||
return true;
|
||||
|
||||
if (!res)
|
||||
sLog->outTrace(LOG_FILTER_CHATSYS, "ChatHandler::isValidChatMessage('%s'): linked spell (id: %u) name wasn't found in any localization", context, _spell->Id);
|
||||
return res;
|
||||
sLog->outTrace(LOG_FILTER_CHATSYS, "ChatHandler::isValidChatMessage('%s'): linked spell (id: %u) name wasn't found in any localization", context, _spell->Id);
|
||||
return false;
|
||||
}
|
||||
|
||||
// |color|Hachievement:achievement_id:player_guid:0:0:0:0:0:0:0:0|h[name]|h|r
|
||||
@@ -345,7 +341,7 @@ bool AchievementChatLink::Initialize(std::istringstream& iss)
|
||||
return false;
|
||||
}
|
||||
// Validate achievement
|
||||
_achievement = sAchievementStore.LookupEntry(achievementId);
|
||||
_achievement = sAchievementMgr->GetAchievement(achievementId);
|
||||
if (!_achievement)
|
||||
{
|
||||
sLog->outTrace(LOG_FILTER_CHATSYS, "ChatHandler::isValidChatMessage('%s'): got invalid achivement id %u in |achievement command", iss.str().c_str(), achievementId);
|
||||
@@ -380,17 +376,12 @@ bool AchievementChatLink::ValidateName(char* buffer, const char* context)
|
||||
{
|
||||
ChatLink::ValidateName(buffer, context);
|
||||
|
||||
bool res = false;
|
||||
for (uint8 i = 0; i < TOTAL_LOCALES; ++i)
|
||||
if (*_achievement->name[i] && strcmp(_achievement->name[i], buffer) == 0)
|
||||
{
|
||||
res = true;
|
||||
break;
|
||||
}
|
||||
return true;
|
||||
|
||||
if (!res)
|
||||
sLog->outTrace(LOG_FILTER_CHATSYS, "ChatHandler::isValidChatMessage('%s'): linked achievement (id: %u) name wasn't found in any localization", context, _achievement->ID);
|
||||
return res;
|
||||
sLog->outTrace(LOG_FILTER_CHATSYS, "ChatHandler::isValidChatMessage('%s'): linked achievement (id: %u) name wasn't found in any localization", context, _achievement->ID);
|
||||
return false;
|
||||
}
|
||||
|
||||
// |color|Htrade:spell_id:cur_value:max_value:player_guid:base64_data|h[name]|h|r
|
||||
|
||||
Reference in new issue
Block a user