diff options
| author | Shauren <shauren.trinity@gmail.com> | 2017-06-04 01:00:45 +0200 |
|---|---|---|
| committer | Shauren <shauren.trinity@gmail.com> | 2017-06-04 01:00:45 +0200 |
| commit | b453e124231a90321fe79fbf3a62acdcfa54a691 (patch) | |
| tree | ca2a815b923080385ed9a3a69aefe20ee54a7969 /src/server/game/AI/SmartScripts | |
| parent | ec72a59b08e71ebc7ba00b32592ec903a7995a84 (diff) | |
Core/Game: Include cleanup part 5
* ObjectMgr.h
* Player.h
* Unit.h
* G3D should no longer propagate everywhere from Spline/MotionMaster
Diffstat (limited to 'src/server/game/AI/SmartScripts')
| -rw-r--r-- | src/server/game/AI/SmartScripts/SmartAI.cpp | 2 | ||||
| -rw-r--r-- | src/server/game/AI/SmartScripts/SmartScript.cpp | 19 | ||||
| -rw-r--r-- | src/server/game/AI/SmartScripts/SmartScriptMgr.cpp | 6 |
3 files changed, 19 insertions, 8 deletions
diff --git a/src/server/game/AI/SmartScripts/SmartAI.cpp b/src/server/game/AI/SmartScripts/SmartAI.cpp index 18ea269fbb0..6bf18bea890 100644 --- a/src/server/game/AI/SmartScripts/SmartAI.cpp +++ b/src/server/game/AI/SmartScripts/SmartAI.cpp @@ -16,10 +16,12 @@ */ #include "SmartAI.h" +#include "DB2Structure.h" #include "Creature.h" #include "GameObject.h" #include "Group.h" #include "Log.h" +#include "MotionMaster.h" #include "ObjectAccessor.h" #include "PetDefines.h" #include "Player.h" diff --git a/src/server/game/AI/SmartScripts/SmartScript.cpp b/src/server/game/AI/SmartScripts/SmartScript.cpp index 0280af9498e..6b160a45d30 100644 --- a/src/server/game/AI/SmartScripts/SmartScript.cpp +++ b/src/server/game/AI/SmartScripts/SmartScript.cpp @@ -20,21 +20,26 @@ #include "ChatTextBuilder.h" #include "Creature.h" #include "CreatureTextMgr.h" +#include "CreatureTextMgrImpl.h" +#include "DB2Stores.h" #include "GameEventMgr.h" #include "GameObject.h" #include "GossipDef.h" #include "GridNotifiersImpl.h" +#include "Group.h" #include "InstanceScript.h" #include "Language.h" #include "Log.h" #include "Map.h" +#include "MotionMaster.h" #include "ObjectAccessor.h" #include "ObjectMgr.h" #include "Random.h" #include "SmartAI.h" #include "SpellAuras.h" +#include "SpellMgr.h" +#include "TemporarySummon.h" #include "Vehicle.h" -#include <G3D/Quat.h> SmartScript::SmartScript() { @@ -1447,8 +1452,7 @@ void SmartScript::ProcessAction(SmartScriptHolder& e, Unit* unit, uint32 var0, u continue; Position pos = (*itr)->GetPositionWithOffset(Position(e.target.x, e.target.y, e.target.z, e.target.o)); - G3D::Quat rot = G3D::Matrix3::fromEulerAnglesZYX(pos.GetOrientation(), 0.f, 0.f); - summoner->SummonGameObject(e.action.summonGO.entry, pos, QuaternionData(rot.x, rot.y, rot.z, rot.w), e.action.summonGO.despawnTime); + summoner->SummonGameObject(e.action.summonGO.entry, pos, QuaternionData::fromEulerAnglesZYX(pos.GetOrientation(), 0.f, 0.f), e.action.summonGO.despawnTime); } delete targets; @@ -1457,8 +1461,7 @@ void SmartScript::ProcessAction(SmartScriptHolder& e, Unit* unit, uint32 var0, u if (e.GetTargetType() != SMART_TARGET_POSITION) break; - G3D::Quat rot = G3D::Matrix3::fromEulerAnglesZYX(e.target.o, 0.f, 0.f); - summoner->SummonGameObject(e.action.summonGO.entry, Position(e.target.x, e.target.y, e.target.z, e.target.o), QuaternionData(rot.x, rot.y, rot.z, rot.w), e.action.summonGO.despawnTime); + summoner->SummonGameObject(e.action.summonGO.entry, Position(e.target.x, e.target.y, e.target.z, e.target.o), QuaternionData::fromEulerAnglesZYX(e.target.o, 0.f, 0.f), e.action.summonGO.despawnTime); break; } case SMART_ACTION_KILL_UNIT: @@ -1700,12 +1703,12 @@ void SmartScript::ProcessAction(SmartScriptHolder& e, Unit* unit, uint32 var0, u if (!target) { - G3D::Vector3 dest(e.target.x, e.target.y, e.target.z); + Position dest(e.target.x, e.target.y, e.target.z); if (e.action.MoveToPos.transport) if (TransportBase* trans = me->GetDirectTransport()) - trans->CalculatePassengerPosition(dest.x, dest.y, dest.z); + trans->CalculatePassengerPosition(dest.m_positionX, dest.m_positionY, dest.m_positionZ); - me->GetMotionMaster()->MovePoint(e.action.MoveToPos.pointId, dest.x, dest.y, dest.z, e.action.MoveToPos.disablePathfinding == 0); + me->GetMotionMaster()->MovePoint(e.action.MoveToPos.pointId, dest, e.action.MoveToPos.disablePathfinding == 0); } else me->GetMotionMaster()->MovePoint(e.action.MoveToPos.pointId, target->GetPositionX(), target->GetPositionY(), target->GetPositionZ(), e.action.MoveToPos.disablePathfinding == 0); diff --git a/src/server/game/AI/SmartScripts/SmartScriptMgr.cpp b/src/server/game/AI/SmartScripts/SmartScriptMgr.cpp index e20c512b93c..bb4eec88183 100644 --- a/src/server/game/AI/SmartScripts/SmartScriptMgr.cpp +++ b/src/server/game/AI/SmartScripts/SmartScriptMgr.cpp @@ -16,14 +16,20 @@ */ #include "SmartScriptMgr.h" +#include "DB2Stores.h" #include "CreatureTextMgr.h" #include "DatabaseEnv.h" #include "GameEventMgr.h" #include "InstanceScript.h" #include "Log.h" +#include "MotionMaster.h" +#include "ObjectAccessor.h" #include "ObjectMgr.h" #include "SpellInfo.h" #include "SpellMgr.h" +#include "Timer.h" +#include "UnitDefines.h" +#include <algorithm> SmartWaypointMgr* SmartWaypointMgr::instance() { |
