Misc: Whitespace and tabs cleanup

This commit is contained in:
Tuxity
2012-11-21 18:26:28 +01:00
parent f205bc9b4f
commit f5a54f8cbe
18 changed files with 53 additions and 53 deletions
@@ -419,7 +419,7 @@ uint32 Battleground::GetPrematureWinner()
winner = ALLIANCE;
else if (GetPlayersCountByTeam(HORDE) >= GetMinPlayersPerTeam())
winner = HORDE;
return winner;
}
@@ -481,7 +481,7 @@ inline void Battleground::_ProcessJoin(uint32 diff)
if (m_CountdownTimer >= 10000)
{
uint32 countdownMaxForBGType = isArena() ? ARENA_COUNTDOWN_MAX : BATTLEGROUND_COUNTDOWN_MAX;
WorldPacket data(SMSG_START_TIMER, 4+4+4);
data << uint32(0); // unk
data << uint32(countdownMaxForBGType - (m_CountdownTimer / 1000));
@@ -935,12 +935,12 @@ void Battleground::EndBattleground(uint32 winner)
UpdatePlayerScore(player, SCORE_BONUS_HONOR, GetBonusHonorFromKill(winner_kills));
if (!player->GetRandomWinner())
{
// 100cp awarded for the first rated battleground won each day
// 100cp awarded for the first rated battleground won each day
player->ModifyCurrency(CURRENCY_TYPE_CONQUEST_META_BG, BG_REWARD_WINNER_CONQUEST_FIRST);
player->SetRandomWinner(true);
}
}
else // 50cp awarded for each non-rated battleground won
else // 50cp awarded for each non-rated battleground won
player->ModifyCurrency(CURRENCY_TYPE_CONQUEST_META_BG, BG_REWARD_WINNER_CONQUEST_LAST );
player->UpdateAchievementCriteria(ACHIEVEMENT_CRITERIA_TYPE_WIN_BG, 1);
@@ -1240,7 +1240,7 @@ void Battleground::AddPlayer(Player* player)
// Correctly display EnemyUnitFrame
player->SetByteValue(PLAYER_BYTES_3, 3, player->GetBGTeam());
WorldPacket data(SMSG_ARENA_OPPONENT_UPDATE, 8);
data << uint64(player->GetGUID());
SendPacketToTeam(team, &data, player, false);
+1 -1
View File
@@ -533,7 +533,7 @@ class Battleground
virtual uint64 GetFlagPickerGUID(int32 /*team*/ = -1) const { return 0; }
virtual void SetDroppedFlagGUID(uint64 /*guid*/, int32 /*team*/ = -1) {}
uint32 GetTeamScore(uint32 TeamID) const;
virtual uint32 GetPrematureWinner();
protected:
@@ -390,7 +390,7 @@ void BattlegroundMgr::BuildPvpLogDataPacket(WorldPacket* data, Battleground* bg)
}
Player* player = ObjectAccessor::FindPlayer(itr->first);
ObjectGuid playerGUID = itr->first;
data->WriteBit(0); // Unk 1
data->WriteBit(0); // Unk 2
data->WriteBit(playerGUID[2]);
@@ -405,17 +405,17 @@ void BattlegroundMgr::BuildPvpLogDataPacket(WorldPacket* data, Battleground* bg)
data->WriteBit(playerGUID[6]);
data->WriteBit(player->GetTeam() == ALLIANCE);
data->WriteBit(playerGUID[7]);
buff << uint32(itr->second->HealingDone); // healing done
buff << uint32(itr->second->DamageDone); // damage done
if (!isArena)
{
buff << uint32(itr->second->BonusHonor / 100);
buff << uint32(itr->second->Deaths);
buff << uint32(itr->second->HonorableKills);
}
buff.WriteByteSeq(playerGUID[4]);
buff << uint32(itr->second->KillingBlows);
// if (unk 5) << uint32() unk
@@ -558,12 +558,12 @@ uint32 BattlegroundAB::GetPrematureWinner()
++ally;
else if (m_Nodes[i] == BG_AB_NODE_STATUS_HORDE_OCCUPIED)
++horde;
if (ally > horde)
return ALLIANCE;
else if (horde > ally)
return HORDE;
// If the values are equal, fall back to the original result (based on number of players on each team)
return Battleground::GetPrematureWinner();
}
@@ -272,7 +272,7 @@ class BattlegroundAB : public Battleground
/* achievement req. */
bool IsAllNodesConrolledByTeam(uint32 team) const; // overwrited
bool IsTeamScores500Disadvantage(uint32 team) const { return m_TeamScores500Disadvantage[GetTeamIndexByTeamId(team)]; }
uint32 GetPrematureWinner();
private:
void PostUpdateImpl(uint32 diff);
@@ -1701,11 +1701,11 @@ uint32 BattlegroundAV::GetPrematureWinner()
{
uint32 allianceScore = m_Team_Scores[GetTeamIndexByTeamId(ALLIANCE)];
uint32 hordeScore = m_Team_Scores[GetTeamIndexByTeamId(HORDE)];
if (allianceScore > hordeScore)
return ALLIANCE;
else if (hordeScore > allianceScore)
return HORDE;
return Battleground::GetPrematureWinner();
}
@@ -1572,7 +1572,7 @@ class BattlegroundAV : public Battleground
/* achievement req. */
bool IsBothMinesControlledByTeam(uint32 team) const;
bool IsAllTowersControlledAndCaptainAlive(uint32 team) const;
uint32 GetPrematureWinner();
private:
@@ -944,6 +944,6 @@ uint32 BattlegroundEY::GetPrematureWinner()
return ALLIANCE;
else if (GetTeamScore(TEAM_HORDE) > GetTeamScore(TEAM_ALLIANCE))
return HORDE;
return Battleground::GetPrematureWinner();
}
@@ -369,7 +369,7 @@ class BattlegroundEY : public Battleground
/* achievement req. */
bool IsAllNodesConrolledByTeam(uint32 team) const;
uint32 GetPrematureWinner();
private:
void PostUpdateImpl(uint32 diff);
@@ -864,6 +864,6 @@ uint32 BattlegroundWS::GetPrematureWinner()
return ALLIANCE;
else if (GetTeamScore(TEAM_HORDE) > GetTeamScore(TEAM_ALLIANCE))
return HORDE;
return Battleground::GetPrematureWinner();
}
@@ -211,7 +211,7 @@ class BattlegroundWS : public Battleground
void AddPoint(uint32 TeamID, uint32 Points = 1) { m_TeamScores[GetTeamIndexByTeamId(TeamID)] += Points; }
void SetTeamPoint(uint32 TeamID, uint32 Points = 0) { m_TeamScores[GetTeamIndexByTeamId(TeamID)] = Points; }
void RemovePoint(uint32 TeamID, uint32 Points = 1) { m_TeamScores[GetTeamIndexByTeamId(TeamID)] -= Points; }
uint32 GetPrematureWinner();
private:
uint64 m_FlagKeepers[2]; // 0 - alliance, 1 - horde
+7 -7
View File
@@ -7565,11 +7565,11 @@ uint32 Player::GetCurrencyWeekCap(uint32 id, bool usePrecision) const
CurrencyTypesEntry const* entry = sCurrencyTypesStore.LookupEntry(id);
if (!entry)
return 0;
uint32 cap = _GetCurrencyWeekCap(entry);
if(usePrecision && entry->Flags & CURRENCY_FLAG_HIGH_PRECISION)
cap /= 100;
return cap;
}
@@ -7585,13 +7585,13 @@ void Player::ResetCurrencyWeekCap()
arenaTeam->NotifyStatsChanged(); // notify the players of the changes
}
}
for (PlayerCurrenciesMap::iterator itr = _currencyStorage.begin(); itr != _currencyStorage.end(); ++itr)
{
itr->second.weekCount = 0;
itr->second.state = PLAYERCURRENCY_CHANGED;
}
WorldPacket data(SMSG_WEEKLY_RESET_CURRENCY, 0);
SendDirectMessage(&data);
}
@@ -7599,7 +7599,7 @@ void Player::ResetCurrencyWeekCap()
uint32 Player::_GetCurrencyWeekCap(const CurrencyTypesEntry* currency) const
{
uint32 cap = currency->WeekCap;
switch (currency->ID)
{
//original conquest not have week cap
@@ -7626,7 +7626,7 @@ uint32 Player::_GetCurrencyWeekCap(const CurrencyTypesEntry* currency) const
break;
}
}
if (cap != currency->WeekCap && IsInWorld() && !GetSession()->PlayerLoading())
{
WorldPacket packet(SMSG_UPDATE_CURRENCY_WEEK_LIMIT, 8);
@@ -7634,7 +7634,7 @@ uint32 Player::_GetCurrencyWeekCap(const CurrencyTypesEntry* currency) const
packet << uint32(currency->ID);
GetSession()->SendPacket(&packet);
}
return cap;
}
@@ -119,7 +119,7 @@ void WorldSession::HandleArenaTeamCreateOpcode(WorldPacket & recvData)
}
sArenaTeamMgr->AddArenaTeam(arenaTeam);
SendArenaTeamCommandResult(ERR_ARENA_TEAM_CREATE_S, name, "", ERR_ARENA_TEAM_CREATED);
}
@@ -706,7 +706,7 @@ void WorldSession::HandleBattlemasterJoinArena(WorldPacket & recvData)
return;
if (grp->GetLeaderGUID() != _player->GetGUID())
return;
uint32 ateamId = _player->GetArenaTeamId(arenaslot);
// check real arenateam existence only here (if it was moved to group->CanJoin .. () then we would ahve to get it twice)
ArenaTeam* at = sArenaTeamMgr->GetArenaTeamById(ateamId);
@@ -720,30 +720,30 @@ void WorldSession::HandleBattlemasterJoinArena(WorldPacket & recvData)
arenaRating = at->GetRating();
matchmakerRating = at->GetAverageMMR(grp);
// the arenateam id must match for everyone in the group
if (arenaRating <= 0)
arenaRating = 1;
BattlegroundQueue &bgQueue = sBattlegroundMgr->GetBattlegroundQueue(bgQueueTypeId);
uint32 avgTime = 0;
GroupQueueInfo* ginfo;
err = grp->CanJoinBattlegroundQueue(bg, bgQueueTypeId, arenatype, arenatype, true, arenaslot);
if (!err)
{
sLog->outDebug(LOG_FILTER_BATTLEGROUND, "Battleground: arena team id %u, leader %s queued with matchmaker rating %u for type %u", _player->GetArenaTeamId(arenaslot), _player->GetName().c_str(), matchmakerRating, arenatype);
ginfo = bgQueue.AddGroup(_player, grp, bgTypeId, bracketEntry, arenatype, true, false, arenaRating, matchmakerRating, ateamId);
avgTime = bgQueue.GetAverageQueueWaitTime(ginfo, bracketEntry->GetBracketId());
}
for (GroupReference* itr = grp->GetFirstMember(); itr != NULL; itr = itr->next())
{
Player* member = itr->getSource();
if (!member)
continue;
if (err)
{
WorldPacket data;
@@ -751,20 +751,20 @@ void WorldSession::HandleBattlemasterJoinArena(WorldPacket & recvData)
member->GetSession()->SendPacket(&data);
continue;
}
// add to queue
uint32 queueSlot = member->AddBattlegroundQueueId(bgQueueTypeId);
// add joined time data
member->AddBattlegroundQueueJoinTime(bgTypeId, ginfo->JoinTime);
WorldPacket data; // send status packet (in queue)
sBattlegroundMgr->BuildBattlegroundStatusPacket(&data, bg, member, queueSlot, STATUS_WAIT_QUEUE, avgTime, ginfo->JoinTime, arenatype);
member->GetSession()->SendPacket(&data);
sLog->outDebug(LOG_FILTER_BATTLEGROUND, "Battleground: player joined queue for arena as group bg queue type %u bg type %u: GUID %u, NAME %s", bgQueueTypeId, bgTypeId, member->GetGUIDLow(), member->GetName().c_str());
}
sBattlegroundMgr->ScheduleQueueUpdate(matchmakerRating, arenatype, bgQueueTypeId, bgTypeId, bracketEntry->GetBracketId());
}
+3 -3
View File
@@ -224,7 +224,7 @@ namespace Trinity
return rate;
}
} // namespace Trinity::XP
namespace Currency
{
inline uint32 ConquestRatingCalculator(uint32 rate)
@@ -233,11 +233,11 @@ namespace Trinity
return 1350; // Default conquest points
else if (rate > 3000)
rate = 3000;
// http://www.arenajunkies.com/topic/179536-conquest-point-cap-vs-personal-rating-chart/page__st__60#entry3085246
return 1.4326 * ((1511.26 / (1 + 1639.28 / exp(0.00412 * rate))) + 850.15);
}
inline uint32 BgConquestRatingCalculator(uint32 rate)
{
// WowWiki: Battleground ratings receive a bonus of 22.2% to the cap they generate
+3 -3
View File
@@ -801,7 +801,7 @@ void World::LoadConfigSettings(bool reload)
sLog->outError(LOG_FILTER_SERVER_LOADING, "Currency.ResetInterval (%i) must be > 0, set to default 7.", m_int_configs[CONFIG_CURRENCY_RESET_INTERVAL]);
m_int_configs[CONFIG_CURRENCY_RESET_INTERVAL] = 7;
}
m_int_configs[CONFIG_CURRENCY_START_HONOR_POINTS] = ConfigMgr::GetIntDefault("Currency.StartHonorPoints", 0);
if (int32(m_int_configs[CONFIG_CURRENCY_START_HONOR_POINTS]) < 0)
{
@@ -828,7 +828,7 @@ void World::LoadConfigSettings(bool reload)
m_int_configs[CONFIG_CURRENCY_CONQUEST_POINTS_WEEK_CAP] = 1650;
}
m_int_configs[CONFIG_CURRENCY_CONQUEST_POINTS_WEEK_CAP] *= 100; //precision mod
m_int_configs[CONFIG_CURRENCY_CONQUEST_POINTS_ARENA_REWARD] = ConfigMgr::GetIntDefault("Currency.ConquestPointsArenaReward", 150);
if (int32(m_int_configs[CONFIG_CURRENCY_CONQUEST_POINTS_ARENA_REWARD]) <= 0)
{
@@ -1989,7 +1989,7 @@ void World::Update(uint32 diff)
if (m_gameTime > m_NextCurrencyReset)
ResetCurrencyWeekCap();
/// <ul><li> Handle auctions when the timer has passed
if (m_timers[WUPDATE_AUCTIONS].Passed())
{
@@ -168,7 +168,7 @@ public:
{
if (!instance)
return;
instance->SetData(DATA_KAELTHAS_EVENT, IN_PROGRESS);
}
@@ -150,7 +150,7 @@ public:
HandleGameObject(SelinEncounterDoorGUID, false);
else if (data == NOT_STARTED)
HandleGameObject(SelinEncounterDoorGUID, true);
Encounter[0] = data;
break;
case DATA_VEXALLUS_EVENT:
@@ -184,7 +184,7 @@ public:
StatuesState = data;
break;
}
SaveToDB();
}
@@ -245,7 +245,7 @@ public:
OUT_SAVE_INST_DATA_COMPLETE;
return saveStream.str();
}
void Load(const char* str)
{
if (!str)
@@ -257,7 +257,7 @@ public:
OUT_LOAD_INST_DATA(str);
std::istringstream loadStream(str);
for (uint32 i = 0; i < MAX_ENCOUNTER; ++i)
{
uint32 tmpState;
@@ -272,7 +272,7 @@ public:
OUT_LOAD_INST_DATA_COMPLETE;
}
uint64 GetData64(uint32 identifier) const
{
switch (identifier)