Various Cleanups (game A-B)

This commit is contained in:
Schmoozerd 2012-07-19 21:45:38 +02:00
parent 2a4b8f2cb0
commit f80629e307
47 changed files with 1359 additions and 1337 deletions

View file

@ -75,7 +75,8 @@ AccountOpResult AccountMgr::DeleteAccount(uint32 accid)
// kick if player currently // kick if player currently
ObjectAccessor::KickPlayer(guid); ObjectAccessor::KickPlayer(guid);
Player::DeleteFromDB(guid, accid, false); // no need to update realm characters Player::DeleteFromDB(guid, accid, false); // no need to update realm characters
} while (result->NextRow()); }
while (result->NextRow());
delete result; delete result;
} }

View file

@ -549,7 +549,8 @@ void AchievementMgr::LoadFromDB(QueryResult *achievementResult, QueryResult *cri
CompletedAchievementData& ca = m_completedAchievements[achievement_id]; CompletedAchievementData& ca = m_completedAchievements[achievement_id];
ca.date = time_t(fields[1].GetUInt64()); ca.date = time_t(fields[1].GetUInt64());
ca.changed = false; ca.changed = false;
} while(achievementResult->NextRow()); }
while (achievementResult->NextRow());
delete achievementResult; delete achievementResult;
} }
@ -604,7 +605,8 @@ void AchievementMgr::LoadFromDB(QueryResult *achievementResult, QueryResult *cri
progress.changed = true; progress.changed = true;
} }
} }
} while(criteriaResult->NextRow()); }
while (criteriaResult->NextRow());
delete criteriaResult; delete criteriaResult;
} }
@ -2441,7 +2443,8 @@ void AchievementGlobalMgr::LoadAchievementCriteriaRequirements()
// counting requirements // counting requirements
++count; ++count;
} while(result->NextRow()); }
while (result->NextRow());
delete result; delete result;
@ -2547,7 +2550,8 @@ void AchievementGlobalMgr::LoadCompletedAchievements()
} }
m_allCompletedAchievements.insert(achievement_id); m_allCompletedAchievements.insert(achievement_id);
} while(result->NextRow()); }
while (result->NextRow());
delete result; delete result;
@ -2679,7 +2683,8 @@ void AchievementGlobalMgr::LoadRewards()
m_achievementRewards.insert(AchievementRewardsMap::value_type(entry, reward)); m_achievementRewards.insert(AchievementRewardsMap::value_type(entry, reward));
++count; ++count;
} while (result->NextRow()); }
while (result->NextRow());
delete result; delete result;
@ -2772,7 +2777,8 @@ void AchievementGlobalMgr::LoadRewardLocales()
m_achievementRewardLocales.insert(AchievementRewardLocalesMap::value_type(entry, data)); m_achievementRewardLocales.insert(AchievementRewardLocalesMap::value_type(entry, data));
} while (result->NextRow()); }
while (result->NextRow());
delete result; delete result;

View file

