Core/Misc: Minor cosmetic changes here and there
This commit is contained in:
1 parent
08866f377e
commit
cc605e0605
7 files changed
+18
-25
No files matched your search
@@ -21759,7 +21759,7 @@ void Player::LeaveBattleground(bool teleportToEntryPoint)
|
||||
}
|
||||
}
|
||||
|
||||
bool Player::CanJoinToBattleground() const
|
||||
bool Player::CanJoinToBattleground(Battleground const* /*bg*/) const
|
||||
{
|
||||
// check Deserter debuff
|
||||
if (HasAura(26013))
|
||||
|
||||
@@ -2227,7 +2227,7 @@ class Player : public Unit, public GridObject<Player>
|
||||
uint32 GetBGTeam() const { return m_bgData.bgTeam ? m_bgData.bgTeam : GetTeam(); }
|
||||
|
||||
void LeaveBattleground(bool teleportToEntryPoint = true);
|
||||
bool CanJoinToBattleground() const;
|
||||
bool CanJoinToBattleground(Battleground const* bg) const;
|
||||
bool CanReportAfkDueToLimit();
|
||||
void ReportedAfkBy(Player* reporter);
|
||||
void ClearAfkReports() { m_bgData.bgAfkReporter.clear(); }
|
||||
|
||||
@@ -1818,7 +1818,7 @@ GroupJoinBattlegroundResult Group::CanJoinBattlegroundQueue(Battleground const*
|
||||
if (bgOrTemplate->GetTypeID() == BATTLEGROUND_RB && member->InBattlegroundQueue())
|
||||
return ERR_IN_NON_RANDOM_BG;
|
||||
// check for deserter debuff in case not arena queue
|
||||
if (bgOrTemplate->GetTypeID() != BATTLEGROUND_AA && !member->CanJoinToBattleground())
|
||||
if (bgOrTemplate->GetTypeID() != BATTLEGROUND_AA && !member->CanJoinToBattleground(bgOrTemplate))
|
||||
return ERR_GROUP_JOIN_BATTLEGROUND_DESERTERS;
|
||||
// check if member can join any more battleground queues
|
||||
if (!member->HasFreeBattlegroundQueueId())
|
||||
|
||||
@@ -138,7 +138,7 @@ void WorldSession::HandleBattlemasterJoinOpcode(WorldPacket& recvData)
|
||||
}
|
||||
|
||||
// check Deserter debuff
|
||||
if (!_player->CanJoinToBattleground())
|
||||
if (!_player->CanJoinToBattleground(bg))
|
||||
{
|
||||
WorldPacket data;
|
||||
sBattlegroundMgr->BuildGroupJoinedBattlegroundPacket(&data, ERR_GROUP_JOIN_BATTLEGROUND_DESERTERS);
|
||||
@@ -413,7 +413,7 @@ void WorldSession::HandleBattleFieldPortOpcode(WorldPacket &recvData)
|
||||
if (action == 1 && ginfo.ArenaType == 0)
|
||||
{
|
||||
//if player is trying to enter battleground (not arena!) and he has deserter debuff, we must just remove him from queue
|
||||
if (!_player->CanJoinToBattleground())
|
||||
if (!_player->CanJoinToBattleground(bg))
|
||||
{
|
||||
//send bg command result to show nice message
|
||||
WorldPacket data2;
|
||||
|
||||
@@ -1342,7 +1342,7 @@ void WorldSession::HandleComplainOpcode(WorldPacket& recvData)
|
||||
recvData >> unk1; // probably language
|
||||
recvData >> unk2; // message type?
|
||||
recvData >> unk3; // probably channel id
|
||||
recvData >> unk4; // unk random value
|
||||
recvData >> unk4; // time
|
||||
recvData >> description; // spam description string (messagetype, channel name, player name, message)
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -1033,4 +1033,4 @@ void WorldSocket::SendAuthResponseError(uint8 code)
|
||||
WorldPacket packet(SMSG_AUTH_RESPONSE, 1);
|
||||
packet << uint8(code);
|
||||
SendPacket(packet);
|
||||
}
|
||||
}
|
||||
@@ -225,7 +225,7 @@ void World::AddSession(WorldSession* s)
|
||||
|
||||
void World::AddSession_(WorldSession* s)
|
||||
{
|
||||
ASSERT (s);
|
||||
ASSERT(s);
|
||||
|
||||
//NOTE - Still there is race condition in WorldSession* being used in the Sockets
|
||||
|
||||
@@ -260,7 +260,7 @@ void World::AddSession_(WorldSession* s)
|
||||
|
||||
uint32 Sessions = GetActiveAndQueuedSessionCount();
|
||||
uint32 pLimit = GetPlayerAmountLimit();
|
||||
uint32 QueueSize = GetQueuedSessionCount(); //number of players in the queue
|
||||
uint32 QueueSize = GetQueuedSessionCount(); //number of players in the queue
|
||||
|
||||
//so we don't count the user trying to
|
||||
//login as a session and queue the socket that we are using
|
||||
@@ -269,7 +269,7 @@ void World::AddSession_(WorldSession* s)
|
||||
|
||||
if (pLimit > 0 && Sessions >= pLimit && AccountMgr::IsPlayerAccount(s->GetSecurity()) && !HasRecentlyDisconnected(s))
|
||||
{
|
||||
AddQueuedPlayer (s);
|
||||
AddQueuedPlayer(s);
|
||||
UpdateMaxSessionCounters();
|
||||
sLog->outInfo(LOG_FILTER_GENERAL, "PlayerQueue: Account id %u is in Queue Position (%u).", s->GetAccountId(), ++QueueSize);
|
||||
return;
|
||||
@@ -775,7 +775,7 @@ void World::LoadConfigSettings(bool reload)
|
||||
if (int32(m_int_configs[CONFIG_START_PLAYER_MONEY]) < 0)
|
||||
{
|
||||
sLog->outError(LOG_FILTER_SERVER_LOADING, "StartPlayerMoney (%i) must be in range 0..%u. Set to %u.", m_int_configs[CONFIG_START_PLAYER_MONEY], MAX_MONEY_AMOUNT, 0);
|
||||
m_int_configs[CONFIG_START_PLAYER_MONEY] = 0;
|
||||
m_int_configs[CONFIG_START_PLAYER_MONEY] = 0;
|
||||
}
|
||||
else if (m_int_configs[CONFIG_START_PLAYER_MONEY] > MAX_MONEY_AMOUNT)
|
||||
{
|
||||
@@ -1292,12 +1292,7 @@ void World::SetInitialWorldSettings()
|
||||
//No SQL injection as values are treated as integers
|
||||
|
||||
// not send custom type REALM_FFA_PVP to realm list
|
||||
uint32 server_type;
|
||||
if (IsFFAPvPRealm())
|
||||
server_type = REALM_TYPE_PVP;
|
||||
else
|
||||
server_type = getIntConfig(CONFIG_GAME_TYPE);
|
||||
|
||||
uint32 server_type = IsFFAPvPRealm() ? uint32(REALM_TYPE_PVP) : getIntConfig(CONFIG_GAME_TYPE);
|
||||
uint32 realm_zone = getIntConfig(CONFIG_REALM_ZONE);
|
||||
|
||||
LoginDatabase.PExecute("UPDATE realmlist SET icon = %u, timezone = %u WHERE id = '%d'", server_type, realm_zone, realmID); // One-time query
|
||||
@@ -1398,8 +1393,8 @@ void World::SetInitialWorldSettings()
|
||||
sLog->outInfo(LOG_FILTER_SERVER_LOADING, "Loading Item Random Enchantments Table...");
|
||||
LoadRandomEnchantmentsTable();
|
||||
|
||||
sLog->outInfo(LOG_FILTER_SERVER_LOADING, "Loading Disables");
|
||||
DisableMgr::LoadDisables(); // must be before loading quests and items
|
||||
sLog->outInfo(LOG_FILTER_SERVER_LOADING, "Loading Disables"); // must be before loading quests and items
|
||||
DisableMgr::LoadDisables();
|
||||
|
||||
sLog->outInfo(LOG_FILTER_SERVER_LOADING, "Loading Items..."); // must be after LoadRandomEnchantmentsTable and LoadPageTexts
|
||||
sObjectMgr->LoadItemTemplates();
|
||||
@@ -1579,9 +1574,11 @@ void World::SetInitialWorldSettings()
|
||||
///- Load dynamic data tables from the database
|
||||
sLog->outInfo(LOG_FILTER_SERVER_LOADING, "Loading Item Auctions...");
|
||||
sAuctionMgr->LoadAuctionItems();
|
||||
|
||||
sLog->outInfo(LOG_FILTER_SERVER_LOADING, "Loading Auctions...");
|
||||
sAuctionMgr->LoadAuctions();
|
||||
|
||||
sLog->outInfo(LOG_FILTER_SERVER_LOADING, "Loading Guilds...");
|
||||
sGuildMgr->LoadGuilds();
|
||||
|
||||
sLog->outInfo(LOG_FILTER_SERVER_LOADING, "Loading ArenaTeams...");
|
||||
@@ -1843,7 +1840,6 @@ void World::DetectDBCLang()
|
||||
m_defaultDbcLocale = LocaleConstant(default_locale);
|
||||
|
||||
sLog->outInfo(LOG_FILTER_SERVER_LOADING, "Using %s DBC Locale as default. All available DBC locales: %s", localeNames[m_defaultDbcLocale], availableLocalsStr.empty() ? "<none>" : availableLocalsStr.c_str());
|
||||
|
||||
}
|
||||
|
||||
void World::RecordTimeDiff(const char *text, ...)
|
||||
@@ -1883,7 +1879,6 @@ void World::LoadAutobroadcasts()
|
||||
if (!result)
|
||||
{
|
||||
sLog->outInfo(LOG_FILTER_SERVER_LOADING, ">> Loaded 0 autobroadcasts definitions. DB table `autobroadcast` is empty!");
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -1891,7 +1886,6 @@ void World::LoadAutobroadcasts()
|
||||
|
||||
do
|
||||
{
|
||||
|
||||
Field* fields = result->Fetch();
|
||||
std::string message = fields[0].GetString();
|
||||
|
||||
@@ -1900,8 +1894,7 @@ void World::LoadAutobroadcasts()
|
||||
++count;
|
||||
} while (result->NextRow());
|
||||
|
||||
sLog->outInfo(LOG_FILTER_SERVER_LOADING, ">> Loaded %u autobroadcasts definitions in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
|
||||
|
||||
sLog->outInfo(LOG_FILTER_SERVER_LOADING, ">> Loaded %u autobroadcast definitions in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
|
||||
}
|
||||
|
||||
/// Update the World !
|
||||
@@ -2951,8 +2944,8 @@ void World::LoadDBVersion()
|
||||
if (result)
|
||||
{
|
||||
Field* fields = result->Fetch();
|
||||
m_DBVersion = fields[0].GetString();
|
||||
|
||||
m_DBVersion = fields[0].GetString();
|
||||
// will be overwrite by config values if different and non-0
|
||||
m_int_configs[CONFIG_CLIENTCACHE_VERSION] = fields[1].GetUInt32();
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user