Core: Fixed more warnings (C6246: Local declaration of 'x' hides declaration of the same name in outer scope.)
This commit is contained in:
@@ -85,7 +85,7 @@ Channel::Channel(const std::string& name, uint32 channel_id, uint32 Team)
|
||||
}
|
||||
else // save
|
||||
{
|
||||
PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_ADD_CHANNEL);
|
||||
stmt = CharacterDatabase.GetPreparedStatement(CHAR_ADD_CHANNEL);
|
||||
stmt->setString(0, name);
|
||||
stmt->setUInt32(1, m_Team);
|
||||
CharacterDatabase.Execute(stmt);
|
||||
@@ -563,12 +563,12 @@ void Channel::List(Player* player)
|
||||
uint32 count = 0;
|
||||
for (PlayerList::const_iterator i = players.begin(); i != players.end(); ++i)
|
||||
{
|
||||
Player* player = ObjectAccessor::FindPlayer(i->first);
|
||||
Player* member = ObjectAccessor::FindPlayer(i->first);
|
||||
|
||||
// PLAYER can't see MODERATOR, GAME MASTER, ADMINISTRATOR characters
|
||||
// MODERATOR, GAME MASTER, ADMINISTRATOR can see all
|
||||
if (player && (!AccountMgr::IsPlayerAccount(player->GetSession()->GetSecurity()) || player->GetSession()->GetSecurity() <= AccountTypes(gmLevelInWhoList)) &&
|
||||
player->IsVisibleGloballyFor(player))
|
||||
if (member && (!AccountMgr::IsPlayerAccount(player->GetSession()->GetSecurity()) || member->GetSession()->GetSecurity() <= AccountTypes(gmLevelInWhoList)) &&
|
||||
member->IsVisibleGloballyFor(player))
|
||||
{
|
||||
data << uint64(i->first);
|
||||
data << uint8(i->second.flags); // flags seems to be changed...
|
||||
|
||||
@@ -349,18 +349,18 @@ bool ChatHandler::HandlePInfoCommand(const char* args)
|
||||
|
||||
std::string bannedby = "unknown";
|
||||
std::string banreason = "";
|
||||
if (QueryResult result = LoginDatabase.PQuery("SELECT unbandate, bandate = unbandate, bannedby, banreason FROM account_banned "
|
||||
if (QueryResult result2 = LoginDatabase.PQuery("SELECT unbandate, bandate = unbandate, bannedby, banreason FROM account_banned "
|
||||
"WHERE id = '%u' AND active ORDER BY bandate ASC LIMIT 1", accId))
|
||||
{
|
||||
Field* fields = result->Fetch();
|
||||
Field* fields = result2->Fetch();
|
||||
banTime = fields[1].GetBool() ? 0 : fields[0].GetUInt64();
|
||||
bannedby = fields[2].GetString();
|
||||
banreason = fields[3].GetString();
|
||||
}
|
||||
else if (QueryResult result = CharacterDatabase.PQuery("SELECT unbandate, bandate = unbandate, bannedby, banreason FROM character_banned "
|
||||
else if (QueryResult result3 = CharacterDatabase.PQuery("SELECT unbandate, bandate = unbandate, bannedby, banreason FROM character_banned "
|
||||
"WHERE guid = '%u' AND active ORDER BY bandate ASC LIMIT 1", GUID_LOPART(target_guid)))
|
||||
{
|
||||
Field* fields = result->Fetch();
|
||||
Field* fields = result3->Fetch();
|
||||
banTime = fields[1].GetBool() ? 0 : fields[0].GetUInt64();
|
||||
bannedby = fields[2].GetString();
|
||||
banreason = fields[3].GetString();
|
||||
|
||||
Reference in New Issue
Block a user