aboutsummaryrefslogtreecommitdiff
path: root/src/game/Player.cpp
diff options
context:
space:
mode:
authormegamage <none@none>2009-01-18 19:01:41 -0600
committermegamage <none@none>2009-01-18 19:01:41 -0600
commit40e7dcb599c1e596151356a4cc4d6f641bc1ec05 (patch)
tree7793b2697c9151f96394f77f1d89375ee092f69a /src/game/Player.cpp
parentc85c89dc0b0564113e48bfcaf96dc2af55d73bb8 (diff)
*Update to Mangos 7111.
--HG-- branch : trunk
Diffstat (limited to 'src/game/Player.cpp')
-rw-r--r--src/game/Player.cpp18
1 files changed, 17 insertions, 1 deletions
diff --git a/src/game/Player.cpp b/src/game/Player.cpp
index 758574de90b..d89b6d9fa39 100644
--- a/src/game/Player.cpp
+++ b/src/game/Player.cpp
@@ -5254,6 +5254,22 @@ uint16 Player::GetPureSkillValue(uint32 skill) const
return 0;
}
+int16 Player::GetSkillPermBonusValue(uint32 skill) const
+{
+ if(!skill)
+ return 0;
+
+ for (int i = 0; i < PLAYER_MAX_SKILLS; i++)
+ {
+ if ((GetUInt32Value(PLAYER_SKILL_INDEX(i)) & 0x0000FFFF) == skill)
+ {
+ return SKILL_PERM_BONUS(GetUInt32Value(PLAYER_SKILL_BONUS_INDEX(i)));
+ }
+ }
+
+ return 0;
+}
+
int16 Player::GetSkillTempBonusValue(uint32 skill) const
{
if(!skill)
@@ -5442,7 +5458,7 @@ void Player::CheckExploreSystem()
if(offset >= 128)
{
- sLog.outError("ERROR: Wrong area flag %u in map data for (X: %f Y: %f) point to field PLAYER_EXPLORED_ZONES_1 + %u ( %u must be < 64 ).",areaFlag,GetPositionX(),GetPositionY(),offset,offset);
+ sLog.outError("ERROR: Wrong area flag %u in map data for (X: %f Y: %f) point to field PLAYER_EXPLORED_ZONES_1 + %u ( %u must be < 128 ).",areaFlag,GetPositionX(),GetPositionY(),offset,offset);
return;
}