aboutsummaryrefslogtreecommitdiff
path: root/src/game/Player.cpp
diff options
context:
space:
mode:
authorQAston <none@none>2009-06-23 13:05:15 +0200
committerQAston <none@none>2009-06-23 13:05:15 +0200
commitad91c6b1e22c43d9418464087b9d27a841e4ce04 (patch)
treeabd14f0cd6dfed1e3cdae612e91bbac57cc1c71d /src/game/Player.cpp
parentd1d26524d2889285d11cebf52b07da34906eb81d (diff)
[8052] Fixed typo in error log output. Author: The_Game_Master
[8049] Added energize effect after last heal tick for 33763 and ranks. Author: bobaz [8053] At character talents reset using chat command also reset talents for all character pets. Author: VladimirMangos --HG-- branch : trunk
Diffstat (limited to 'src/game/Player.cpp')
-rw-r--r--src/game/Player.cpp20
1 files changed, 11 insertions, 9 deletions
diff --git a/src/game/Player.cpp b/src/game/Player.cpp
index 17203faadde..160737ecfd8 100644
--- a/src/game/Player.cpp
+++ b/src/game/Player.cpp
@@ -3528,10 +3528,7 @@ bool Player::resetTalents(bool no_cost)
{
// not need after this call
if(HasAtLoginFlag(AT_LOGIN_RESET_TALENTS))
- {
- m_atLoginFlags = m_atLoginFlags & ~AT_LOGIN_RESET_TALENTS;
- CharacterDatabase.PExecute("UPDATE characters set at_login = at_login & ~ %u WHERE guid ='%u'", uint32(AT_LOGIN_RESET_TALENTS), GetGUIDLow());
- }
+ RemoveAtLoginFlag(AT_LOGIN_RESET_TALENTS,true);
uint32 talentPointsForLevel = CalculateTalentsPoints();
@@ -16000,7 +15997,7 @@ void Player::SaveToDB()
ss << uint32(m_stableSlots); // to prevent save uint8 as char
ss << ", ";
- ss << uint32(m_atLoginFlags & ((1<<AT_LOAD_PET_FLAGS) -1));
+ ss << uint32(m_atLoginFlags);
ss << ", ";
ss << GetZoneId();
@@ -18883,10 +18880,7 @@ void Player::resetSpells()
{
// not need after this call
if(HasAtLoginFlag(AT_LOGIN_RESET_SPELLS))
- {
- m_atLoginFlags = m_atLoginFlags & ~AT_LOGIN_RESET_SPELLS;
- CharacterDatabase.PExecute("UPDATE characters SET at_login = at_login & ~ %u WHERE guid ='%u'", uint32(AT_LOGIN_RESET_SPELLS), GetGUIDLow());
- }
+ RemoveAtLoginFlag(AT_LOGIN_RESET_SPELLS,true);
// make full copy of map (spells removed and marked as deleted at another spell remove
// and we can't use original map for safe iterative with visit each spell at loop end
@@ -21130,3 +21124,11 @@ void Player::ActivateSpec(uint32 specNum)
resetTalents(true);
}
+
+void Player::RemoveAtLoginFlag( AtLoginFlags f, bool in_db_also /*= false*/ )
+{
+ m_atLoginFlags &= ~f;
+
+ if(in_db_also)
+ CharacterDatabase.PExecute("UPDATE characters set at_login = at_login & ~ %u WHERE guid ='%u'", uint32(f), GetGUIDLow());
+}