diff options
author | Spp <none@none> | 2010-08-23 07:51:19 +0200 |
---|---|---|
committer | Spp <none@none> | 2010-08-23 07:51:19 +0200 |
commit | 16d95d3115b27536e7a1c99e795a5f90c238eb16 (patch) | |
tree | c439bd1f062af3643285ebfe5cbb12d2916180dd /src/server/game/Chat/Chat.cpp | |
parent | ccc2a83510c2dcdcaba1c9c1f1778b8f171e0c4c (diff) |
Core: Fix some warnings
--HG--
branch : trunk
Diffstat (limited to 'src/server/game/Chat/Chat.cpp')
-rw-r--r-- | src/server/game/Chat/Chat.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/server/game/Chat/Chat.cpp b/src/server/game/Chat/Chat.cpp index 0fa2c91befb..8b9f226d88c 100644 --- a/src/server/game/Chat/Chat.cpp +++ b/src/server/game/Chat/Chat.cpp @@ -805,7 +805,7 @@ const char *ChatHandler::GetTrinityString(int32 entry) const bool ChatHandler::isAvailable(ChatCommand const& cmd) const { // check security level only for simple command (without child commands) - return m_session->GetSecurity() >= cmd.SecurityLevel; + return m_session->GetSecurity() >= AccountTypes(cmd.SecurityLevel); } bool ChatHandler::HasLowerSecurity(Player* target, uint64 guid, bool strong) @@ -847,7 +847,8 @@ bool ChatHandler::HasLowerSecurityAccount(WorldSession* target, uint32 target_ac else return true; // caller must report error for (target == NULL && target_account == 0) - if (m_session->GetSecurity() < target_sec || (strong && m_session->GetSecurity() <= target_sec)) + AccountTypes target_ac_sec = AccountTypes(target_sec); + if (m_session->GetSecurity() < target_ac_sec || (strong && m_session->GetSecurity() <= target_ac_sec)) { SendSysMessage(LANG_YOURS_SECURITY_IS_LOW); SetSentErrorMessage(true); @@ -1658,10 +1659,10 @@ valid examples: ItemLocale const *il = sObjectMgr.GetItemLocale(linkedItem->ItemId); bool foundName = false; - for (uint8 i=LOCALE_koKR; i<MAX_LOCALE; ++i) + for (uint8 i = LOCALE_koKR; i < MAX_LOCALE; ++i) { int8 dbIndex = sObjectMgr.GetIndexForLocale(LocaleConstant(i)); - if (dbIndex == -1 || il == NULL || dbIndex >= il->Name.size()) + if (dbIndex == -1 || il == NULL || uint8(dbIndex) >= il->Name.size()) // using strange database/client combinations can lead to this case expectedName = linkedItem->Name1; else |