Merge commit '9ee820d83d2bc3a2fb7c88047874c6420b116799' into 4.3.4
Conflicts: src/server/game/Entities/Player/Player.cpp
This commit is contained in:
commit
9fca7b8017
1 file changed
+6
-2
@@ -25646,6 +25646,7 @@ void Player::_LoadSkills(PreparedQueryResult result)
|
||||
|
||||
uint32 count = 0;
|
||||
uint8 professionCount = 0;
|
||||
std::unordered_map<uint32, uint32> loadedSkillValues;
|
||||
if (result)
|
||||
{
|
||||
do
|
||||
@@ -25722,8 +25723,7 @@ void Player::_LoadSkills(PreparedQueryResult result)
|
||||
SetUInt16Value(PLAYER_SKILL_TALENT_0 + field, offset, 0);
|
||||
|
||||
mSkillStatus.insert(SkillStatusMap::value_type(skill, SkillStatusData(count, SKILL_UNCHANGED)));
|
||||
|
||||
LearnSkillRewardedSpells(skill, value);
|
||||
loadedSkillValues[skill] = value;
|
||||
|
||||
++count;
|
||||
|
||||
@@ -25736,6 +25736,10 @@ void Player::_LoadSkills(PreparedQueryResult result)
|
||||
while (result->NextRow());
|
||||
}
|
||||
|
||||
// Learn skill rewarded spells after all skills have been loaded to prevent learning a skill from them before its loaded with proper value from DB
|
||||
for (auto& skill : loadedSkillValues)
|
||||
LearnSkillRewardedSpells(skill.first, skill.second);
|
||||
|
||||
for (; count < PLAYER_MAX_SKILLS; ++count)
|
||||
{
|
||||
uint16 field = count / 2;
|
||||
|
||||
Reference in new issue
Block a user