aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGreymane <rubenmussi@hotmail.com>2012-08-16 16:18:22 -0300
committerNay <dnpd.dd@gmail.com>2012-08-16 23:19:47 +0100
commit00e81cd98a2bd75fa0de58963c05c1c584225ca1 (patch)
tree988c42c009f21271f58c7d0e4892c0358e075f83
parentf447403f6c570cdf3d8e0293d3dc53bd53d750bb (diff)
Core/Player: Instead of not saving eclipse power, set it to 0 on player load (shauren's idea, blame him =D)
Signed-off-by: Nay <dnpd.dd@gmail.com>
-rw-r--r--src/server/game/Entities/Player/Player.cpp14
1 files changed, 3 insertions, 11 deletions
diff --git a/src/server/game/Entities/Player/Player.cpp b/src/server/game/Entities/Player/Player.cpp
index 5fad57c3b0d..d0c0a887ddb 100644
--- a/src/server/game/Entities/Player/Player.cpp
+++ b/src/server/game/Entities/Player/Player.cpp
@@ -17157,6 +17157,8 @@ bool Player::LoadFromDB(uint32 guid, SQLQueryHolder *holder)
for (; loadedPowers < MAX_STORED_POWERS; ++loadedPowers)
SetUInt32Value(UNIT_FIELD_POWER1 + loadedPowers, 0);
+ SetPower(POWER_ECLIPSE, 0);
+
// must be after loading spells and talents
Tokens talentTrees(fields[26].GetString(), ' ', MAX_TALENT_SPECS);
for (uint8 i = 0; i < MAX_TALENT_SPECS; ++i)
@@ -18657,12 +18659,7 @@ void Player::SaveToDB(bool create /*=false*/)
{
if (GetPowerIndexByClass(Powers(i), getClass()) != MAX_POWERS)
{
- // Eclipse Power isnt saved.
- if (i == POWER_ECLIPSE)
- continue;
-
stmt->setUInt32(index++, GetUInt32Value(UNIT_FIELD_POWER1 + storedPowers));
-
if (++storedPowers >= MAX_STORED_POWERS)
break;
}
@@ -18784,12 +18781,7 @@ void Player::SaveToDB(bool create /*=false*/)
{
if (GetPowerIndexByClass(Powers(i), getClass()) != MAX_POWERS)
{
- // Eclipse Power isnt saved.
- if (i == POWER_ECLIPSE)
- continue;
-
- stmt->setUInt32(index++, GetUInt32Value(UNIT_FIELD_POWER1 + storedPowers));
-
+ stmt->setUInt32(index++, GetUInt32Value(UNIT_FIELD_POWER1 + storedPowers));
if (++storedPowers >= MAX_STORED_POWERS)
break;
}