@ -47,7 +47,8 @@ struct CriteriaProgress
}; };
enum AchievementCriteriaRequirementType enum AchievementCriteriaRequirementType
{ // value1 value2 comment {
// value1 value2 comment
ACHIEVEMENT_CRITERIA_REQUIRE_NONE = 0, // 0 0 ACHIEVEMENT_CRITERIA_REQUIRE_NONE = 0, // 0 0
ACHIEVEMENT_CRITERIA_REQUIRE_T_CREATURE = 1, // creature_id 0 ACHIEVEMENT_CRITERIA_REQUIRE_T_CREATURE = 1, // creature_id 0
ACHIEVEMENT_CRITERIA_REQUIRE_T_PLAYER_CLASS_RACE = 2, // class_id race_id ACHIEVEMENT_CRITERIA_REQUIRE_T_PLAYER_CLASS_RACE = 2, // class_id race_id

View file

@ -272,7 +272,8 @@ bool ArenaTeam::LoadMembersFromDB(QueryResult *arenaTeamMembersResult)
captainPresentInTeam = true; captainPresentInTeam = true;
m_members.push_back(newmember); m_members.push_back(newmember);
} while (arenaTeamMembersResult->NextRow()); }
while (arenaTeamMembersResult->NextRow());
if (Empty() || !captainPresentInTeam) if (Empty() || !captainPresentInTeam)
{ {

View file

@ -699,7 +699,8 @@ bool AuctionBotBuyer::IsBidableEntry(uint32 bidPrice, double InGame_BuyPrice, do
{ {
DEBUG_FILTER_LOG(LOG_FILTER_AHBOT_BUYER, "AHBot: WIN BID! Chance = %u, num = %u.",Chance, RandNum); DEBUG_FILTER_LOG(LOG_FILTER_AHBOT_BUYER, "AHBot: WIN BID! Chance = %u, num = %u.",Chance, RandNum);
return true; return true;
} else }
else
{ {
DEBUG_FILTER_LOG(LOG_FILTER_AHBOT_BUYER, "AHBot: LOOSE BID! Chance = %u, num = %u.",Chance, RandNum); DEBUG_FILTER_LOG(LOG_FILTER_AHBOT_BUYER, "AHBot: LOOSE BID! Chance = %u, num = %u.",Chance, RandNum);
return false; return false;
@ -903,7 +904,8 @@ bool AuctionBotSeller::Initialize()
Field* fields = result->Fetch(); Field* fields = result->Fetch();
npcItems.push_back(fields[0].GetUInt32()); npcItems.push_back(fields[0].GetUInt32());
} while (result->NextRow()); }
while (result->NextRow());
delete result; delete result;
} }
else else
@ -938,7 +940,8 @@ bool AuctionBotSeller::Initialize()
continue; continue;
lootItems.push_back(fields[0].GetUInt32()); lootItems.push_back(fields[0].GetUInt32());
} while (result->NextRow()); }
while (result->NextRow());
delete result; delete result;
} }
else else

View file

@ -218,7 +218,8 @@ void AuctionHouseMgr::SendAuctionSuccessfulMail(AuctionEntry * auction)
// does not clear ram // does not clear ram
void AuctionHouseMgr::SendAuctionExpiredMail(AuctionEntry* auction) void AuctionHouseMgr::SendAuctionExpiredMail(AuctionEntry* auction)
{ // return an item in auction to its owner by mail {
// return an item in auction to its owner by mail
Item* pItem = GetAItem(auction->itemGuidLow); Item* pItem = GetAItem(auction->itemGuidLow);
if (!pItem) if (!pItem)
{ {
@ -455,7 +456,8 @@ void AuctionHouseMgr::LoadAuctions()
GetAuctionsMap(auction->auctionHouseEntry)->AddAuction(auction); GetAuctionsMap(auction->auctionHouseEntry)->AddAuction(auction);
} while (result->NextRow()); }
while (result->NextRow());
delete result; delete result;
sLog.outString(); sLog.outString();

View file

@ -149,7 +149,8 @@ const uint32 BG_AB_TickPoints[6] = {0, 10, 10, 10, 10, 30};
const uint32 BG_AB_GraveyardIds[7] = {895, 894, 893, 897, 896, 898, 899}; const uint32 BG_AB_GraveyardIds[7] = {895, 894, 893, 897, 896, 898, 899};
// x, y, z, o // x, y, z, o
const float BG_AB_BuffPositions[BG_AB_NODES_MAX][4] = { const float BG_AB_BuffPositions[BG_AB_NODES_MAX][4] =
{
{1185.71f, 1185.24f, -56.36f, 2.56f}, // stables {1185.71f, 1185.24f, -56.36f, 2.56f}, // stables
{990.75f, 1008.18f, -42.60f, 2.43f}, // blacksmith {990.75f, 1008.18f, -42.60f, 2.43f}, // blacksmith
{817.66f, 843.34f, -56.54f, 3.01f}, // farm {817.66f, 843.34f, -56.54f, 3.01f}, // farm

View file

@ -175,7 +175,8 @@ enum BG_AV_Graveyards
BG_AV_GRAVE_MAIN_HORDE = 610 BG_AV_GRAVE_MAIN_HORDE = 610
}; };
const uint32 BG_AV_GraveyardIds[9]= { const uint32 BG_AV_GraveyardIds[9]=
{
BG_AV_GRAVE_STORM_AID, BG_AV_GRAVE_STORM_AID,
BG_AV_GRAVE_STORM_GRAVE, BG_AV_GRAVE_STORM_GRAVE,
BG_AV_GRAVE_STONE_GRAVE, BG_AV_GRAVE_STONE_GRAVE,
@ -216,13 +217,15 @@ enum BattleGroundAVTeamIndex
#define BG_AV_TEAMS_COUNT 3 #define BG_AV_TEAMS_COUNT 3
// alliance_control horde_control neutral_control // alliance_control horde_control neutral_control
const uint32 BG_AV_MineWorldStates[2][BG_AV_TEAMS_COUNT] = { const uint32 BG_AV_MineWorldStates[2][BG_AV_TEAMS_COUNT] =
{
{1358, 1359, 1360}, {1358, 1359, 1360},
{1355, 1356, 1357} {1355, 1356, 1357}
}; };
// alliance_control alliance_assault h_control h_assault // alliance_control alliance_assault h_control h_assault
const uint32 BG_AV_NodeWorldStates[BG_AV_NODES_MAX][4] = { const uint32 BG_AV_NodeWorldStates[BG_AV_NODES_MAX][4] =
{
// Stormpike first aid station // Stormpike first aid station
{1326,1325,1328,1327}, {1326,1325,1328,1327},
// Stormpike Graveyard // Stormpike Graveyard

View file

@ -127,7 +127,8 @@ enum BG_EY_Nodes
// x, y, z // x, y, z
// used to check, when player is in range of a node // used to check, when player is in range of a node
const float BG_EY_NodePositions[BG_EY_NODES_MAX][3] = { const float BG_EY_NodePositions[BG_EY_NODES_MAX][3] =
{
{2024.600708f, 1742.819580f, 1195.157715f}, // BG_EY_NODE_FEL_REAVER {2024.600708f, 1742.819580f, 1195.157715f}, // BG_EY_NODE_FEL_REAVER
{2050.493164f, 1372.235962f, 1194.563477f}, // BG_EY_NODE_BLOOD_ELF {2050.493164f, 1372.235962f, 1194.563477f}, // BG_EY_NODE_BLOOD_ELF
{2301.010498f, 1386.931641f, 1197.183472f}, // BG_EY_NODE_DRAENEI_RUINS {2301.010498f, 1386.931641f, 1197.183472f}, // BG_EY_NODE_DRAENEI_RUINS

View file

@ -1709,7 +1709,8 @@ void BattleGroundMgr::CreateInitialBattleGrounds()
continue; continue;
++count; ++count;
} while (result->NextRow()); }
while (result->NextRow());
delete result; delete result;
@ -2053,7 +2054,8 @@ void BattleGroundMgr::LoadBattleMastersEntry()
mBattleMastersMap[entry] = BattleGroundTypeId(bgTypeId); mBattleMastersMap[entry] = BattleGroundTypeId(bgTypeId);
} while(result->NextRow()); }
while (result->NextRow());
delete result; delete result;
@ -2199,7 +2201,8 @@ void BattleGroundMgr::LoadBattleEventIndexes()
++count; ++count;
} while(result->NextRow()); }
while (result->NextRow());
sLog.outString(); sLog.outString();
sLog.outString(">> Loaded %u battleground eventindexes", count); sLog.outString(">> Loaded %u battleground eventindexes", count);