From 4e81b6c98ba4784147e91aca04cbbe8ece2d874d Mon Sep 17 00:00:00 2001 From: Wowka321 Date: Sat, 3 Apr 2010 11:12:38 +0200 Subject: [PATCH] [9666] Check max. honor points on characteacter login. Signed-off-by: hunuza --- src/game/Player.cpp | 6 +++++- src/shared/revision_nr.h | 2 +- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/src/game/Player.cpp b/src/game/Player.cpp index 5915123a1..52e9a641a 100644 --- a/src/game/Player.cpp +++ b/src/game/Player.cpp @@ -14840,7 +14840,11 @@ bool Player::LoadFromDB( uint32 guid, SqlQueryHolder *holder ) SetArenaTeamInfoField(arena_slot, ArenaTeamInfoType(j), 0); } - SetUInt32Value(PLAYER_FIELD_HONOR_CURRENCY, fields[40].GetUInt32()); + uint32 honor_currency = fields[40].GetUInt32(); + if (honor_currency > sWorld.getConfig(CONFIG_UINT32_MAX_HONOR_POINTS)) + honor_currency = sWorld.getConfig(CONFIG_UINT32_MAX_HONOR_POINTS); + SetUInt32Value(PLAYER_FIELD_HONOR_CURRENCY, honor_currency); + SetUInt32Value(PLAYER_FIELD_TODAY_CONTRIBUTION, fields[41].GetUInt32()); SetUInt32Value(PLAYER_FIELD_YESTERDAY_CONTRIBUTION, fields[42].GetUInt32()); SetUInt32Value(PLAYER_FIELD_LIFETIME_HONORBALE_KILLS, fields[43].GetUInt32()); diff --git a/src/shared/revision_nr.h b/src/shared/revision_nr.h index ff915046d..404f17caa 100644 --- a/src/shared/revision_nr.h +++ b/src/shared/revision_nr.h @@ -1,4 +1,4 @@ #ifndef __REVISION_NR_H__ #define __REVISION_NR_H__ - #define REVISION_NR "9665" + #define REVISION_NR "9666" #endif // __REVISION_NR_H__