Core/Spells: Reimplemented automatic spell learning
* Fixed learning/unlearning talents
This commit is contained in:
@@ -16569,3 +16569,18 @@ void Unit::Whisper(uint32 textId, Player* target, bool isBossWhisper /*= false*/
|
||||
packet.Initalize(isBossWhisper ? CHAT_MSG_RAID_BOSS_WHISPER : CHAT_MSG_MONSTER_WHISPER, LANG_UNIVERSAL, this, target, DB2Manager::GetBroadcastTextValue(bct, locale, getGender()), 0, "", locale);
|
||||
target->SendDirectMessage(packet.Write());
|
||||
}
|
||||
|
||||
SpellInfo const* Unit::GetCastSpellInfo(SpellInfo const* spellInfo) const
|
||||
{
|
||||
Unit::AuraEffectList swaps = GetAuraEffectsByType(SPELL_AURA_OVERRIDE_ACTIONBAR_SPELLS);
|
||||
Unit::AuraEffectList const& swaps2 = GetAuraEffectsByType(SPELL_AURA_OVERRIDE_ACTIONBAR_SPELLS_2);
|
||||
if (!swaps2.empty())
|
||||
swaps.insert(swaps.end(), swaps2.begin(), swaps2.end());
|
||||
|
||||
for (AuraEffect const* auraEffect : swaps)
|
||||
if (auraEffect->IsAffectingSpell(spellInfo))
|
||||
if (SpellInfo const* newInfo = sSpellMgr->GetSpellInfo(auraEffect->GetAmount()))
|
||||
return newInfo;
|
||||
|
||||
return spellInfo;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user