mirror of
https://github.com/mangosfour/server.git
synced 2025-12-13 22:37:03 +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
|
|
@ -7028,8 +7028,7 @@ void Player::CastItemCombatSpell(Unit* Target, WeaponAttackType attType)
|
|||
}
|
||||
|
||||
// Use first rank to access spell item enchant procs
|
||||
uint32 firstRank = spellmgr.GetFirstSpellInChain(spellInfo->Id);
|
||||
float ppmRate = spellmgr.GetItemEnchantProcChance(firstRank);
|
||||
float ppmRate = spellmgr.GetItemEnchantProcChance(spellInfo->Id);
|
||||
|
||||
float chance = ppmRate
|
||||
? GetPPMProcChance(proto->Delay, ppmRate)
|
||||
|
|
@ -19680,13 +19679,19 @@ bool Player::IsAllowUseFlyMountsHere() const
|
|||
return v_map == 530 || v_map == 571 && HasSpell(54197);
|
||||
}
|
||||
|
||||
struct DoPlayerLearnSpell
|
||||
{
|
||||
DoPlayerLearnSpell(Player& _player) : player(_player) {}
|
||||
void operator() (uint32 spell_id) { player.learnSpell(spell_id,false); }
|
||||
Player& player;
|
||||
};
|
||||
|
||||
void Player::learnSpellHighRank(uint32 spellid)
|
||||
{
|
||||
learnSpell(spellid,false);
|
||||
|
||||
SpellChainMapNext const& nextMap = spellmgr.GetSpellChainNext();
|
||||
for(SpellChainMapNext::const_iterator itr = nextMap.lower_bound(spellid); itr != nextMap.upper_bound(spellid); ++itr)
|
||||
learnSpellHighRank(itr->second);
|
||||
DoPlayerLearnSpell worker(*this);
|
||||
spellmgr.doForHighRanks(spellid,worker);
|
||||
}
|
||||
|
||||
void Player::_LoadSkills()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue