fix(Core/Player): Paladin's Seal of Righteousness (#6727)

This commit is contained in:
天鹿
2021-07-08 21:41:06 +08:00
committed by GitHub
parent 1d3ce9d353
commit 0d02da65f9
+22 -1
View File
@@ -24158,7 +24158,27 @@ void Player::learnSkillRewardedSpells(uint32 skill_id, uint32 skill_value)
removeSpell(pAbility->Spell, GetActiveSpec(), true); removeSpell(pAbility->Spell, GetActiveSpec(), true);
} }
// need learn // need learn
else if (!IsInWorld()) else
{
//used to avoid double Seal of Righteousness on paladins, it's the only player spell which has both spell and forward spell in auto learn
if (pAbility->AcquireMethod == SKILL_LINE_ABILITY_LEARNED_ON_SKILL_LEARN && pAbility->SupercededBySpell)
{
bool skipCurrent = false;
auto bounds = sSpellMgr->GetSkillLineAbilityMapBounds(pAbility->SupercededBySpell);
for (auto itr = bounds.first; itr != bounds.second; ++itr)
{
if (itr->second->AcquireMethod == SKILL_LINE_ABILITY_LEARNED_ON_SKILL_LEARN && skill_value >= itr->second->MinSkillLineRank)
{
skipCurrent = true;
break;
}
}
if (skipCurrent)
{
continue;
}
}
if (!IsInWorld())
{ {
addSpell(pAbility->Spell, SPEC_MASK_ALL, true, true, false); addSpell(pAbility->Spell, SPEC_MASK_ALL, true, true, false);
} }
@@ -24167,6 +24187,7 @@ void Player::learnSkillRewardedSpells(uint32 skill_id, uint32 skill_value)
learnSpell(pAbility->Spell); learnSpell(pAbility->Spell);
} }
} }
}
} }
void Player::GetAurasForTarget(Unit* target) // pussywizard: contact before changing ANYTHING! void Player::GetAurasForTarget(Unit* target) // pussywizard: contact before changing ANYTHING!