mirror of
https://github.com/mangosfour/server.git
synced 2025-12-14 16:37:01 +00:00
Not store dependent spells in character_spell
* Mark spells learned in result character creating, another spell learning, skill grow, quest reward as dependent and not store its in `character_spell`. * Prevent re-learning known spell in expected state * Prevent re-learning low rank spell as active if higher rank known. * New type of non-stacked ranked spells check: skill dependent spell bonuses. * Activate (show propetly and cast if need) lesser spell rank for non-stackable in spellbooks spells at unlearn high rank
This commit is contained in:
parent
4b5aba18f8
commit
bbf8fd0742
10 changed files with 222 additions and 85 deletions
|
|
@ -3345,7 +3345,7 @@ void Spell::EffectLearnSpell(uint32 i)
|
|||
Player *player = (Player*)unitTarget;
|
||||
|
||||
uint32 spellToLearn = ((m_spellInfo->Id==SPELL_ID_GENERIC_LEARN) || (m_spellInfo->Id==SPELL_ID_GENERIC_LEARN_PET)) ? damage : m_spellInfo->EffectTriggerSpell[i];
|
||||
player->learnSpell(spellToLearn);
|
||||
player->learnSpell(spellToLearn,false);
|
||||
|
||||
sLog.outDebug( "Spell: Player %u have learned spell %u from NpcGUID=%u", player->GetGUIDLow(), spellToLearn, m_caster->GetGUIDLow() );
|
||||
}
|
||||
|
|
@ -4866,7 +4866,7 @@ void Spell::EffectScriptEffect(uint32 effIndex)
|
|||
|
||||
// learn random explicit discovery recipe (if any)
|
||||
if(uint32 discoveredSpell = GetExplicitDiscoverySpell(m_spellInfo->Id, player))
|
||||
player->learnSpell(discoveredSpell);
|
||||
player->learnSpell(discoveredSpell,false);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue