aboutsummaryrefslogtreecommitdiff
path: root/src/server/game/Spells/SpellEffects.cpp
diff options
context:
space:
mode:
authorShauren <shauren.trinity@gmail.com>2017-05-21 23:18:43 +0200
committerShauren <shauren.trinity@gmail.com>2017-05-21 23:18:43 +0200
commit3d7c2ef88f2ca3293a1df0411ad49e3eb5a96079 (patch)
treed9a92cf30fcf560d837e2b3b0a212a6834534f46 /src/server/game/Spells/SpellEffects.cpp
parent3cb8f532dae1062c5f5bcda1b980463da99fe547 (diff)
Core/Game: Include cleanup, part 4 - packets and largest headers (after preprocessing, except player/objectmgr)
Diffstat (limited to 'src/server/game/Spells/SpellEffects.cpp')
-rw-r--r--src/server/game/Spells/SpellEffects.cpp85
1 files changed, 43 insertions, 42 deletions
diff --git a/src/server/game/Spells/SpellEffects.cpp b/src/server/game/Spells/SpellEffects.cpp
index 1eeb35f43ba..a5d97bc8843 100644
--- a/src/server/game/Spells/SpellEffects.cpp
+++ b/src/server/game/Spells/SpellEffects.cpp
@@ -16,54 +16,55 @@
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
+#include "Spell.h"
+#include "AccountMgr.h"
+#include "AreaTrigger.h"
+#include "Battleground.h"
+#include "BattlegroundMgr.h"
+#include "BattlePetMgr.h"
+#include "CombatLogPackets.h"
#include "Common.h"
+#include "Conversation.h"
+#include "Creature.h"
+#include "CreatureAI.h"
#include "DatabaseEnv.h"
-#include "WorldPacket.h"
-#include "Opcodes.h"
-#include "Log.h"
-#include "World.h"
-#include "ObjectMgr.h"
-#include "SpellMgr.h"
-#include "Player.h"
-#include "SkillExtraItems.h"
-#include "Unit.h"
-#include "Spell.h"
+#include "DuelPackets.h"
#include "DynamicObject.h"
-#include "SpellAuras.h"
-#include "SpellAuraEffects.h"
-#include "SpellHistory.h"
-#include "Group.h"
-#include "SharedDefines.h"
-#include "Pet.h"
#include "GameObject.h"
-#include "GossipDef.h"
-#include "Creature.h"
-#include "Totem.h"
-#include "CreatureAI.h"
-#include "BattlegroundMgr.h"
-#include "Battleground.h"
-#include "OutdoorPvPMgr.h"
-#include "Language.h"
-#include "SocialMgr.h"
-#include "Util.h"
-#include "TemporarySummon.h"
-#include "ScriptMgr.h"
#include "GameObjectAI.h"
-#include "AccountMgr.h"
+#include "Garrison.h"
+#include "GossipDef.h"
+#include "Group.h"
+#include "Guild.h"
#include "InstanceScript.h"
+#include "Language.h"
+#include "Log.h"
+#include "LootMgr.h"
+#include "MiscPackets.h"
+#include "ObjectMgr.h"
+#include "Opcodes.h"
+#include "OutdoorPvPMgr.h"
#include "PathGenerator.h"
-#include "Guild.h"
+#include "Pet.h"
+#include "Player.h"
#include "ReputationMgr.h"
-#include "AreaTrigger.h"
-#include "BattlePetMgr.h"
-#include "Garrison.h"
-#include "CombatLogPackets.h"
-#include "DuelPackets.h"
-#include "MiscPackets.h"
+#include "ScriptMgr.h"
+#include "SharedDefines.h"
+#include "SkillExtraItems.h"
+#include "SocialMgr.h"
+#include "SpellAuraEffects.h"
+#include "SpellAuras.h"
+#include "SpellHistory.h"
+#include "SpellMgr.h"
#include "SpellPackets.h"
#include "TalentPackets.h"
-#include "Conversation.h"
-#include "LootMgr.h"
+#include "TemporarySummon.h"
+#include "Totem.h"
+#include "Unit.h"
+#include "Util.h"
+#include "World.h"
+#include "WorldPacket.h"
+#include <G3D/Quat.h>
pEffect SpellEffects[TOTAL_SPELL_EFFECTS]=
{
@@ -4307,14 +4308,14 @@ void Spell::EffectCharge(SpellEffIndex /*effIndex*/)
spellEffectExtraData->SpellVisualId = effectInfo->MiscValueB;
}
// Spell is not using explicit target - no generated path
- if (m_preGeneratedPath.GetPathType() == PATHFIND_BLANK)
+ if (m_preGeneratedPath->GetPathType() == PATHFIND_BLANK)
{
//unitTarget->GetContactPoint(m_caster, pos.m_positionX, pos.m_positionY, pos.m_positionZ);
Position pos = unitTarget->GetFirstCollisionPosition(unitTarget->GetObjectSize(), unitTarget->GetRelativeAngle(m_caster));
m_caster->GetMotionMaster()->MoveCharge(pos.m_positionX, pos.m_positionY, pos.m_positionZ, speed, EVENT_CHARGE, false, unitTarget, spellEffectExtraData.get_ptr());
}
else
- m_caster->GetMotionMaster()->MoveCharge(m_preGeneratedPath, speed, unitTarget, spellEffectExtraData.get_ptr());
+ m_caster->GetMotionMaster()->MoveCharge(*m_preGeneratedPath, speed, unitTarget, spellEffectExtraData.get_ptr());
}
if (effectHandleMode == SPELL_EFFECT_HANDLE_HIT_TARGET)
@@ -4615,8 +4616,8 @@ void Spell::EffectDestroyAllTotems(SpellEffIndex /*effIndex*/)
SpellInfo const* spellInfo = sSpellMgr->GetSpellInfo(spell_id);
if (spellInfo)
{
- std::vector<SpellInfo::CostData> costs = spellInfo->CalcPowerCost(m_caster, spellInfo->GetSchoolMask());
- auto m = std::find_if(costs.begin(), costs.end(), [](SpellInfo::CostData const& cost) { return cost.Power == POWER_MANA; });
+ std::vector<SpellPowerCost> costs = spellInfo->CalcPowerCost(m_caster, spellInfo->GetSchoolMask());
+ auto m = std::find_if(costs.begin(), costs.end(), [](SpellPowerCost const& cost) { return cost.Power == POWER_MANA; });
if (m != costs.end())
mana += m->Amount;
}