Jump to content

[9666][fix] config_max_honor_points


Guest Wowka321

Recommended Posts

Master branch.

When player login, core ignore CONFIG_MAX_HONOR_POINTS.

This is the fix

From de5b9c124e5cb2e6e3ef07dd25350acef6f810d7 Mon Sep 17 00:00:00 2001
From: Wowka321 <[email protected]>
Date: Fri, 15 Jan 2010 19:18:25 +0200
Subject: [PATCH] Fixed max honor

---
src/game/Player.cpp |    6 ++++++
1 files changed, 6 insertions(+), 0 deletions(-)

diff --git a/src/game/Player.cpp b/src/game/Player.cpp
index ce1120a..ce3aa4e 100644
--- a/src/game/Player.cpp
+++ b/src/game/Player.cpp
@@ -14966,6 +14966,12 @@ bool Player::LoadFromDB( uint32 guid, SqlQueryHolder *holder )

    _LoadArenaTeamInfo(holder->GetResult(PLAYER_LOGIN_QUERY_LOADARENAINFO));

+    uint32 honor_currency = GetUInt32Value(PLAYER_FIELD_HONOR_CURRENCY);
+    if (honor_currency > sWorld.getConfig(CONFIG_MAX_HONOR_POINTS))
+        honor_currency = sWorld.getConfig(CONFIG_MAX_HONOR_POINTS);
+
+    SetUInt32Value(PLAYER_FIELD_HONOR_CURRENCY, honor_currency);
+
    uint32 arena_currency = GetUInt32Value(PLAYER_FIELD_ARENA_CURRENCY) + fields[40].GetUInt32();
    if (arena_currency > sWorld.getConfig(CONFIG_MAX_ARENA_POINTS))
        arena_currency = sWorld.getConfig(CONFIG_MAX_ARENA_POINTS);
-- 
1.6.0.2.1172.ga5ed0

Link to comment
Share on other sites

How "fields[39].GetUInt32();" possible when

res &= SetPQuery(PLAYER_LOGIN_QUERY_LOADFROM, "SELECT guid, account, data, name, race, class, gender, level, xp, money, playerBytes, playerBytes2, playerFlags, 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, arena_pending_points FROM characters WHERE guid = '%u'", GUID_LOPART(m_guid));

Link to comment
Share on other sites

  • 2 months later...
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. Privacy Policy Terms of Use