Core/Players: Set fist weapon skill value equal to current unarmed skill when learning fist weapons for the first time

This commit is contained in:
Shauren committed 2014-07-23 11:20:50 +02:00
1 parent b7251e1c9e
commit 22e16b2460
1 file changed
+5
@@ -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