mirror of
https://github.com/mangosfour/server.git
synced 2025-12-15 01:37:00 +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
|
|
@ -1479,7 +1479,7 @@ void Pet::InitPetCreateSpells()
|
|||
if(owner->GetTypeId() == TYPEID_PLAYER && !((Player*)owner)->HasSpell(learn_spellproto->Id))
|
||||
{
|
||||
if(IsPassiveSpell(petspellid)) //learn passive skills when tamed, not sure if thats right
|
||||
((Player*)owner)->learnSpell(learn_spellproto->Id);
|
||||
((Player*)owner)->learnSpell(learn_spellproto->Id,false);
|
||||
else
|
||||
AddTeachSpell(learn_spellproto->EffectTriggerSpell[0], learn_spellproto->Id);
|
||||
}
|
||||
|
|
@ -1513,7 +1513,7 @@ void Pet::CheckLearning(uint32 spellid)
|
|||
|
||||
if(urand(0, 100) < 10)
|
||||
{
|
||||
((Player*)owner)->learnSpell(itr->second);
|
||||
((Player*)owner)->learnSpell(itr->second,false);
|
||||
m_teachspells.erase(itr);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue