Core/Game: Include cleanup part 5

* ObjectMgr.h
* Player.h
* Unit.h
* G3D should no longer propagate everywhere from Spline/MotionMaster
This commit is contained in:
Shauren
2017-06-04 01:00:45 +02:00
parent ec72a59b08
commit b453e12423
442 changed files with 3521 additions and 2850 deletions

View File

@@ -28,6 +28,7 @@
#include "Creature.h"
#include "CreatureAI.h"
#include "DatabaseEnv.h"
#include "DB2Stores.h"
#include "DuelPackets.h"
#include "DynamicObject.h"
#include "GameObject.h"
@@ -37,10 +38,13 @@
#include "Group.h"
#include "Guild.h"
#include "InstanceScript.h"
#include "Item.h"
#include "Language.h"
#include "Log.h"
#include "LootMgr.h"
#include "Map.h"
#include "MiscPackets.h"
#include "MotionMaster.h"
#include "ObjectMgr.h"
#include "Opcodes.h"
#include "OutdoorPvPMgr.h"
@@ -64,7 +68,7 @@
#include "Util.h"
#include "World.h"
#include "WorldPacket.h"
#include <G3D/Quat.h>
#include "WorldSession.h"
pEffect SpellEffects[TOTAL_SPELL_EFFECTS]=
{
@@ -3158,8 +3162,8 @@ void Spell::EffectSummonObjectWild(SpellEffIndex effIndex)
Map* map = target->GetMap();
G3D::Quat rot = G3D::Matrix3::fromEulerAnglesZYX(target->GetOrientation(), 0.f, 0.f);
if (!pGameObj->Create(gameobject_id, map, m_caster->GetPhaseMask(), Position(x, y, z, target->GetOrientation()), QuaternionData(rot.x, rot.y, rot.z, rot.w), 255, GO_STATE_READY))
QuaternionData rot = QuaternionData::fromEulerAnglesZYX(target->GetOrientation(), 0.f, 0.f);
if (!pGameObj->Create(gameobject_id, map, m_caster->GetPhaseMask(), Position(x, y, z, target->GetOrientation()), rot, 255, GO_STATE_READY))
{
delete pGameObj;
return;
@@ -3185,7 +3189,7 @@ void Spell::EffectSummonObjectWild(SpellEffIndex effIndex)
if (uint32 linkedEntry = pGameObj->GetGOInfo()->GetLinkedGameObjectEntry())
{
GameObject* linkedGO = new GameObject();
if (linkedGO->Create(linkedEntry, map, m_caster->GetPhaseMask(), Position(x, y, z, target->GetOrientation()), QuaternionData(rot.x, rot.y, rot.z, rot.w), 255, GO_STATE_READY))
if (linkedGO->Create(linkedEntry, map, m_caster->GetPhaseMask(), Position(x, y, z, target->GetOrientation()), rot, 255, GO_STATE_READY))
{
linkedGO->CopyPhaseFrom(m_caster);
@@ -3734,8 +3738,7 @@ void Spell::EffectDuel(SpellEffIndex effIndex)
};
Map* map = m_caster->GetMap();
G3D::Quat rot = G3D::Matrix3::fromEulerAnglesZYX(pos.GetOrientation(), 0.f, 0.f);
if (!pGameObj->Create(gameobject_id, map, m_caster->GetPhaseMask(), pos, QuaternionData(rot.x, rot.y, rot.z, rot.w), 0, GO_STATE_READY))
if (!pGameObj->Create(gameobject_id, map, m_caster->GetPhaseMask(), pos, QuaternionData::fromEulerAnglesZYX(pos.GetOrientation(), 0.f, 0.f), 0, GO_STATE_READY))
{
delete pGameObj;
return;
@@ -3762,8 +3765,8 @@ void Spell::EffectDuel(SpellEffIndex effIndex)
packet.RequestedByWowAccount = caster->GetSession()->GetAccountGUID();
WorldPacket const* worldPacket = packet.Write();
caster->GetSession()->SendPacket(worldPacket);
target->GetSession()->SendPacket(worldPacket);
caster->SendDirectMessage(worldPacket);
target->SendDirectMessage(worldPacket);
// create duel-info
DuelInfo* duel = new DuelInfo;
@@ -4070,8 +4073,7 @@ void Spell::EffectSummonObject(SpellEffIndex effIndex)
m_caster->GetClosePoint(x, y, z, DEFAULT_WORLD_OBJECT_SIZE);
Map* map = m_caster->GetMap();
G3D::Quat rot = G3D::Matrix3::fromEulerAnglesZYX(m_caster->GetOrientation(), 0.f, 0.f);
if (!go->Create(go_id, map, m_caster->GetPhaseMask(), Position(x, y, z, m_caster->GetOrientation()), QuaternionData(rot.x, rot.y, rot.z, rot.w), 255, GO_STATE_READY))
if (!go->Create(go_id, map, m_caster->GetPhaseMask(), Position(x, y, z, m_caster->GetOrientation()), QuaternionData::fromEulerAnglesZYX(m_caster->GetOrientation(), 0.f, 0.f), 255, GO_STATE_READY))
{
delete go;
return;
@@ -4754,8 +4756,8 @@ void Spell::EffectTransmitted(SpellEffIndex effIndex)
GameObject* pGameObj = new GameObject();
Position pos = { fx, fy, fz, m_caster->GetOrientation() };
G3D::Quat rot = G3D::Matrix3::fromEulerAnglesZYX(m_caster->GetOrientation(), 0.f, 0.f);
if (!pGameObj->Create(name_id, cMap, m_caster->GetPhaseMask(), pos, QuaternionData(rot.x, rot.y, rot.z, rot.w), 255, GO_STATE_READY))
QuaternionData rot = QuaternionData::fromEulerAnglesZYX(m_caster->GetOrientation(), 0.f, 0.f);
if (!pGameObj->Create(name_id, cMap, m_caster->GetPhaseMask(), pos, rot, 255, GO_STATE_READY))
{
delete pGameObj;
return;
@@ -4822,7 +4824,7 @@ void Spell::EffectTransmitted(SpellEffIndex effIndex)
if (uint32 linkedEntry = pGameObj->GetGOInfo()->GetLinkedGameObjectEntry())
{
GameObject* linkedGO = new GameObject;
if (linkedGO->Create(linkedEntry, cMap, m_caster->GetPhaseMask(), pos, QuaternionData(rot.x, rot.y, rot.z, rot.w), 255, GO_STATE_READY))
if (linkedGO->Create(linkedEntry, cMap, m_caster->GetPhaseMask(), pos, rot, 255, GO_STATE_READY))
{
linkedGO->CopyPhaseFrom(m_caster);
@@ -5346,7 +5348,7 @@ void Spell::EffectPlayMusic(SpellEffIndex /*effIndex*/)
return;
}
unitTarget->ToPlayer()->GetSession()->SendPacket(WorldPackets::Misc::PlayMusic(soundid).Write());
unitTarget->ToPlayer()->SendDirectMessage(WorldPackets::Misc::PlayMusic(soundid).Write());
}
void Spell::EffectActivateSpec(SpellEffIndex /*effIndex*/)