diff options
| -rwxr-xr-x | src/server/game/Entities/Player/Player.cpp | 10 | ||||
| -rwxr-xr-x | src/server/game/Entities/Player/Player.h | 2 |
2 files changed, 6 insertions, 6 deletions
diff --git a/src/server/game/Entities/Player/Player.cpp b/src/server/game/Entities/Player/Player.cpp index 1c3bc04b46c..e45d75199b2 100755 --- a/src/server/game/Entities/Player/Player.cpp +++ b/src/server/game/Entities/Player/Player.cpp @@ -3480,7 +3480,7 @@ bool Player::AddTalent(uint32 spell_id, uint8 spec, bool learning) return false; } -bool Player::addSpell(uint32 spell_id, bool active, bool learning, bool dependent, bool disabled) +bool Player::addSpell(uint32 spell_id, bool active, bool learning, bool dependent, bool disabled, bool loading /*=false*/) { SpellEntry const *spellInfo = sSpellStore.LookupEntry(spell_id); if (!spellInfo) @@ -3720,7 +3720,7 @@ bool Player::addSpell(uint32 spell_id, bool active, bool learning, bool dependen // cast talents with SPELL_EFFECT_LEARN_SPELL (other dependent spells will learned later as not auto-learned) // note: all spells with SPELL_EFFECT_LEARN_SPELL isn't passive - if (talentCost > 0 && IsSpellHaveEffect(spellInfo, SPELL_EFFECT_LEARN_SPELL)) + if (!loading && talentCost > 0 && IsSpellHaveEffect(spellInfo, SPELL_EFFECT_LEARN_SPELL)) { // ignore stance requirement for talent learn spell (stance set for spell only for client spell description show) CastSpell(this, spell_id, true); @@ -4405,7 +4405,7 @@ bool Player::resetTalents(bool no_cost) if (const SpellEntry *_spellEntry = sSpellStore.LookupEntry(talentInfo->RankID[rank])) for (uint8 i = 0; i < MAX_SPELL_EFFECTS; ++i) // search through the SpellEntry for valid trigger spells if (_spellEntry->EffectTriggerSpell[i] > 0 && _spellEntry->Effect[i] == SPELL_EFFECT_LEARN_SPELL) - removeSpell(_spellEntry->EffectTriggerSpell[i]); // and remove any spells that the talent teaches + removeSpell(_spellEntry->EffectTriggerSpell[i], true); // and remove any spells that the talent teaches // if this talent rank can be found in the PlayerTalentMap, mark the talent as removed so it gets deleted PlayerTalentMap::iterator plrTalent = m_talents[m_activeSpec]->find(talentInfo->RankID[rank]); if (plrTalent != m_talents[m_activeSpec]->end()) @@ -17739,7 +17739,7 @@ void Player::_LoadSpells(PreparedQueryResult result) if (result) { do - addSpell((*result)[0].GetUInt32(), (*result)[1].GetBool(), false, false, (*result)[2].GetBool()); + addSpell((*result)[0].GetUInt32(), (*result)[1].GetBool(), false, false, (*result)[2].GetBool(), true); while (result->NextRow()); } } @@ -24289,7 +24289,7 @@ void Player::ActivateSpec(uint8 spec) if (const SpellEntry *_spellEntry = sSpellStore.LookupEntry(talentInfo->RankID[rank])) for (uint8 i = 0; i < MAX_SPELL_EFFECTS; ++i) // search through the SpellEntry for valid trigger spells if (_spellEntry->EffectTriggerSpell[i] > 0 && _spellEntry->Effect[i] == SPELL_EFFECT_LEARN_SPELL) - removeSpell(_spellEntry->EffectTriggerSpell[i]); // and remove any spells that the talent teaches + removeSpell(_spellEntry->EffectTriggerSpell[i], true); // and remove any spells that the talent teaches // if this talent rank can be found in the PlayerTalentMap, mark the talent as removed so it gets deleted //PlayerTalentMap::iterator plrTalent = m_talents[m_activeSpec]->find(talentInfo->RankID[rank]); //if (plrTalent != m_talents[m_activeSpec]->end()) diff --git a/src/server/game/Entities/Player/Player.h b/src/server/game/Entities/Player/Player.h index 725c3fbbc37..e84f4ea306b 100755 --- a/src/server/game/Entities/Player/Player.h +++ b/src/server/game/Entities/Player/Player.h @@ -1598,7 +1598,7 @@ class Player : public Unit, public GridObject<Player> void SendProficiency(ItemClass itemClass, uint32 itemSubclassMask); void SendInitialSpells(); - bool addSpell(uint32 spell_id, bool active, bool learning, bool dependent, bool disabled); + bool addSpell(uint32 spell_id, bool active, bool learning, bool dependent, bool disabled, bool loading = false); void learnSpell(uint32 spell_id, bool dependent); void removeSpell(uint32 spell_id, bool disabled = false, bool learn_low_rank = true); void resetSpells(bool myClassOnly = false); |
