Implement profession skillgains != 1 (+2, +3)

This commit is contained in:
Yaki Khadafi 2015-02-03 05:36:23 +00:00 committed by Antz
parent 29bbdd40bf
commit d52b124382
3 changed files with 6 additions and 2 deletions

View file

@ -5541,6 +5541,10 @@ bool Player::UpdateCraftSkill(uint32 spellid)
} }
uint32 craft_skill_gain = sWorld.getConfig(CONFIG_UINT32_SKILL_GAIN_CRAFTING); uint32 craft_skill_gain = sWorld.getConfig(CONFIG_UINT32_SKILL_GAIN_CRAFTING);
if (!_spell_idx->second->characterPoints)
sLog.outError("Player::UpdateCraftSkill spell %u has characterPoints == 0!");
else
craft_skill_gain += _spell_idx->second->characterPoints - 1;
return UpdateSkillPro(_spell_idx->second->skillId, SkillGainChance(SkillValue, return UpdateSkillPro(_spell_idx->second->skillId, SkillGainChance(SkillValue,
_spell_idx->second->max_value, _spell_idx->second->max_value,

View file

@ -1639,7 +1639,7 @@ struct SkillLineAbilityEntry
uint32 learnOnGetSkill; // 9 m_acquireMethod uint32 learnOnGetSkill; // 9 m_acquireMethod
uint32 max_value; // 10 m_trivialSkillLineRankHigh uint32 max_value; // 10 m_trivialSkillLineRankHigh
uint32 min_value; // 11 m_trivialSkillLineRankLow uint32 min_value; // 11 m_trivialSkillLineRankLow
//uint32 // 12 uint32 characterPoints; // 12 4.0.0
//uint32 // 13 4.0.0 //uint32 // 13 4.0.0
}; };

View file

@ -109,7 +109,7 @@ const char RandomPropertiesPointsfmt[] = "niiiiiiiiiiiiiii";
const char ScalingStatDistributionfmt[]="niiiiiiiiiiiiiiiiiiiixi"; const char ScalingStatDistributionfmt[]="niiiiiiiiiiiiiiiiiiiixi";
const char ScalingStatValuesfmt[]="iniiiiiiiiiiiiiiiiiiiixxxxxxxxxxxxxxxxxxxxxxxxx"; const char ScalingStatValuesfmt[]="iniiiiiiiiiiiiiiiiiiiixxxxxxxxxxxxxxxxxxxxxxxxx";
const char SkillLinefmt[]="nisxixi"; const char SkillLinefmt[]="nisxixi";
const char SkillLineAbilityfmt[] = "niiiixxiiiiixx"; const char SkillLineAbilityfmt[] = "niiiixxiiiiiix";
const char SkillRaceClassInfofmt[]="diiiiixxx"; const char SkillRaceClassInfofmt[]="diiiiixxx";
const char SoundEntriesfmt[]="nissssssssssssssssssssssxxxxxxxxxxx"; const char SoundEntriesfmt[]="nissssssssssssssssssssssxxxxxxxxxxx";
const char SpellCastTimefmt[]="niii"; const char SpellCastTimefmt[]="niii";