mirror of
https://github.com/mangosfour/server.git
synced 2025-12-14 16:37:01 +00:00
[7730] Some optimizantion and code style.
Signed-off-by: AlexDereka <dereka.alex@gmail.com>
This commit is contained in:
parent
a4373c887d
commit
8144f30199
69 changed files with 536 additions and 536 deletions
|
|
@ -191,7 +191,7 @@ SpellSpecific GetSpellSpecific(uint32 spellId)
|
|||
if ((spellInfo->SpellFamilyFlags & 0x00000820180400LL) && (spellInfo->AttributesEx3 & 0x200))
|
||||
return SPELL_JUDGEMENT;
|
||||
|
||||
for (int i = 0; i < 3; i++)
|
||||
for (int i = 0; i < 3; ++i)
|
||||
{
|
||||
// only paladin auras have this (for palaldin class family)
|
||||
if (spellInfo->Effect[i] == SPELL_EFFECT_APPLY_AREA_AURA_RAID)
|
||||
|
|
@ -485,7 +485,7 @@ bool IsPositiveSpell(uint32 spellId)
|
|||
|
||||
// spells with atleast one negative effect are considered negative
|
||||
// some self-applied spells have negative effects but in self casting case negative check ignored.
|
||||
for (int i = 0; i < 3; i++)
|
||||
for (int i = 0; i < 3; ++i)
|
||||
if (!IsPositiveEffect(spellId, i))
|
||||
return false;
|
||||
return true;
|
||||
|
|
@ -541,7 +541,7 @@ bool IsAuraAddedBySpell(uint32 auraType, uint32 spellId)
|
|||
SpellEntry const *spellproto = sSpellStore.LookupEntry(spellId);
|
||||
if (!spellproto) return false;
|
||||
|
||||
for (int i = 0; i < 3; i++)
|
||||
for (int i = 0; i < 3; ++i)
|
||||
if (spellproto->EffectApplyAuraName[i] == auraType)
|
||||
return true;
|
||||
return false;
|
||||
|
|
@ -1078,7 +1078,7 @@ bool SpellMgr::canStackSpellRanks(SpellEntry const *spellInfo)
|
|||
return false;
|
||||
|
||||
// All stance spells. if any better way, change it.
|
||||
for (int i = 0; i < 3; i++)
|
||||
for (int i = 0; i < 3; ++i)
|
||||
{
|
||||
switch(spellInfo->SpellFamilyName)
|
||||
{
|
||||
|
|
@ -1452,7 +1452,7 @@ bool SpellMgr::IsNoStackSpellDueToSpell(uint32 spellId_1, uint32 spellId_2) cons
|
|||
spellInfo_1->SpellIconID != 0 && spellInfo_2->SpellIconID != 0)
|
||||
{
|
||||
bool isModifier = false;
|
||||
for (int i = 0; i < 3; i++)
|
||||
for (int i = 0; i < 3; ++i)
|
||||
{
|
||||
if (spellInfo_1->EffectApplyAuraName[i] == SPELL_AURA_ADD_FLAT_MODIFIER ||
|
||||
spellInfo_1->EffectApplyAuraName[i] == SPELL_AURA_ADD_PCT_MODIFIER ||
|
||||
|
|
@ -1556,7 +1556,7 @@ SpellEntry const* SpellMgr::SelectAuraRankForPlayerLevel(SpellEntry const* spell
|
|||
return spellInfo;
|
||||
|
||||
bool needRankSelection = false;
|
||||
for(int i=0;i<3;i++)
|
||||
for(int i=0;i<3;++i)
|
||||
{
|
||||
if( IsPositiveEffect(spellInfo->Id, i) && (
|
||||
spellInfo->Effect[i] == SPELL_EFFECT_APPLY_AURA ||
|
||||
|
|
@ -1709,11 +1709,11 @@ void SpellMgr::LoadSpellChains()
|
|||
delete result;
|
||||
|
||||
// additional integrity checks
|
||||
for(SpellChainMap::iterator i = mSpellChains.begin(); i != mSpellChains.end(); ++i)
|
||||
for(SpellChainMap::const_iterator i = mSpellChains.begin(); i != mSpellChains.end(); ++i)
|
||||
{
|
||||
if(i->second.prev)
|
||||
{
|
||||
SpellChainMap::iterator i_prev = mSpellChains.find(i->second.prev);
|
||||
SpellChainMap::const_iterator i_prev = mSpellChains.find(i->second.prev);
|
||||
if(i_prev == mSpellChains.end())
|
||||
{
|
||||
sLog.outErrorDb("Spell %u (prev: %u, first: %u, rank: %d, req: %u) listed in `spell_chain` has not found previous rank spell in table.",
|
||||
|
|
@ -1735,7 +1735,7 @@ void SpellMgr::LoadSpellChains()
|
|||
|
||||
if(i->second.req)
|
||||
{
|
||||
SpellChainMap::iterator i_req = mSpellChains.find(i->second.req);
|
||||
SpellChainMap::const_iterator i_req = mSpellChains.find(i->second.req);
|
||||
if(i_req == mSpellChains.end())
|
||||
{
|
||||
sLog.outErrorDb("Spell %u (prev: %u, first: %u, rank: %d, req: %u) listed in `spell_chain` has not found required rank spell in table.",
|
||||
|
|
@ -2591,7 +2591,7 @@ SpellCastResult SpellMgr::GetSpellAllowedInLocationError(SpellEntry const *spell
|
|||
AreaGroupEntry const* groupEntry = sAreaGroupStore.LookupEntry(spellInfo->AreaGroupId);
|
||||
while (groupEntry)
|
||||
{
|
||||
for (uint32 i=0; i<6; i++)
|
||||
for (uint32 i=0; i<6; ++i)
|
||||
if( groupEntry->AreaId[i] == zone_id || groupEntry->AreaId[i] == area_id )
|
||||
found = true;
|
||||
if (found || !groupEntry->nextGroup)
|
||||
|
|
@ -2691,7 +2691,7 @@ void SpellMgr::LoadSkillLineAbilityMap()
|
|||
barGoLink bar( sSkillLineAbilityStore.GetNumRows() );
|
||||
uint32 count = 0;
|
||||
|
||||
for (uint32 i = 0; i < sSkillLineAbilityStore.GetNumRows(); i++)
|
||||
for (uint32 i = 0; i < sSkillLineAbilityStore.GetNumRows(); ++i)
|
||||
{
|
||||
bar.step();
|
||||
SkillLineAbilityEntry const *SkillInfo = sSkillLineAbilityStore.LookupEntry(i);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue