[8846] corrections for my last commit

thx to vladimir and apoc :)
This commit is contained in:
balrok 2009-11-20 13:16:22 +01:00
parent 1d362eace4
commit 56d694b5fb
8 changed files with 38 additions and 39 deletions

View file

@ -700,7 +700,7 @@ const char *ChatHandler::GetMangosString(int32 entry) const
bool ChatHandler::isAvailable(ChatCommand const& cmd) const
{
// check security level only for simple command (without child commands)
return (uint32)m_session->GetSecurity() >= cmd.SecurityLevel;
return m_session->GetSecurity() >= (AccountTypes)cmd.SecurityLevel;
}
bool ChatHandler::HasLowerSecurity(Player* target, uint64 guid, bool strong)
@ -742,7 +742,7 @@ bool ChatHandler::HasLowerSecurityAccount(WorldSession* target, uint32 target_ac
else
return true; // caller must report error for (target==NULL && target_account==0)
if ((uint32)m_session->GetSecurity() < target_sec || (strong && (uint32)m_session->GetSecurity() <= target_sec))
if (m_session->GetSecurity() < target_sec || (strong && (uint32)m_session->GetSecurity() <= target_sec))
{
SendSysMessage(LANG_YOURS_SECURITY_IS_LOW);
SetSentErrorMessage(true);
@ -1521,7 +1521,7 @@ valid examples:
for(uint8 i=LOCALE_koKR; i<MAX_LOCALE; ++i)
{
int8 dbIndex = sObjectMgr.GetIndexForLocale(LocaleConstant(i));
if (dbIndex == -1 || il == NULL || (uint)dbIndex >= il->Name.size())
if (dbIndex == -1 || il == NULL || (size_t)dbIndex >= il->Name.size())
// using strange database/client combinations can lead to this case
expectedName = linkedItem->Name1;
else