mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-02-06 00:48:39 +01:00
[8251] Store in some DB tables only data for first rank. Author: VladimirMangos
* Allow add to DB data only for first rank in table `mangos_spell_bonus_data` and `mangos_spell_proc_event`.
* Copy data for other ranks for speedup use at loading for this data and data from `spell_proc_item_enchant`.
--HG--
branch : trunk
This commit is contained in:
@@ -1858,12 +1858,19 @@ void Pet::CastPetAura(PetAura const* aura)
|
||||
CastSpell(this, auraId, true);
|
||||
}
|
||||
|
||||
struct DoPetLearnSpell
|
||||
{
|
||||
DoPetLearnSpell(Pet& _pet) : pet(_pet) {}
|
||||
void operator() (uint32 spell_id) { pet.learnSpell(spell_id); }
|
||||
Pet& pet;
|
||||
};
|
||||
|
||||
void Pet::learnSpellHighRank(uint32 spellid)
|
||||
{
|
||||
learnSpell(spellid);
|
||||
|
||||
if(uint32 next = spellmgr.GetNextSpellInChain(spellid))
|
||||
learnSpellHighRank(next);
|
||||
DoPetLearnSpell worker(*this);
|
||||
spellmgr.doForHighRanks(spellid,worker);
|
||||
}
|
||||
|
||||
void Pet::SynchronizeLevelWithOwner()
|
||||
|
||||
Reference in New Issue
Block a user