aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorShauren <shauren.trinity@gmail.com>2014-07-23 11:20:50 +0200
committerShauren <shauren.trinity@gmail.com>2014-07-23 11:20:50 +0200
commit22e16b2460c4ddde02861ee08a4bbfd81d7c534f (patch)
tree9e10cd45047d234c6def73f183164945eb560a24
parentb7251e1c9ebf9f4151adb46cae77b1213ebd5bf8 (diff)
Core/Players: Set fist weapon skill value equal to current unarmed skill when learning fist weapons for the first time
-rw-r--r--src/server/game/Entities/Player/Player.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/server/game/Entities/Player/Player.cpp b/src/server/game/Entities/Player/Player.cpp
index a694b45d118..ee93fc09f5e 100644
--- a/src/server/game/Entities/Player/Player.cpp
+++ b/src/server/game/Entities/Player/Player.cpp
@@ -23127,6 +23127,8 @@ void Player::LearnDefaultSkill(uint32 skillId, uint16 rank)
skillValue = maxValue;
else if (getClass() == CLASS_DEATH_KNIGHT)
skillValue = std::min(std::max<uint16>({ 1, uint16((getLevel() - 1) * 5) }), maxValue);
+ else if (skillId == SKILL_FIST_WEAPONS)
+ skillValue = std::max<uint16>(1, GetSkillValue(SKILL_UNARMED));
SetSkill(skillId, 0, skillValue, maxValue);
break;
@@ -25048,6 +25050,9 @@ void Player::_LoadSkills(PreparedQueryResult result)
SetUInt32Value(PLAYER_SKILL_VALUE_INDEX(count), 0);
SetUInt32Value(PLAYER_SKILL_BONUS_INDEX(count), 0);
}
+
+ if (HasSkill(SKILL_FIST_WEAPONS))
+ SetSkill(SKILL_FIST_WEAPONS, 0, GetSkillValue(SKILL_UNARMED), GetMaxSkillValueForLevel());
}
uint32 Player::GetPhaseMaskForSpawn() const