mirror of
https://github.com/mangosfour/server.git
synced 2025-12-15 01:37:00 +00:00
[10074] Add IsPassive(SpellEntry*) function and use in cases wjern entry already known.
Some other small code cleanups
This commit is contained in:
parent
6ca609629c
commit
07a931e141
12 changed files with 35 additions and 33 deletions
|
|
@ -3063,7 +3063,7 @@ bool Player::addSpell(uint32 spell_id, bool active, bool learning, bool dependen
|
|||
|
||||
if(active)
|
||||
{
|
||||
if (IsPassiveSpell(spell_id) && IsNeedCastPassiveSpellAtLearn(spellInfo))
|
||||
if (IsPassiveSpell(spellInfo) && IsNeedCastPassiveSpellAtLearn(spellInfo))
|
||||
CastSpell (this, spell_id, true);
|
||||
}
|
||||
else if(IsInWorld())
|
||||
|
|
@ -3254,7 +3254,7 @@ bool Player::addSpell(uint32 spell_id, bool active, bool learning, bool dependen
|
|||
CastSpell(this, spell_id, true);
|
||||
}
|
||||
// also cast passive spells (including all talents without SPELL_EFFECT_LEARN_SPELL) with additional checks
|
||||
else if (IsPassiveSpell(spell_id))
|
||||
else if (IsPassiveSpell(spellInfo))
|
||||
{
|
||||
if (IsNeedCastPassiveSpellAtLearn(spellInfo))
|
||||
CastSpell(this, spell_id, true);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue