[11806] A bit gameobject code refactoring

This commit is contained in:
SilverIce 2011-09-26 00:12:12 +03:00
parent 8057f774e8
commit 7a67f27ab3
9 changed files with 63 additions and 60 deletions

View file

@ -1006,7 +1006,7 @@ void Spell::EffectDummy(SpellEffectIndex eff_idx)
if (!pGameObj->Create(map->GenerateLocalLowGuid(HIGHGUID_GAMEOBJECT), 177704,
map, m_caster->GetPhaseMask(),
unitTarget->GetPositionX(), unitTarget->GetPositionY(), unitTarget->GetPositionZ(),
unitTarget->GetOrientation(), 0.0f, 0.0f, 0.0f, 0.0f, GO_ANIMPROGRESS_DEFAULT, GO_STATE_READY))
unitTarget->GetOrientation()))
{
delete pGameObj;
return;
@ -1061,7 +1061,7 @@ void Spell::EffectDummy(SpellEffectIndex eff_idx)
// create before death for get proper coordinates
if (!pGameObj->Create(map->GenerateLocalLowGuid(HIGHGUID_GAMEOBJECT), 179644, map, m_caster->GetPhaseMask(),
creatureTarget->GetPositionX(), creatureTarget->GetPositionY(), creatureTarget->GetPositionZ(),
creatureTarget->GetOrientation(), 0.0f, 0.0f, 0.0f, 0.0f, GO_ANIMPROGRESS_DEFAULT, GO_STATE_READY) )
creatureTarget->GetOrientation()) )
{
delete pGameObj;
return;
@ -6164,7 +6164,7 @@ void Spell::EffectSummonObjectWild(SpellEffectIndex eff_idx)
Map *map = target->GetMap();
if(!pGameObj->Create(map->GenerateLocalLowGuid(HIGHGUID_GAMEOBJECT), gameobject_id, map,
m_caster->GetPhaseMask(), x, y, z, target->GetOrientation(), 0.0f, 0.0f, 0.0f, 0.0f, GO_ANIMPROGRESS_DEFAULT, GO_STATE_READY))
m_caster->GetPhaseMask(), x, y, z, target->GetOrientation()))
{
delete pGameObj;
return;
@ -7889,7 +7889,7 @@ void Spell::EffectDuel(SpellEffectIndex eff_idx)
m_caster->GetPositionX()+(unitTarget->GetPositionX()-m_caster->GetPositionX())/2 ,
m_caster->GetPositionY()+(unitTarget->GetPositionY()-m_caster->GetPositionY())/2 ,
m_caster->GetPositionZ(),
m_caster->GetOrientation(), 0.0f, 0.0f, 0.0f, 0.0f, GO_ANIMPROGRESS_DEFAULT, GO_STATE_READY))
m_caster->GetOrientation()))
{
delete pGameObj;
return;
@ -8254,7 +8254,7 @@ void Spell::EffectSummonObject(SpellEffectIndex eff_idx)
Map *map = m_caster->GetMap();
if(!pGameObj->Create(map->GenerateLocalLowGuid(HIGHGUID_GAMEOBJECT), go_id, map,
m_caster->GetPhaseMask(), x, y, z, m_caster->GetOrientation(), 0.0f, 0.0f, 0.0f, 0.0f, GO_ANIMPROGRESS_DEFAULT, GO_STATE_READY))
m_caster->GetPhaseMask(), x, y, z, m_caster->GetOrientation()))
{
delete pGameObj;
return;
@ -8861,7 +8861,7 @@ void Spell::EffectTransmitted(SpellEffectIndex eff_idx)
GameObject* pGameObj = new GameObject;
if(!pGameObj->Create(cMap->GenerateLocalLowGuid(HIGHGUID_GAMEOBJECT), name_id, cMap,
m_caster->GetPhaseMask(), fx, fy, fz, m_caster->GetOrientation(), 0.0f, 0.0f, 0.0f, 0.0f, GO_ANIMPROGRESS_DEFAULT, GO_STATE_READY))
m_caster->GetPhaseMask(), fx, fy, fz, m_caster->GetOrientation()))
{
delete pGameObj;
return;