mirror of
https://github.com/mangosfour/server.git
synced 2025-12-15 10:37:02 +00:00
[8251] Store in some DB tables only data for first rank.
* 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`.
This commit is contained in:
parent
fd2eb3cfee
commit
7ac4dc6f13
10 changed files with 440 additions and 225 deletions
|
|
@ -1918,13 +1918,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);
|
||||
|
||||
SpellChainMapNext const& nextMap = spellmgr.GetSpellChainNext();
|
||||
for(SpellChainMapNext::const_iterator itr = nextMap.lower_bound(spellid); itr != nextMap.upper_bound(spellid); ++itr)
|
||||
learnSpellHighRank(itr->second);
|
||||
DoPetLearnSpell worker(*this);
|
||||
spellmgr.doForHighRanks(spellid,worker);
|
||||
}
|
||||
|
||||
void Pet::SynchronizeLevelWithOwner()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue