mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-17 02:50:29 +00:00
fix(Core/Spell): Add Dual Wield skill dependency to Dual Wield effect, sho… (#9162)
* Core/Spell: Add Dual Wield skill dependency to Dual Wield effect, should remove the skill properly when unlearning spell. Source: TrinityCore. Fixes #8882
This commit is contained in:
@@ -1473,20 +1473,35 @@ void SpellMgr::LoadSpellLearnSkills()
|
||||
|
||||
for (uint8 i = 0; i < MAX_SPELL_EFFECTS; ++i)
|
||||
{
|
||||
if (entry->Effects[i].Effect == SPELL_EFFECT_SKILL)
|
||||
SpellLearnSkillNode dbc_node;
|
||||
switch (entry->Effects[i].Effect)
|
||||
{
|
||||
SpellLearnSkillNode dbc_node;
|
||||
dbc_node.skill = entry->Effects[i].MiscValue;
|
||||
dbc_node.step = entry->Effects[i].CalcValue();
|
||||
if (dbc_node.skill != SKILL_RIDING)
|
||||
case SPELL_EFFECT_SKILL:
|
||||
dbc_node.skill = entry->Effects[i].MiscValue;
|
||||
dbc_node.step = entry->Effects[i].CalcValue();
|
||||
if (dbc_node.skill != SKILL_RIDING)
|
||||
{
|
||||
dbc_node.value = 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
dbc_node.value = dbc_node.step * 75;
|
||||
}
|
||||
dbc_node.maxvalue = dbc_node.step * 75;
|
||||
break;
|
||||
case SPELL_EFFECT_DUAL_WIELD:
|
||||
dbc_node.skill = SKILL_DUAL_WIELD;
|
||||
dbc_node.step = 1;
|
||||
dbc_node.value = 1;
|
||||
else
|
||||
dbc_node.value = dbc_node.step * 75;
|
||||
dbc_node.maxvalue = dbc_node.step * 75;
|
||||
mSpellLearnSkills[spell] = dbc_node;
|
||||
++dbc_count;
|
||||
break;
|
||||
dbc_node.maxvalue = 1;
|
||||
break;
|
||||
default:
|
||||
continue;
|
||||
}
|
||||
|
||||
mSpellLearnSkills[spell] = dbc_node;
|
||||
++dbc_count;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -562,7 +562,7 @@ struct SpellLearnSkillNode
|
||||
uint16 maxvalue; // 0 - max skill value for player level
|
||||
};
|
||||
|
||||
typedef std::map<uint32, SpellLearnSkillNode> SpellLearnSkillMap;
|
||||
typedef std::unordered_map<uint32, SpellLearnSkillNode> SpellLearnSkillMap;
|
||||
|
||||
typedef std::multimap<uint32, SkillLineAbilityEntry const*> SkillLineAbilityMap;
|
||||
typedef std::pair<SkillLineAbilityMap::const_iterator, SkillLineAbilityMap::const_iterator> SkillLineAbilityMapBounds;
|
||||
|
||||
Reference in New Issue
Block a user