aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/game/Chat.cpp2
-rw-r--r--src/game/ChatHandler.cpp4
-rw-r--r--src/game/CreatureEventAI.cpp2
-rw-r--r--src/game/MapManager.cpp10
-rw-r--r--src/game/SpellAuraEffects.cpp10
-rw-r--r--src/game/SpellAuras.cpp34
-rw-r--r--src/game/SpellAuras.h20
-rw-r--r--src/game/WorldSocket.cpp16
8 files changed, 49 insertions, 49 deletions
diff --git a/src/game/Chat.cpp b/src/game/Chat.cpp
index 667ab814fba..8b6fa905f5e 100644
--- a/src/game/Chat.cpp
+++ b/src/game/Chat.cpp
@@ -1067,7 +1067,7 @@ int ChatHandler::ParseCommands(const char* text)
std::string fullcmd = text;
if (m_session && m_session->GetSecurity() <= SEC_PLAYER && sWorld.getConfig(CONFIG_ALLOW_PLAYER_COMMANDS) == 0)
- return 0;
+ return 0;
if (m_session && !m_session->HandleOnPlayerChat(text))
return 0;
diff --git a/src/game/ChatHandler.cpp b/src/game/ChatHandler.cpp
index d36a7cfd50b..b6485a686bf 100644
--- a/src/game/ChatHandler.cpp
+++ b/src/game/ChatHandler.cpp
@@ -511,8 +511,8 @@ void WorldSession::HandleMessagechatOpcode( WorldPacket & recv_data )
if (!processChatmessageFurtherAfterSecurityChecks(msg, lang))
return;
- if (_player->getLevel() < sWorld.getConfig(CONFIG_CHAT_CHANNEL_LEVEL_REQ))
- return;
+ if (_player->getLevel() < sWorld.getConfig(CONFIG_CHAT_CHANNEL_LEVEL_REQ))
+ return;
if(msg.empty())
break;
diff --git a/src/game/CreatureEventAI.cpp b/src/game/CreatureEventAI.cpp
index 2f64a75ca7b..ece126b4011 100644
--- a/src/game/CreatureEventAI.cpp
+++ b/src/game/CreatureEventAI.cpp
@@ -311,7 +311,7 @@ bool CreatureEventAI::ProcessEvent(CreatureEventAIHolder& pHolder, Unit* pAction
//Note: checked only aura for effect 0, if need check aura for effect 1/2 then
// possible way: pack in event.buffed.amount 2 uint16 (ammount+effectIdx)
- Aura const * aura = m_creature->GetAura(event.buffed.spellId);
+ Aura const * aura = pActionInvoker->GetAura(event.buffed.spellId);
if(!aura || aura->GetStackAmount() < event.buffed.amount)
return false;
diff --git a/src/game/MapManager.cpp b/src/game/MapManager.cpp
index 8da9c761ed2..a2ba04a112a 100644
--- a/src/game/MapManager.cpp
+++ b/src/game/MapManager.cpp
@@ -298,15 +298,15 @@ void MapManager::Update(uint32 diff)
MapMapType::iterator iter = i_maps.begin();
for (; iter != i_maps.end(); ++iter)
{
- if (m_updater.activated())
+ if (m_updater.activated())
m_updater.schedule_update(*iter->second, i_timer.GetCurrent());
- else
+ else
{
- iter->second->Update(i_timer.GetCurrent());
- }
+ iter->second->Update(i_timer.GetCurrent());
+ }
}
if (m_updater.activated())
- m_updater.wait();
+ m_updater.wait();
for (iter = i_maps.begin(); iter != i_maps.end(); ++iter)
iter->second->DelayedUpdate(i_timer.GetCurrent());
diff --git a/src/game/SpellAuraEffects.cpp b/src/game/SpellAuraEffects.cpp
index e9aa7b194ac..952ae649214 100644
--- a/src/game/SpellAuraEffects.cpp
+++ b/src/game/SpellAuraEffects.cpp
@@ -385,11 +385,11 @@ void AuraEffect::GetTargetList(std::list<Unit *> & targetList) const
{
Aura::ApplicationMap const & targetMap = GetBase()->GetApplicationMap();
// remove all targets which were not added to new list - they no longer deserve area aura
- for (Aura::ApplicationMap::const_iterator appIter = targetMap.begin(); appIter != targetMap.end(); appIter++)
- {
+ for (Aura::ApplicationMap::const_iterator appIter = targetMap.begin(); appIter != targetMap.end(); appIter++)
+ {
if(appIter->second->HasEffect(GetEffIndex()))
targetList.push_back(appIter->second->GetTarget());
- }
+ }
}
int32 AuraEffect::CalculateAmount(Unit * caster)
@@ -397,11 +397,11 @@ int32 AuraEffect::CalculateAmount(Unit * caster)
int32 amount;
// default amount calculation
if(caster)
- amount = caster->CalculateSpellDamage(m_spellProto, m_effIndex, m_baseAmount, NULL);
+ amount = caster->CalculateSpellDamage(m_spellProto, m_effIndex, m_baseAmount, NULL);
else
amount = m_baseAmount + m_spellProto->EffectBaseDice[m_effIndex];
- // check item enchant aura cast
+ // check item enchant aura cast
if(!amount && caster)
if(uint64 itemGUID = GetBase()->GetCastItemGUID())
if(Player *playerCaster = dynamic_cast<Player*>(caster))
diff --git a/src/game/SpellAuras.cpp b/src/game/SpellAuras.cpp
index 19d484c0a4b..a81ab666cfd 100644
--- a/src/game/SpellAuras.cpp
+++ b/src/game/SpellAuras.cpp
@@ -1253,7 +1253,7 @@ void Aura::HandleAuraSpecificMods(AuraApplication const * aurApp, Unit * caster,
void Aura::SetNeedClientUpdateForTargets() const
{
- for (ApplicationMap::const_iterator appIter = m_applications.begin(); appIter != m_applications.end(); ++appIter)
+ for (ApplicationMap::const_iterator appIter = m_applications.begin(); appIter != m_applications.end(); ++appIter)
appIter->second->SetNeedClientUpdate();
}
@@ -1343,9 +1343,9 @@ void UnitAura::UpdateTargetMapForEffect(Unit * caster, uint8 effIndex)
}
case SPELL_EFFECT_APPLY_AREA_AURA_ENEMY:
{
- Trinity::AnyAoETargetUnitInObjectRangeCheck u_check(GetUnitOwner(), GetUnitOwner(), radius); // No GetCharmer in searcher
- Trinity::UnitListSearcher<Trinity::AnyAoETargetUnitInObjectRangeCheck> searcher(GetUnitOwner(), targets, u_check);
- GetUnitOwner()->VisitNearbyObject(radius, searcher);
+ Trinity::AnyAoETargetUnitInObjectRangeCheck u_check(GetUnitOwner(), GetUnitOwner(), radius); // No GetCharmer in searcher
+ Trinity::UnitListSearcher<Trinity::AnyAoETargetUnitInObjectRangeCheck> searcher(GetUnitOwner(), targets, u_check);
+ GetUnitOwner()->VisitNearbyObject(radius, searcher);
break;
}
case SPELL_EFFECT_APPLY_AREA_AURA_PET:
@@ -1361,7 +1361,7 @@ void UnitAura::UpdateTargetMapForEffect(Unit * caster, uint8 effIndex)
}
// mark all auras as ready to remove
- for (ApplicationMap::iterator appIter = m_applications.begin(); appIter != m_applications.end(); appIter++)
+ for (ApplicationMap::iterator appIter = m_applications.begin(); appIter != m_applications.end(); appIter++)
if (appIter->second->HasEffect(effIndex))
appIter->second->_SetCanBeRemoved(true);
@@ -1381,8 +1381,8 @@ void UnitAura::UpdateTargetMapForEffect(Unit * caster, uint8 effIndex)
if (*appIter != GetOwner())
{
bool addUnit = true;
- // check if not stacking aura already on target
- // this one prevents unwanted usefull buff loss because of stacking and prevents overriding auras periodicaly by 2 near area aura owners
+ // check if not stacking aura already on target
+ // this one prevents unwanted usefull buff loss because of stacking and prevents overriding auras periodicaly by 2 near area aura owners
for (Unit::AuraApplicationMap::iterator iter = (*appIter)->GetAppliedAuras().begin(); iter != (*appIter)->GetAppliedAuras().end(); ++iter)
{
Aura const * aura = iter->second->GetBase();
@@ -1401,8 +1401,8 @@ void UnitAura::UpdateTargetMapForEffect(Unit * caster, uint8 effIndex)
{
if((*appIter)->IsImmunedToSpellEffect(GetSpellProto(), effIndex))
continue;
- // add new unit to persistent area aura
- (*appIter)->_ApplyAuraEffect(this, effIndex);
+ // add new unit to persistent area aura
+ (*appIter)->_ApplyAuraEffect(this, effIndex);
// start combat with targeted enemy
if(GetSpellProto()->Effect[effIndex] == SPELL_EFFECT_APPLY_AREA_AURA_ENEMY)
@@ -1416,7 +1416,7 @@ void UnitAura::UpdateTargetMapForEffect(Unit * caster, uint8 effIndex)
}
// remove auras which are not in current area
- for (ApplicationMap::iterator appIter = m_applications.begin(); appIter != m_applications.end();)
+ for (ApplicationMap::iterator appIter = m_applications.begin(); appIter != m_applications.end();)
{
AuraApplication * aurApp = appIter->second;
++appIter;
@@ -1456,13 +1456,13 @@ void DynObjAura::UpdateTargetMapForEffect(Unit * caster, uint8 effIndex)
}
else
{
- Trinity::AnyAoETargetUnitInObjectRangeCheck u_check(GetDynobjOwner(), dynObjOwnerCaster, radius);
- Trinity::UnitListSearcher<Trinity::AnyAoETargetUnitInObjectRangeCheck> searcher(GetDynobjOwner(), targets, u_check);
- GetDynobjOwner()->VisitNearbyObject(radius, searcher);
+ Trinity::AnyAoETargetUnitInObjectRangeCheck u_check(GetDynobjOwner(), dynObjOwnerCaster, radius);
+ Trinity::UnitListSearcher<Trinity::AnyAoETargetUnitInObjectRangeCheck> searcher(GetDynobjOwner(), targets, u_check);
+ GetDynobjOwner()->VisitNearbyObject(radius, searcher);
}
// mark all auras as ready to remove
- for (ApplicationMap::iterator appIter = m_applications.begin(); appIter != m_applications.end(); appIter++)
+ for (ApplicationMap::iterator appIter = m_applications.begin(); appIter != m_applications.end(); appIter++)
if (appIter->second->HasEffect(effIndex))
appIter->second->_SetCanBeRemoved(true);
@@ -1485,8 +1485,8 @@ void DynObjAura::UpdateTargetMapForEffect(Unit * caster, uint8 effIndex)
{
if((*appIter)->IsImmunedToSpellEffect(GetSpellProto(), effIndex))
continue;
- // add new unit to persistent area aura
- (*appIter)->_ApplyAuraEffect(this, effIndex);
+ // add new unit to persistent area aura
+ (*appIter)->_ApplyAuraEffect(this, effIndex);
// start combat with targeted enemy
if(GetSpellProto()->EffectImplicitTargetB[effIndex] != TARGET_DEST_DYNOBJ_ALLY
@@ -1501,7 +1501,7 @@ void DynObjAura::UpdateTargetMapForEffect(Unit * caster, uint8 effIndex)
}
// remove auras which are not in current area
- for (ApplicationMap::iterator appIter = m_applications.begin(); appIter != m_applications.end();)
+ for (ApplicationMap::iterator appIter = m_applications.begin(); appIter != m_applications.end();)
{
AuraApplication * aurApp = appIter->second;
++appIter;
diff --git a/src/game/SpellAuras.h b/src/game/SpellAuras.h
index 0d855fd0647..b83d19f2310 100644
--- a/src/game/SpellAuras.h
+++ b/src/game/SpellAuras.h
@@ -38,11 +38,11 @@ class AuraApplication
friend AuraApplication * Unit::__ApplyAura(Aura * aura);
friend void Unit::__UnapplyAura(AuraApplicationMap::iterator &i);
friend bool Unit::_ApplyAuraEffect(Aura * aura, uint8 effIndex);
- private:
- Unit * const m_target;
- Aura * const m_base;
- uint8 m_slot; // Aura slot on unit
- uint8 m_flags; // Aura info flag
+ private:
+ Unit * const m_target;
+ Aura * const m_base;
+ uint8 m_slot; // Aura slot on unit
+ uint8 m_flags; // Aura info flag
AuraRemoveMode m_removeMode:8; // Store info for know remove aura reason
bool m_needClientUpdate:1;
bool m_isNeedManyNegativeEffects:1;
@@ -53,15 +53,15 @@ class AuraApplication
private:
bool _CheckPositive(Unit * caster) const;
void _HandleEffect(uint8 effIndex, bool apply);
- public:
+ public:
bool _CanBeRemoved() const {return m_canBeRemoved;}
void _SetCanBeRemoved(bool val) {m_canBeRemoved = val;}
Unit * GetTarget() const { return m_target; }
Aura * GetBase() const { return m_base; }
- uint8 GetSlot() const { return m_slot; }
- uint8 GetFlags() const { return m_flags; }
+ uint8 GetSlot() const { return m_slot; }
+ uint8 GetFlags() const { return m_flags; }
uint8 GetEffectMask() const { return m_flags & (AFLAG_EFF_INDEX_0 | AFLAG_EFF_INDEX_1 | AFLAG_EFF_INDEX_2); }
bool HasEffect(uint8 effect) const { assert(effect < MAX_SPELL_EFFECTS); return m_flags & (1<<effect); }
bool IsPositive() const { return m_flags & AFLAG_POSITIVE; }
@@ -175,12 +175,12 @@ class TRINITY_DLL_SPEC Aura
int32 m_duration; // Current time
int32 m_timeCla; // Timer for power per sec calcultion
- uint8 const m_casterLevel; // Aura level (store caster level for correct show level dep amount)
+ uint8 const m_casterLevel; // Aura level (store caster level for correct show level dep amount)
uint8 m_procCharges; // Aura charges (0 for infinite)
uint8 m_stackAmount; // Aura stack amount
AuraEffect * m_effects[3];
- ApplicationMap m_applications;
+ ApplicationMap m_applications;
bool m_isRemoved:1;
bool m_isSingleTarget:1; // true if it's a single target spell and registered at caster - can change at spell steal for example
diff --git a/src/game/WorldSocket.cpp b/src/game/WorldSocket.cpp
index 0097da8f359..bad2f310d76 100644
--- a/src/game/WorldSocket.cpp
+++ b/src/game/WorldSocket.cpp
@@ -830,14 +830,14 @@ int WorldSocket::HandleAuthSession (WorldPacket& recvPacket)
" AND (RealmID = '%d'"
" OR RealmID = '-1')",
id, realmID);
- if(!result)
- security = 0;
- else
- {
- fields = result->Fetch ();
- security = fields[1].GetInt32();
- delete result;
- }
+ if(!result)
+ security = 0;
+ else
+ {
+ fields = result->Fetch ();
+ security = fields[1].GetInt32();
+ delete result;
+ }
// Re-check account ban (same check as in realmd)
QueryResult *banresult =