aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorclick <none@none>2010-04-13 18:35:00 +0200
committerclick <none@none>2010-04-13 18:35:00 +0200
commitb5e9b5fa13fbc4f0f2d22ab3d1e12c5297efe3e3 (patch)
treeb1a8756695399a2a40ccfe44466c931850bac9fa
parenta02e0bb4bf227642877b705b86651a795da01f18 (diff)
* Fix actionbars-issue with talent-based spells/actions disappearing
* Revert previous mess someone(tm) made with the "reinstating" actionBars -field (me!) --HG-- branch : trunk
-rw-r--r--sql/characters.sql3
-rw-r--r--sql/updates/7885_characters_characters.sql2
-rw-r--r--src/game/CharacterHandler.cpp2
-rw-r--r--src/game/Player.cpp19
4 files changed, 10 insertions, 16 deletions
diff --git a/sql/characters.sql b/sql/characters.sql
index a88c2b225c2..1cee28f6ad5 100644
--- a/sql/characters.sql
+++ b/sql/characters.sql
@@ -390,8 +390,7 @@ CREATE TABLE `characters` (
`exploredZones` longtext,
`equipmentCache` longtext,
`ammoId` int(10) UNSIGNED NOT NULL default '0',
- `knownTitles` longtext,
- `actionBars` tinyint(3) UNSIGNED NOT NULL default '0',
+ `knownTitles` longtext
PRIMARY KEY (`guid`),
KEY `idx_account` (`account`),
KEY `idx_online` (`online`),
diff --git a/sql/updates/7885_characters_characters.sql b/sql/updates/7885_characters_characters.sql
deleted file mode 100644
index de2aa82d2f5..00000000000
--- a/sql/updates/7885_characters_characters.sql
+++ /dev/null
@@ -1,2 +0,0 @@
-ALTER TABLE characters
- ADD COLUMN `actionBars` tinyint(3) UNSIGNED NOT NULL default '0' AFTER knownTitles;
diff --git a/src/game/CharacterHandler.cpp b/src/game/CharacterHandler.cpp
index 56484a5fd27..84c893aa526 100644
--- a/src/game/CharacterHandler.cpp
+++ b/src/game/CharacterHandler.cpp
@@ -69,7 +69,7 @@ bool LoginQueryHolder::Initialize()
"position_x, position_y, position_z, map, orientation, taximask, cinematic, totaltime, leveltime, rest_bonus, logout_time, is_logout_resting, resettalents_cost,"
"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,"
"arenaPoints, totalHonorPoints, todayHonorPoints, yesterdayHonorPoints, totalKills, todayKills, yesterdayKills, chosenTitle, knownCurrencies, watchedFaction, drunk,"
- "health, power1, power2, power3, power4, power5, power6, power7, instance_id, speccount, activespec, exploredZones, equipmentCache, ammoId, knownTitles, actionBars FROM characters WHERE guid = '%u'", GUID_LOPART(m_guid));
+ "health, power1, power2, power3, power4, power5, power6, power7, instance_id, speccount, activespec, exploredZones, equipmentCache, ammoId, knownTitles FROM characters WHERE guid = '%u'", GUID_LOPART(m_guid));
res &= SetPQuery(PLAYER_LOGIN_QUERY_LOADGROUP, "SELECT leaderGuid FROM group_member WHERE memberGuid ='%u'", GUID_LOPART(m_guid));
res &= SetPQuery(PLAYER_LOGIN_QUERY_LOADBOUNDINSTANCES, "SELECT id, permanent, map, difficulty, resettime FROM character_instance LEFT JOIN instance ON instance = id WHERE guid = '%u'", GUID_LOPART(m_guid));
res &= SetPQuery(PLAYER_LOGIN_QUERY_LOADAURAS, "SELECT caster_guid,spell,effect_mask,recalculate_mask,stackcount,amount0,amount1,amount2,base_amount0,base_amount1,base_amount2,maxduration,remaintime,remaincharges FROM character_aura WHERE guid = '%u'", GUID_LOPART(m_guid));
diff --git a/src/game/Player.cpp b/src/game/Player.cpp
index ffb26c48b33..666ebd26f56 100644
--- a/src/game/Player.cpp
+++ b/src/game/Player.cpp
@@ -15557,8 +15557,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 65
- //"health, power1, power2, power3, power4, power5, power6, power7, instance_id, speccount, activespec, exploredZones, equipmentCache, ammoId, knownTitles, actionBars FROM characters WHERE guid = '%u'", guid);
+ // 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);
QueryResult_AutoPtr result = holder->GetResult(PLAYER_LOGIN_QUERY_LOADFROM);
if (!result)
@@ -15626,8 +15626,6 @@ bool Player::LoadFromDB(uint32 guid, SqlQueryHolder *holder)
SetUInt32Value(PLAYER_AMMO_ID, fields[63].GetUInt32());
- SetByteValue(PLAYER_FIELD_BYTES, 2, fields[65].GetUInt8());
-
InitDisplayIds();
// cleanup inventory related item value fields (its will be filled correctly in _LoadInventory)
@@ -17300,7 +17298,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, actionBars) VALUES ("
+ "power4, power5, power6, power7, latency, speccount, activespec, exploredZones, equipmentCache, ammoId, knownTitles) VALUES ("
<< GetGUIDLow() << ", "
<< GetSession()->GetAccountId() << ", '"
<< sql_name << "', "
@@ -17424,9 +17422,7 @@ void Player::SaveToDB()
{
ss << GetUInt32Value(PLAYER__FIELD_KNOWN_TITLES + i) << " ";
}
- ss << "',";
- ss << uint32(GetByteValue(PLAYER_FIELD_BYTES, 2));
- ss << ")";
+ ss << "')";
CharacterDatabase.BeginTransaction();
@@ -23249,6 +23245,10 @@ void Player::ActivateSpec(uint8 spec)
//RemoveAllAuras(this->GetGUID(), NULL, false, true); // removes too many auras
//ExitVehicle(); // should be impossible to switch specs from inside a vehicle..
+ // Let client clear his current Actions
+ SendActionButtons(2);
+ m_actionButtons.clear();
+
for (uint32 i = 0; i < sTalentStore.GetNumRows(); ++i)
{
TalentEntry const *talentInfo = sTalentStore.LookupEntry(i);
@@ -23341,9 +23341,6 @@ void Player::ActivateSpec(uint8 spec)
m_usedTalentCount = spentTalents;
InitTalentForLevel();
- // Let client clear his current Actions
- SendActionButtons(2);
- m_actionButtons.clear();
if (QueryResult_AutoPtr result = CharacterDatabase.PQuery("SELECT button,action,type FROM character_action WHERE guid = '%u' AND spec = '%u' ORDER BY button", GetGUIDLow(), m_activeSpec))
_LoadActions(result, false);