mirror of
https://github.com/mangosfour/server.git
synced 2025-12-30 10:37:12 +00:00
[10594] Use equal_range instead of lower_bound/upper_bound pairs
(based on zergtmn's repo commit 0499169) Signed-off-by: VladimirMangos <vladimir@getmangos.com>
This commit is contained in:
parent
0caa0e32dd
commit
2fa5fa43bd
13 changed files with 207 additions and 182 deletions
|
|
@ -996,7 +996,7 @@ class SpellMgr
|
|||
|
||||
SpellLearnSpellMapBounds GetSpellLearnSpellMapBounds(uint32 spell_id) const
|
||||
{
|
||||
return SpellLearnSpellMapBounds(mSpellLearnSpells.lower_bound(spell_id),mSpellLearnSpells.upper_bound(spell_id));
|
||||
return mSpellLearnSpells.equal_range(spell_id);
|
||||
}
|
||||
|
||||
bool IsSpellLearnToSpell(uint32 spell_id1,uint32 spell_id2) const
|
||||
|
|
@ -1019,7 +1019,7 @@ class SpellMgr
|
|||
// Spell script targets
|
||||
SpellScriptTargetBounds GetSpellScriptTargetBounds(uint32 spell_id) const
|
||||
{
|
||||
return SpellScriptTargetBounds(mSpellScriptTarget.lower_bound(spell_id),mSpellScriptTarget.upper_bound(spell_id));
|
||||
return mSpellScriptTarget.equal_range(spell_id);
|
||||
}
|
||||
|
||||
// Spell correctess for client using
|
||||
|
|
@ -1027,7 +1027,7 @@ class SpellMgr
|
|||
|
||||
SkillLineAbilityMapBounds GetSkillLineAbilityMapBounds(uint32 spell_id) const
|
||||
{
|
||||
return SkillLineAbilityMapBounds(mSkillLineAbilityMap.lower_bound(spell_id),mSkillLineAbilityMap.upper_bound(spell_id));
|
||||
return mSkillLineAbilityMap.equal_range(spell_id);
|
||||
}
|
||||
|
||||
PetAura const* GetPetAura(uint32 spell_id, SpellEffectIndex eff)
|
||||
|
|
@ -1061,30 +1061,30 @@ class SpellMgr
|
|||
|
||||
SpellAreaMapBounds GetSpellAreaMapBounds(uint32 spell_id) const
|
||||
{
|
||||
return SpellAreaMapBounds(mSpellAreaMap.lower_bound(spell_id),mSpellAreaMap.upper_bound(spell_id));
|
||||
return mSpellAreaMap.equal_range(spell_id);
|
||||
}
|
||||
|
||||
SpellAreaForQuestMapBounds GetSpellAreaForQuestMapBounds(uint32 quest_id, bool active) const
|
||||
{
|
||||
if(active)
|
||||
return SpellAreaForQuestMapBounds(mSpellAreaForActiveQuestMap.lower_bound(quest_id),mSpellAreaForActiveQuestMap.upper_bound(quest_id));
|
||||
if (active)
|
||||
return mSpellAreaForActiveQuestMap.equal_range(quest_id);
|
||||
else
|
||||
return SpellAreaForQuestMapBounds(mSpellAreaForQuestMap.lower_bound(quest_id),mSpellAreaForQuestMap.upper_bound(quest_id));
|
||||
return mSpellAreaForQuestMap.equal_range(quest_id);
|
||||
}
|
||||
|
||||
SpellAreaForQuestMapBounds GetSpellAreaForQuestEndMapBounds(uint32 quest_id) const
|
||||
{
|
||||
return SpellAreaForQuestMapBounds(mSpellAreaForQuestEndMap.lower_bound(quest_id),mSpellAreaForQuestEndMap.upper_bound(quest_id));
|
||||
return mSpellAreaForQuestEndMap.equal_range(quest_id);
|
||||
}
|
||||
|
||||
SpellAreaForAuraMapBounds GetSpellAreaForAuraMapBounds(uint32 spell_id) const
|
||||
{
|
||||
return SpellAreaForAuraMapBounds(mSpellAreaForAuraMap.lower_bound(spell_id),mSpellAreaForAuraMap.upper_bound(spell_id));
|
||||
return mSpellAreaForAuraMap.equal_range(spell_id);
|
||||
}
|
||||
|
||||
SpellAreaForAreaMapBounds GetSpellAreaForAreaMapBounds(uint32 area_id) const
|
||||
{
|
||||
return SpellAreaForAreaMapBounds(mSpellAreaForAreaMap.lower_bound(area_id),mSpellAreaForAreaMap.upper_bound(area_id));
|
||||
return mSpellAreaForAreaMap.equal_range(area_id);
|
||||
}
|
||||
|
||||
// Modifiers
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue