aboutsummaryrefslogtreecommitdiff
path: root/src/game/BattleGroundMgr.cpp
diff options
context:
space:
mode:
authorBrian <runningnak3d@gmail.com>2010-03-02 10:12:47 -0700
committerBrian <runningnak3d@gmail.com>2010-03-02 10:12:47 -0700
commit74ccd57597441a22f01b168a4dd2ce0a2cd38fb2 (patch)
tree7b092c8b8f3ac3c22e9f312b4be900696d1a16e5 /src/game/BattleGroundMgr.cpp
parentd3e09cb65f1c3e61263040708c8ac1a8e4ee4f42 (diff)
* Move some values out of the data blob in the characters table
* (honor, kills, title, currencies, watched faction, drunken-status, health and power) * Original Author Hunuza - thank you * Ported to Trinity by RammboNr5 - thank you * Tested by Aokromes - thank you * Closes Issue #911 --HG-- branch : trunk
Diffstat (limited to 'src/game/BattleGroundMgr.cpp')
-rw-r--r--src/game/BattleGroundMgr.cpp14
1 files changed, 4 insertions, 10 deletions
diff --git a/src/game/BattleGroundMgr.cpp b/src/game/BattleGroundMgr.cpp
index 864268fc07a..92723ae7ca2 100644
--- a/src/game/BattleGroundMgr.cpp
+++ b/src/game/BattleGroundMgr.cpp
@@ -1815,19 +1815,13 @@ void BattleGroundMgr::DistributeArenaPoints()
//cycle that gives points to all players
for (std::map<uint32, uint32>::iterator plr_itr = PlayerPoints.begin(); plr_itr != PlayerPoints.end(); ++plr_itr)
{
- //add points to player
+ //update to database
+ CharacterDatabase.PExecute("UPDATE characters SET arenaPoints = arenaPoints + '%u' WHERE guid = '%u'", plr_itr->second, plr_itr->first);
+
+ //add points to player if online
Player* pl = objmgr.GetPlayer(plr_itr->first);
if (pl)
- {
- CharacterDatabase.PExecute("UPDATE characters SET arena_pending_points = '%u' WHERE guid = '%u'", plr_itr->second, plr_itr->first);
pl->ModifyArenaPoints(plr_itr->second);
- }
- else
- {
- CharacterDatabase.PExecute("UPDATE characters SET arena_pending_points = 0 WHERE guid = '%u'", plr_itr->first);
- CharacterDatabase._UpdateDataBlobValue(plr_itr->first, PLAYER_FIELD_ARENA_CURRENCY,
- std::min(int32(plr_itr->second),int32(sWorld.getConfig(CONFIG_MAX_ARENA_POINTS))));
- }
}
PlayerPoints.clear();