diff options
| -rw-r--r-- | sql/base/characters_database.sql | 20 | ||||
| -rwxr-xr-x | src/server/game/Entities/Player/Player.cpp | 32 |
2 files changed, 18 insertions, 34 deletions
diff --git a/sql/base/characters_database.sql b/sql/base/characters_database.sql index 1410a5b0008..bce0a211b3c 100644 --- a/sql/base/characters_database.sql +++ b/sql/base/characters_database.sql @@ -1031,12 +1031,6 @@ CREATE TABLE `character_stats` ( `maxpower3` int(10) unsigned NOT NULL DEFAULT '0', `maxpower4` int(10) unsigned NOT NULL DEFAULT '0', `maxpower5` int(10) unsigned NOT NULL DEFAULT '0', - `maxpower6` int(10) unsigned NOT NULL DEFAULT '0', - `maxpower7` int(10) unsigned NOT NULL DEFAULT '0', - `maxpower8` int(10) unsigned NOT NULL DEFAULT '0', - `maxpower9` int(10) unsigned NOT NULL DEFAULT '0', - `maxpower10` int(10) unsigned NOT NULL DEFAULT '0', - `maxpower11` int(10) unsigned NOT NULL DEFAULT '0', `strength` int(10) unsigned NOT NULL DEFAULT '0', `agility` int(10) unsigned NOT NULL DEFAULT '0', `stamina` int(10) unsigned NOT NULL DEFAULT '0', @@ -1144,15 +1138,12 @@ CREATE TABLE `characters` ( `zone` smallint(5) unsigned NOT NULL DEFAULT '0', `death_expire_time` int(10) unsigned NOT NULL DEFAULT '0', `taxi_path` text, - `arenaPoints` int(10) unsigned NOT NULL DEFAULT '0', + `conquestPoints` int(10) unsigned NOT NULL DEFAULT '0', `totalHonorPoints` int(10) unsigned NOT NULL DEFAULT '0', - `todayHonorPoints` int(10) unsigned NOT NULL DEFAULT '0', - `yesterdayHonorPoints` int(10) unsigned NOT NULL DEFAULT '0', `totalKills` int(10) unsigned NOT NULL DEFAULT '0', `todayKills` smallint(5) unsigned NOT NULL DEFAULT '0', `yesterdayKills` smallint(5) unsigned NOT NULL DEFAULT '0', `chosenTitle` int(10) unsigned NOT NULL DEFAULT '0', - `knownCurrencies` bigint(20) unsigned NOT NULL DEFAULT '0', `watchedFaction` int(10) unsigned NOT NULL DEFAULT '0', `drunk` smallint(5) unsigned NOT NULL DEFAULT '0', `health` int(10) unsigned NOT NULL DEFAULT '0', @@ -1161,21 +1152,15 @@ CREATE TABLE `characters` ( `power3` int(10) unsigned NOT NULL DEFAULT '0', `power4` int(10) unsigned NOT NULL DEFAULT '0', `power5` int(10) unsigned NOT NULL DEFAULT '0', - `power6` int(10) unsigned NOT NULL DEFAULT '0', - `power7` int(10) unsigned NOT NULL DEFAULT '0', - `power8` int(10) unsigned NOT NULL DEFAULT '0', - `power9` int(10) unsigned NOT NULL DEFAULT '0', - `power10` int(10) unsigned NOT NULL DEFAULT '0', - `power11` int(10) unsigned NOT NULL DEFAULT '0', `latency` mediumint(8) unsigned NOT NULL DEFAULT '0', `speccount` tinyint(3) unsigned NOT NULL DEFAULT '1', `activespec` tinyint(3) unsigned NOT NULL DEFAULT '0', `exploredZones` longtext, `equipmentCache` longtext, - `ammoId` int(10) unsigned NOT NULL DEFAULT '0', `knownTitles` longtext, `actionBars` tinyint(3) unsigned NOT NULL DEFAULT '0', `grantableLevels` tinyint(3) unsigned NOT NULL DEFAULT '0', + `guildId` int(10) unsigned NOT NULL DEFAULT '0', `deleteInfos_Account` int(10) unsigned DEFAULT NULL, `deleteInfos_Name` varchar(12) DEFAULT NULL, `deleteDate` int(10) unsigned DEFAULT NULL, @@ -1215,7 +1200,6 @@ CREATE TABLE `corpse` ( `itemCache` text NOT NULL, `bytes1` int(10) unsigned NOT NULL DEFAULT '0', `bytes2` int(10) unsigned NOT NULL DEFAULT '0', - `guildId` int(10) unsigned NOT NULL DEFAULT '0', `flags` tinyint(3) unsigned NOT NULL DEFAULT '0', `dynFlags` tinyint(3) unsigned NOT NULL DEFAULT '0', `time` int(10) unsigned NOT NULL DEFAULT '0', diff --git a/src/server/game/Entities/Player/Player.cpp b/src/server/game/Entities/Player/Player.cpp index 82d63790b32..f4098613cf9 100755 --- a/src/server/game/Entities/Player/Player.cpp +++ b/src/server/game/Entities/Player/Player.cpp @@ -16439,11 +16439,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 //"resettalents_time, 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, " - // 39 40 41 42 43 44 45 46 47 - //"conquestPoints, totalHonorPoints, totalKills, todayKills, yesterdayKills, chosenTitle, knownCurrencies, watchedFaction, drunk, " - // 48 49 50 51 52 53 54 55 56 57 58 + // 39 40 41 42 43 44 45 46 + //"conquestPoints, totalHonorPoints, totalKills, todayKills, yesterdayKills, chosenTitle, watchedFaction, drunk, " + // 47 48 49 50 51 52 53 54 55 56 57 //"health, power1, power2, power3, power4, power5, instance_id, speccount, activespec, exploredZones, equipmentCache, " - // 59 60 61 62 + // 58 59 60 61 //"knownTitles, actionBars, grantableLevels, guildId FROM characters WHERE guid = '%u'", guid); PreparedQueryResult result = holder->GetPreparedResult(PLAYER_LOGIN_QUERY_LOADFROM); @@ -16503,8 +16503,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[56].GetCString(), PLAYER_EXPLORED_ZONES_1, PLAYER_EXPLORED_ZONES_SIZE); + _LoadIntoDataField(fields[58].GetCString(), PLAYER__FIELD_KNOWN_TITLES, KNOWN_TITLES_SIZE*2); SetFloatValue(UNIT_FIELD_BOUNDINGRADIUS, DEFAULT_WORLD_OBJECT_SIZE); SetFloatValue(UNIT_FIELD_COMBATREACH, 1.5f); @@ -16520,12 +16520,12 @@ bool Player::LoadFromDB(uint32 guid, SQLQueryHolder *holder) SetUInt32Value(PLAYER_BYTES, fields[9].GetUInt32()); SetUInt32Value(PLAYER_BYTES_2, fields[10].GetUInt32()); - SetUInt32Value(PLAYER_BYTES_3, (fields[47].GetUInt16() & 0xFFFE) | fields[5].GetUInt8()); + SetUInt32Value(PLAYER_BYTES_3, (fields[46].GetUInt16() & 0xFFFE) | fields[5].GetUInt8()); SetUInt32Value(PLAYER_FLAGS, fields[11].GetUInt32()); - SetInt32Value(PLAYER_FIELD_WATCHED_FACTION_INDEX, fields[48].GetUInt32()); + SetInt32Value(PLAYER_FIELD_WATCHED_FACTION_INDEX, fields[45].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[59].GetUInt8()); InitDisplayIds(); @@ -16556,7 +16556,7 @@ bool Player::LoadFromDB(uint32 guid, SQLQueryHolder *holder) uint32 transGUID = uint32(fields[30].GetUInt64()); // field type is uint64 but lowguid is saved Relocate(fields[12].GetFloat(), fields[13].GetFloat(), fields[14].GetFloat(), fields[16].GetFloat()); uint32 mapId = fields[15].GetUInt16(); - uint32 instanceId = fields[54].GetUInt8(); + uint32 instanceId = fields[53].GetUInt8(); uint32 dungeonDiff = fields[38].GetUInt32() & 0x0F; if (dungeonDiff >= MAX_DUNGEON_DIFFICULTY) @@ -16915,8 +16915,8 @@ bool Player::LoadFromDB(uint32 guid, SQLQueryHolder *holder) //mails are loaded only when needed ;-) - when player in game click on mailbox. //_LoadMail(); - m_specsCount = fields[55].GetUInt8(); - m_activeSpec = fields[56].GetUInt8(); + m_specsCount = fields[54].GetUInt8(); + m_activeSpec = fields[55].GetUInt8(); // sanity check if (m_specsCount > MAX_TALENT_SPECS || m_activeSpec > MAX_TALENT_SPEC || m_specsCount < MIN_TALENT_SPECS) @@ -16986,11 +16986,11 @@ 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[47].GetUInt32(); SetHealth(savedHealth > GetMaxHealth() ? GetMaxHealth() : savedHealth); for (uint8 i = 0; i < MAX_STORED_POWERS; ++i) { - uint32 savedPower = fields[49+i].GetUInt32(); + uint32 savedPower = fields[48+i].GetUInt32(); SetPower(Powers(i), savedPower > GetMaxPower(Powers(i)) ? GetMaxPower(Powers(i)) : savedPower); } @@ -17046,14 +17046,14 @@ bool Player::LoadFromDB(uint32 guid, SQLQueryHolder *holder) } // RaF stuff. - m_grantableLevels = fields[61].GetUInt32(); + m_grantableLevels = fields[60].GetUInt32(); if (GetSession()->IsARecruiter() || (GetSession()->GetRecruiterId() != 0)) SetFlag(UNIT_DYNAMIC_FLAGS, UNIT_DYNFLAG_REFER_A_FRIEND); if (m_grantableLevels > 0) SetByteValue(PLAYER_FIELD_BYTES, 1, 0x01); - m_guildId = fields[62].GetUInt32(); + m_guildId = fields[61].GetUInt32(); _LoadDeclinedNames(holder->GetPreparedResult(PLAYER_LOGIN_QUERY_LOADDECLINEDNAMES)); |
