mirror of
https://github.com/mangosfour/server.git
synced 2025-12-13 13:37:05 +00:00
[7077] Implement support castable trainer spells for profession ranks.
This commit is contained in:
parent
fa9daa3fb7
commit
5b50e2f9e8
8 changed files with 262 additions and 23 deletions
|
|
@ -7040,6 +7040,19 @@ void ObjectMgr::LoadTrainerSpell()
|
|||
if(!pTrainerSpell->reqlevel)
|
||||
pTrainerSpell->reqlevel = spellinfo->spellLevel;
|
||||
|
||||
// calculate learned spell for profession case when stored cast-spell
|
||||
pTrainerSpell->learned_spell = spell;
|
||||
for(int i = 0; i <3; ++i)
|
||||
{
|
||||
if(spellinfo->Effect[i]!=SPELL_EFFECT_LEARN_SPELL)
|
||||
continue;
|
||||
|
||||
if(SpellMgr::IsProfessionSpell(spellinfo->EffectTriggerSpell[i]))
|
||||
{
|
||||
pTrainerSpell->learned_spell = spellinfo->EffectTriggerSpell[i];
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
TrainerSpellData& data = m_mCacheTrainerSpellMap[entry];
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue