mirror of
https://github.com/mangosfour/server.git
synced 2025-12-15 01:37:00 +00:00
[7083] Implement support for cast-spells in trainer lists for riding also.
This commit is contained in:
parent
7b6b0bb816
commit
950df723d7
5 changed files with 32 additions and 7 deletions
|
|
@ -1018,7 +1018,7 @@ bool SpellMgr::canStackSpellRanks(SpellEntry const *spellInfo)
|
|||
{
|
||||
if(spellInfo->powerType != POWER_MANA && spellInfo->powerType != POWER_HEALTH)
|
||||
return false;
|
||||
if(IsProfessionSpell(spellInfo->Id))
|
||||
if(IsProfessionOrRidingSpell(spellInfo->Id))
|
||||
return false;
|
||||
|
||||
// All stance spells. if any better way, change it.
|
||||
|
|
@ -1399,6 +1399,20 @@ bool SpellMgr::IsNoStackSpellDueToSpell(uint32 spellId_1, uint32 spellId_2) cons
|
|||
return true;
|
||||
}
|
||||
|
||||
bool SpellMgr::IsProfessionOrRidingSpell(uint32 spellId)
|
||||
{
|
||||
SpellEntry const *spellInfo = sSpellStore.LookupEntry(spellId);
|
||||
if(!spellInfo)
|
||||
return false;
|
||||
|
||||
if(spellInfo->Effect[1] != SPELL_EFFECT_SKILL)
|
||||
return false;
|
||||
|
||||
uint32 skill = spellInfo->EffectMiscValue[1];
|
||||
|
||||
return IsProfessionOrRidingSkill(skill);
|
||||
}
|
||||
|
||||
bool SpellMgr::IsProfessionSpell(uint32 spellId)
|
||||
{
|
||||
SpellEntry const *spellInfo = sSpellStore.LookupEntry(spellId);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue