aboutsummaryrefslogtreecommitdiff
path: root/src/server/game
diff options
context:
space:
mode:
authorcyberbrest <cyberbrest@cyberbrest.com>2012-09-03 22:51:13 +0300
committercyberbrest <cyberbrest@cyberbrest.com>2012-09-03 22:55:28 +0300
commitdcfaf070546df192415c32b36787bbbdf340bba3 (patch)
tree383ac50b848c8c90017391f53818bbd070ac1a3e /src/server/game
parent0c40fb0fe9a28400e8639145800224c9a9c1de48 (diff)
[Core/Currency] drop conquestPoints and totalHonorPoints columns with porting data to new table.
Diffstat (limited to 'src/server/game')
-rw-r--r--src/server/game/Entities/Player/Player.cpp42
1 files changed, 19 insertions, 23 deletions
diff --git a/src/server/game/Entities/Player/Player.cpp b/src/server/game/Entities/Player/Player.cpp
index 2661c83842c..e203f1240a0 100644
--- a/src/server/game/Entities/Player/Player.cpp
+++ b/src/server/game/Entities/Player/Player.cpp
@@ -16663,11 +16663,11 @@ bool Player::LoadFromDB(uint32 guid, SQLQueryHolder *holder)
//"position_x, position_y, position_z, map, orientation, taximask, cinematic, totaltime, leveltime, rest_bonus, logout_time, is_logout_resting, resettalents_cost, "
// 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39
//"resettalents_time, talentTree, trans_x, trans_y, trans_z, trans_o, transguid, extra_flags, stable_slots, at_login, zone, online, death_expire_time, taxi_path, instance_mode_mask, "
- // 40 41 42 43 44 45 46 47
- //"conquestPoints, totalHonorPoints, totalKills, todayKills, yesterdayKills, chosenTitle, watchedFaction, drunk, "
- // 48 49 50 51 52 53 54 55 56 57 58
+ // 40 41 42 43 44 45
+ //"totalKills, todayKills, yesterdayKills, chosenTitle, watchedFaction, drunk, "
+ // 46 47 48 49 50 51 52 53 54 55 56
//"health, power1, power2, power3, power4, power5, instance_id, speccount, activespec, exploredZones, equipmentCache, "
- // 59 60 61
+ // 57 58 59
//"knownTitles, actionBars, grantableLevels FROM characters WHERE guid = '%u'", guid);
PreparedQueryResult result = holder->GetPreparedResult(PLAYER_LOGIN_QUERY_LOADFROM);
@@ -16733,8 +16733,8 @@ bool Player::LoadFromDB(uint32 guid, SQLQueryHolder *holder)
SetUInt32Value(UNIT_FIELD_LEVEL, fields[6].GetUInt8());
SetUInt32Value(PLAYER_XP, fields[7].GetUInt32());
- _LoadIntoDataField(fields[57].GetCString(), PLAYER_EXPLORED_ZONES_1, PLAYER_EXPLORED_ZONES_SIZE);
- _LoadIntoDataField(fields[59].GetCString(), PLAYER__FIELD_KNOWN_TITLES, KNOWN_TITLES_SIZE*2);
+ _LoadIntoDataField(fields[55].GetCString(), PLAYER_EXPLORED_ZONES_1, PLAYER_EXPLORED_ZONES_SIZE);
+ _LoadIntoDataField(fields[57].GetCString(), PLAYER__FIELD_KNOWN_TITLES, KNOWN_TITLES_SIZE*2);
SetFloatValue(UNIT_FIELD_BOUNDINGRADIUS, DEFAULT_WORLD_OBJECT_SIZE);
SetFloatValue(UNIT_FIELD_COMBATREACH, 1.5f);
@@ -16751,12 +16751,12 @@ bool Player::LoadFromDB(uint32 guid, SQLQueryHolder *holder)
SetUInt32Value(PLAYER_BYTES, fields[9].GetUInt32());
SetUInt32Value(PLAYER_BYTES_2, fields[10].GetUInt32());
SetByteValue(PLAYER_BYTES_3, 0, fields[5].GetUInt8());
- SetByteValue(PLAYER_BYTES_3, 1, fields[47].GetUInt8());
+ SetByteValue(PLAYER_BYTES_3, 1, fields[45].GetUInt8());
SetUInt32Value(PLAYER_FLAGS, fields[11].GetUInt32());
- SetInt32Value(PLAYER_FIELD_WATCHED_FACTION_INDEX, fields[46].GetUInt32());
+ SetInt32Value(PLAYER_FIELD_WATCHED_FACTION_INDEX, fields[44].GetUInt32());
// set which actionbars the client has active - DO NOT REMOVE EVER AGAIN (can be changed though, if it does change fieldwise)
- SetByteValue(PLAYER_FIELD_BYTES, 2, fields[60].GetUInt8());
+ SetByteValue(PLAYER_FIELD_BYTES, 2, fields[58].GetUInt8());
InitDisplayIds();
@@ -16789,7 +16789,7 @@ bool Player::LoadFromDB(uint32 guid, SQLQueryHolder *holder)
Relocate(fields[12].GetFloat(), fields[13].GetFloat(), fields[14].GetFloat(), fields[16].GetFloat());
uint32 mapId = fields[15].GetUInt16();
- uint32 instanceId = fields[54].GetUInt32();
+ uint32 instanceId = fields[52].GetUInt32();
uint32 dungeonDiff = fields[39].GetUInt8() & 0x0F;
if (dungeonDiff >= MAX_DUNGEON_DIFFICULTY)
@@ -16825,9 +16825,9 @@ bool Player::LoadFromDB(uint32 guid, SQLQueryHolder *holder)
}
_LoadCurrency(holder->GetPreparedResult(PLAYER_LOGIN_QUERY_LOADCURRENCY));
- SetUInt32Value(PLAYER_FIELD_LIFETIME_HONORABLE_KILLS, fields[42].GetUInt32());
- SetUInt16Value(PLAYER_FIELD_KILLS, 0, fields[43].GetUInt16());
- SetUInt16Value(PLAYER_FIELD_KILLS, 1, fields[44].GetUInt16());
+ SetUInt32Value(PLAYER_FIELD_LIFETIME_HONORABLE_KILLS, fields[40].GetUInt32());
+ SetUInt16Value(PLAYER_FIELD_KILLS, 0, fields[41].GetUInt16());
+ SetUInt16Value(PLAYER_FIELD_KILLS, 1, fields[42].GetUInt16());
_LoadBoundInstances(holder->GetPreparedResult(PLAYER_LOGIN_QUERY_LOADBOUNDINSTANCES));
_LoadInstanceTimeRestrictions(holder->GetPreparedResult(PLAYER_LOGIN_QUERY_LOADINSTANCELOCKTIMES));
@@ -17146,8 +17146,8 @@ bool Player::LoadFromDB(uint32 guid, SQLQueryHolder *holder)
//mails are loaded only when needed ;-) - when player in game click on mailbox.
//_LoadMail();
- SetSpecsCount(fields[55].GetUInt8());
- SetActiveSpec(fields[56].GetUInt8());
+ SetSpecsCount(fields[53].GetUInt8());
+ SetActiveSpec(fields[54].GetUInt8());
// sanity check
if (GetSpecsCount() > MAX_TALENT_SPECS || GetActiveSpec() > MAX_TALENT_SPEC || GetSpecsCount() < MIN_TALENT_SPECS)
@@ -17198,7 +17198,7 @@ bool Player::LoadFromDB(uint32 guid, SQLQueryHolder *holder)
// check PLAYER_CHOSEN_TITLE compatibility with PLAYER__FIELD_KNOWN_TITLES
// note: PLAYER__FIELD_KNOWN_TITLES updated at quest status loaded
- uint32 curTitle = fields[45].GetUInt32();
+ uint32 curTitle = fields[43].GetUInt32();
if (curTitle && !HasTitle(curTitle))
curTitle = 0;
@@ -17221,14 +17221,14 @@ bool Player::LoadFromDB(uint32 guid, SQLQueryHolder *holder)
UpdateAllStats();
// restore remembered power/health values (but not more max values)
- uint32 savedHealth = fields[48].GetUInt32();
+ uint32 savedHealth = fields[46].GetUInt32();
SetHealth(savedHealth > GetMaxHealth() ? GetMaxHealth() : savedHealth);
uint32 loadedPowers = 0;
for (uint32 i = 0; i < MAX_POWERS; ++i)
{
if (GetPowerIndexByClass(Powers(i), getClass()) != MAX_POWERS)
{
- uint32 savedPower = fields[49+loadedPowers].GetUInt32();
+ uint32 savedPower = fields[47+loadedPowers].GetUInt32();
uint32 maxPower = GetUInt32Value(UNIT_FIELD_MAXPOWER1 + loadedPowers);
SetPower(Powers(i), (savedPower > maxPower) ? maxPower : savedPower);
if (++loadedPowers >= MAX_STORED_POWERS)
@@ -17307,7 +17307,7 @@ bool Player::LoadFromDB(uint32 guid, SQLQueryHolder *holder)
}
// RaF stuff.
- m_grantableLevels = fields[61].GetUInt8();
+ m_grantableLevels = fields[59].GetUInt8();
if (GetSession()->IsARecruiter() || (GetSession()->GetRecruiterId() != 0))
SetFlag(UNIT_DYNAMIC_FLAGS, UNIT_DYNFLAG_REFER_A_FRIEND);
@@ -18727,8 +18727,6 @@ void Player::SaveToDB(bool create /*=false*/)
ss << m_taxi.SaveTaxiDestinationsToString();
stmt->setString(index++, ss.str());
- stmt->setUInt32(index++, GetCurrency(CURRENCY_TYPE_CONQUEST_POINTS));
- stmt->setUInt32(index++, GetCurrency(CURRENCY_TYPE_HONOR_POINTS));
stmt->setUInt32(index++, GetUInt32Value(PLAYER_FIELD_LIFETIME_HONORABLE_KILLS));
stmt->setUInt16(index++, GetUInt16Value(PLAYER_FIELD_KILLS, 0));
stmt->setUInt16(index++, GetUInt16Value(PLAYER_FIELD_KILLS, 1));
@@ -18849,8 +18847,6 @@ void Player::SaveToDB(bool create /*=false*/)
ss << m_taxi.SaveTaxiDestinationsToString();
stmt->setString(index++, ss.str());
- stmt->setUInt32(index++, GetCurrency(CURRENCY_TYPE_CONQUEST_POINTS));
- stmt->setUInt32(index++, GetCurrency(CURRENCY_TYPE_HONOR_POINTS));
stmt->setUInt32(index++, GetUInt32Value(PLAYER_FIELD_LIFETIME_HONORABLE_KILLS));
stmt->setUInt16(index++, GetUInt16Value(PLAYER_FIELD_KILLS, 0));
stmt->setUInt16(index++, GetUInt16Value(PLAYER_FIELD_KILLS, 1));