mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-16 10:30:27 +00:00
Merge branch 'master' into Playerbot
This commit is contained in:
@@ -444,6 +444,7 @@ Player::~Player()
|
||||
delete m_runes;
|
||||
delete m_achievementMgr;
|
||||
delete m_reputationMgr;
|
||||
delete _cinematicMgr;
|
||||
|
||||
sWorld->DecreasePlayerCount();
|
||||
|
||||
@@ -3793,7 +3794,7 @@ Mail* Player::GetMail(uint32 id)
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
void Player::BuildCreateUpdateBlockForPlayer(UpdateData* data, Player* target) const
|
||||
void Player::BuildCreateUpdateBlockForPlayer(UpdateData* data, Player* target)
|
||||
{
|
||||
if (target == this)
|
||||
{
|
||||
@@ -5315,10 +5316,8 @@ void Player::SetSkill(uint16 id, uint16 step, uint16 newVal, uint16 maxVal)
|
||||
mSkillStatus.erase(itr);
|
||||
|
||||
// remove all spells that related to this skill
|
||||
for (uint32 j = 0; j < sSkillLineAbilityStore.GetNumRows(); ++j)
|
||||
if (SkillLineAbilityEntry const* pAbility = sSkillLineAbilityStore.LookupEntry(j))
|
||||
if (pAbility->SkillLine == id)
|
||||
removeSpell(sSpellMgr->GetFirstSpellInChain(pAbility->Spell), SPEC_MASK_ALL, false);
|
||||
for (SkillLineAbilityEntry const* pAbility : GetSkillLineAbilitiesBySkillLine(id))
|
||||
removeSpell(sSpellMgr->GetFirstSpellInChain(pAbility->Spell), SPEC_MASK_ALL, false);
|
||||
}
|
||||
}
|
||||
else if (newVal) //add
|
||||
@@ -11937,14 +11936,8 @@ void Player::learnSkillRewardedSpells(uint32 skill_id, uint32 skill_value)
|
||||
{
|
||||
uint32 raceMask = getRaceMask();
|
||||
uint32 classMask = getClassMask();
|
||||
for (uint32 j = 0; j < sSkillLineAbilityStore.GetNumRows(); ++j)
|
||||
for (SkillLineAbilityEntry const* pAbility : GetSkillLineAbilitiesBySkillLine(skill_id))
|
||||
{
|
||||
SkillLineAbilityEntry const* pAbility = sSkillLineAbilityStore.LookupEntry(j);
|
||||
if (!pAbility || pAbility->SkillLine != skill_id)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
SpellInfo const* spellInfo = sSpellMgr->GetSpellInfo(pAbility->Spell);
|
||||
if (!spellInfo)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user