Reapply the previous "actionbars"-fix/handling db/coreside
Fixes issue #1669 Note: This issue has been a pain in the rear, as it was actually messing up clients that ran a vanilla client without addons. The issue only comes in to place when players load a SINGLE actionbar, and not selecting "activate all bars". Extensive testing and debugging done to figure out why this actually happened - I'll fricking shoot the next one messing with it! --HG-- branch : trunk
This commit is contained in:
+9
-4
@@ -15528,8 +15528,8 @@ bool Player::LoadFromDB(uint32 guid, SqlQueryHolder *holder)
|
||||
//"resettalents_time, trans_x, trans_y, trans_z, trans_o, transguid, extra_flags, stable_slots, at_login, zone, online, death_expire_time, taxi_path, dungeon_difficulty,"
|
||||
// 39 40 41 42 43 44 45 46 47 48 49
|
||||
//"arenaPoints, totalHonorPoints, todayHonorPoints, yesterdayHonorPoints, totalKills, todayKills, yesterdayKills, chosenTitle, knownCurrencies, watchedFaction, drunk,"
|
||||
// 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64
|
||||
//"health, power1, power2, power3, power4, power5, power6, power7, instance_id, speccount, activespec, exploredZones, equipmentCache, ammoId, knownTitles FROM characters WHERE guid = '%u'", guid);
|
||||
// 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65
|
||||
//"health, power1, power2, power3, power4, power5, power6, power7, instance_id, speccount, activespec, exploredZones, equipmentCache, ammoId, knownTitles, actionBars FROM characters WHERE guid = '%u'", guid);
|
||||
QueryResult_AutoPtr result = holder->GetResult(PLAYER_LOGIN_QUERY_LOADFROM);
|
||||
|
||||
if (!result)
|
||||
@@ -15597,6 +15597,9 @@ bool Player::LoadFromDB(uint32 guid, SqlQueryHolder *holder)
|
||||
|
||||
SetUInt32Value(PLAYER_AMMO_ID, fields[63].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[65].GetUInt8());
|
||||
|
||||
InitDisplayIds();
|
||||
|
||||
// cleanup inventory related item value fields (its will be filled correctly in _LoadInventory)
|
||||
@@ -17297,7 +17300,7 @@ void Player::SaveToDB()
|
||||
"trans_x, trans_y, trans_z, trans_o, transguid, extra_flags, stable_slots, at_login, zone, "
|
||||
"death_expire_time, taxi_path, arenaPoints, totalHonorPoints, todayHonorPoints, yesterdayHonorPoints, totalKills, "
|
||||
"todayKills, yesterdayKills, chosenTitle, knownCurrencies, watchedFaction, drunk, health, power1, power2, power3, "
|
||||
"power4, power5, power6, power7, latency, speccount, activespec, exploredZones, equipmentCache, ammoId, knownTitles) VALUES ("
|
||||
"power4, power5, power6, power7, latency, speccount, activespec, exploredZones, equipmentCache, ammoId, knownTitles, actionBars) VALUES ("
|
||||
<< GetGUIDLow() << ", "
|
||||
<< GetSession()->GetAccountId() << ", '"
|
||||
<< sql_name << "', "
|
||||
@@ -17421,7 +17424,9 @@ void Player::SaveToDB()
|
||||
{
|
||||
ss << GetUInt32Value(PLAYER__FIELD_KNOWN_TITLES + i) << " ";
|
||||
}
|
||||
ss << "')";
|
||||
ss << "',";
|
||||
ss << uint32(GetByteValue(PLAYER_FIELD_BYTES, 2));
|
||||
ss << ")";
|
||||
|
||||
CharacterDatabase.BeginTransaction();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user