mirror of
https://github.com/mangosfour/server.git
synced 2025-12-15 01:37:00 +00:00
[9403] Replace number with enum name where explicitly used in array/other checks
Signed-off-by: NoFantasy <nofantasy@nf.no>
This commit is contained in:
parent
5c05280c44
commit
7c555add76
14 changed files with 128 additions and 128 deletions
|
|
@ -1960,7 +1960,7 @@ void Player::RewardRage( uint32 damage, uint32 weaponSpeedHitFactor, bool attack
|
|||
addRage = damage/rageconversion*2.5f;
|
||||
|
||||
// Berserker Rage effect
|
||||
if(HasAura(18499,0))
|
||||
if (HasAura(18499, EFFECT_INDEX_0))
|
||||
addRage *= 1.3f;
|
||||
}
|
||||
|
||||
|
|
@ -13129,7 +13129,7 @@ void Player::AddQuest( Quest const *pQuest, Object *questGiver )
|
|||
|
||||
for(SpellAreaForAreaMap::const_iterator itr = saBounds.first; itr != saBounds.second; ++itr)
|
||||
if(itr->second->autocast && itr->second->IsFitToRequirements(this,zone,area))
|
||||
if( !HasAura(itr->second->spellId,0) )
|
||||
if (!HasAura(itr->second->spellId, EFFECT_INDEX_0) )
|
||||
CastSpell(this,itr->second->spellId,true);
|
||||
}
|
||||
|
||||
|
|
@ -13319,7 +13319,7 @@ void Player::RewardQuest( Quest const *pQuest, uint32 reward, Object* questGiver
|
|||
|
||||
for(SpellAreaForAreaMap::const_iterator itr = saBounds.first; itr != saBounds.second; ++itr)
|
||||
if(itr->second->autocast && itr->second->IsFitToRequirements(this,zone,area))
|
||||
if( !HasAura(itr->second->spellId,0) )
|
||||
if (!HasAura(itr->second->spellId, EFFECT_INDEX_0))
|
||||
CastSpell(this,itr->second->spellId,true);
|
||||
}
|
||||
|
||||
|
|
@ -18624,7 +18624,7 @@ void Player::ReportedAfkBy(Player* reporter)
|
|||
return;
|
||||
|
||||
// check if player has 'Idle' or 'Inactive' debuff
|
||||
if(m_bgData.bgAfkReporter.find(reporter->GetGUIDLow()) == m_bgData.bgAfkReporter.end() && !HasAura(43680, 0) && !HasAura(43681, 0) && reporter->CanReportAfkDueToLimit())
|
||||
if(m_bgData.bgAfkReporter.find(reporter->GetGUIDLow()) == m_bgData.bgAfkReporter.end() && !HasAura(43680, EFFECT_INDEX_0) && !HasAura(43681, EFFECT_INDEX_0) && reporter->CanReportAfkDueToLimit())
|
||||
{
|
||||
m_bgData.bgAfkReporter.insert(reporter->GetGUIDLow());
|
||||
// 3 players have to complain to apply debuff
|
||||
|
|
@ -19139,7 +19139,7 @@ void Player::learnQuestRewardedSpells(Quest const* quest)
|
|||
return;
|
||||
|
||||
// prevent learn non first rank unknown profession and second specialization for same profession)
|
||||
uint32 learned_0 = spellInfo->EffectTriggerSpell[0];
|
||||
uint32 learned_0 = spellInfo->EffectTriggerSpell[EFFECT_INDEX_0];
|
||||
if( sSpellMgr.GetSpellRank(learned_0) > 1 && !HasSpell(learned_0) )
|
||||
{
|
||||
// not have first rank learned (unlearned prof?)
|
||||
|
|
@ -19152,7 +19152,7 @@ void Player::learnQuestRewardedSpells(Quest const* quest)
|
|||
return;
|
||||
|
||||
// specialization
|
||||
if(learnedInfo->Effect[0]==SPELL_EFFECT_TRADE_SKILL && learnedInfo->Effect[1]==0)
|
||||
if (learnedInfo->Effect[EFFECT_INDEX_0] == SPELL_EFFECT_TRADE_SKILL && learnedInfo->Effect[EFFECT_INDEX_1] == 0)
|
||||
{
|
||||
// search other specialization for same prof
|
||||
for(PlayerSpellMap::const_iterator itr = m_spells.begin(); itr != m_spells.end(); ++itr)
|
||||
|
|
@ -19165,7 +19165,7 @@ void Player::learnQuestRewardedSpells(Quest const* quest)
|
|||
return;
|
||||
|
||||
// compare only specializations
|
||||
if(itrInfo->Effect[0]!=SPELL_EFFECT_TRADE_SKILL || itrInfo->Effect[1]!=0)
|
||||
if (itrInfo->Effect[EFFECT_INDEX_0] != SPELL_EFFECT_TRADE_SKILL || itrInfo->Effect[EFFECT_INDEX_1] != 0)
|
||||
continue;
|
||||
|
||||
// compare same chain spells
|
||||
|
|
@ -19667,7 +19667,7 @@ uint32 Player::GetResurrectionSpellId()
|
|||
|
||||
// Reincarnation (passive spell) // prio: 1
|
||||
// Glyph of Renewed Life remove reagent requiremnnt
|
||||
if (prio < 1 && HasSpell(20608) && !HasSpellCooldown(21169) && (HasItemCount(17030,1) || HasAura(58059, 0)))
|
||||
if (prio < 1 && HasSpell(20608) && !HasSpellCooldown(21169) && (HasItemCount(17030,1) || HasAura(58059, EFFECT_INDEX_0)))
|
||||
spell_id = 21169;
|
||||
|
||||
return spell_id;
|
||||
|
|
@ -19889,7 +19889,7 @@ void Player::UpdateZoneDependentAuras( uint32 newZone )
|
|||
SpellAreaForAreaMapBounds saBounds = sSpellMgr.GetSpellAreaForAreaMapBounds(newZone);
|
||||
for(SpellAreaForAreaMap::const_iterator itr = saBounds.first; itr != saBounds.second; ++itr)
|
||||
if(itr->second->autocast && itr->second->IsFitToRequirements(this,newZone,0))
|
||||
if( !HasAura(itr->second->spellId,0) )
|
||||
if (!HasAura(itr->second->spellId, EFFECT_INDEX_0))
|
||||
CastSpell(this,itr->second->spellId,true);
|
||||
}
|
||||
|
||||
|
|
@ -19909,7 +19909,7 @@ void Player::UpdateAreaDependentAuras( uint32 newArea )
|
|||
SpellAreaForAreaMapBounds saBounds = sSpellMgr.GetSpellAreaForAreaMapBounds(newArea);
|
||||
for(SpellAreaForAreaMap::const_iterator itr = saBounds.first; itr != saBounds.second; ++itr)
|
||||
if(itr->second->autocast && itr->second->IsFitToRequirements(this,m_zoneUpdateId,newArea))
|
||||
if( !HasAura(itr->second->spellId,0) )
|
||||
if (!HasAura(itr->second->spellId, EFFECT_INDEX_0))
|
||||
CastSpell(this,itr->second->spellId,true);
|
||||
}
|
||||
|
||||
|
|
@ -20152,7 +20152,7 @@ bool Player::CanUseBattleGroundObject()
|
|||
//i'm not sure if these two are correct, because invisible players should get visible when they click on flag
|
||||
!HasStealthAura() && // not stealthed
|
||||
!HasInvisibilityAura() && // not invisible
|
||||
!HasAura(SPELL_RECENTLY_DROPPED_FLAG, 0) && // can't pickup
|
||||
!HasAura(SPELL_RECENTLY_DROPPED_FLAG, EFFECT_INDEX_0) &&// can't pickup
|
||||
isAlive() // live player
|
||||
);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue