mirror of
https://github.com/mangosfour/server.git
synced 2025-12-15 01:37:00 +00:00
[7715] Provided way for scripts set alternative gameobject state for client show.
Also use enum for gsmeobject states.
This commit is contained in:
parent
1ec21cfb71
commit
c2e6dd20dd
10 changed files with 80 additions and 53 deletions
|
|
@ -793,7 +793,7 @@ void Spell::EffectDummy(uint32 i)
|
|||
// create before death for get proper coordinates
|
||||
if(!pGameObj->Create(objmgr.GenerateLowGuid(HIGHGUID_GAMEOBJECT), 179644, map, m_caster->GetPhaseMask(),
|
||||
creatureTarget->GetPositionX(), creatureTarget->GetPositionY(), creatureTarget->GetPositionZ(),
|
||||
creatureTarget->GetOrientation(), 0.0f, 0.0f, 0.0f, 0.0f, 100, 1) )
|
||||
creatureTarget->GetOrientation(), 0.0f, 0.0f, 0.0f, 0.0f, 100, GO_STATE_READY) )
|
||||
{
|
||||
delete pGameObj;
|
||||
return;
|
||||
|
|
@ -4558,7 +4558,7 @@ void Spell::EffectSummonObjectWild(uint32 i)
|
|||
Map *map = target->GetMap();
|
||||
|
||||
if(!pGameObj->Create(objmgr.GenerateLowGuid(HIGHGUID_GAMEOBJECT), gameobject_id, map,
|
||||
m_caster->GetPhaseMask(), x, y, z, target->GetOrientation(), 0.0f, 0.0f, 0.0f, 0.0f, 100, 1))
|
||||
m_caster->GetPhaseMask(), x, y, z, target->GetOrientation(), 0.0f, 0.0f, 0.0f, 0.0f, 100, GO_STATE_READY))
|
||||
{
|
||||
delete pGameObj;
|
||||
return;
|
||||
|
|
@ -4606,7 +4606,7 @@ void Spell::EffectSummonObjectWild(uint32 i)
|
|||
{
|
||||
GameObject* linkedGO = new GameObject;
|
||||
if(linkedGO->Create(objmgr.GenerateLowGuid(HIGHGUID_GAMEOBJECT), linkedEntry, map,
|
||||
m_caster->GetPhaseMask(), x, y, z, target->GetOrientation(), 0.0f, 0.0f, 0.0f, 0.0f, 100, 1))
|
||||
m_caster->GetPhaseMask(), x, y, z, target->GetOrientation(), 0.0f, 0.0f, 0.0f, 0.0f, 100, GO_STATE_READY))
|
||||
{
|
||||
linkedGO->SetRespawnTime(duration > 0 ? duration/IN_MILISECONDS : 0);
|
||||
linkedGO->SetSpellId(m_spellInfo->Id);
|
||||
|
|
@ -5260,7 +5260,7 @@ void Spell::EffectDuel(uint32 i)
|
|||
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, 0, 1))
|
||||
m_caster->GetOrientation(), 0.0f, 0.0f, 0.0f, 0.0f, 0, GO_STATE_READY))
|
||||
{
|
||||
delete pGameObj;
|
||||
return;
|
||||
|
|
@ -5649,7 +5649,7 @@ void Spell::EffectSummonObject(uint32 i)
|
|||
|
||||
Map *map = m_caster->GetMap();
|
||||
if(!pGameObj->Create(objmgr.GenerateLowGuid(HIGHGUID_GAMEOBJECT), go_id, map,
|
||||
m_caster->GetPhaseMask(), x, y, z, m_caster->GetOrientation(), 0.0f, 0.0f, 0.0f, 0.0f, 0, 1))
|
||||
m_caster->GetPhaseMask(), x, y, z, m_caster->GetOrientation(), 0.0f, 0.0f, 0.0f, 0.0f, 0, GO_STATE_READY))
|
||||
{
|
||||
delete pGameObj;
|
||||
return;
|
||||
|
|
@ -6239,7 +6239,7 @@ void Spell::EffectTransmitted(uint32 effIndex)
|
|||
GameObject* pGameObj = new GameObject;
|
||||
|
||||
if(!pGameObj->Create(objmgr.GenerateLowGuid(HIGHGUID_GAMEOBJECT), name_id, cMap,
|
||||
m_caster->GetPhaseMask(), fx, fy, fz, m_caster->GetOrientation(), 0.0f, 0.0f, 0.0f, 0.0f, 100, 1))
|
||||
m_caster->GetPhaseMask(), fx, fy, fz, m_caster->GetOrientation(), 0.0f, 0.0f, 0.0f, 0.0f, 100, GO_STATE_READY))
|
||||
{
|
||||
delete pGameObj;
|
||||
return;
|
||||
|
|
@ -6306,7 +6306,7 @@ void Spell::EffectTransmitted(uint32 effIndex)
|
|||
{
|
||||
GameObject* linkedGO = new GameObject;
|
||||
if(linkedGO->Create(objmgr.GenerateLowGuid(HIGHGUID_GAMEOBJECT), linkedEntry, cMap,
|
||||
m_caster->GetPhaseMask(), fx, fy, fz, m_caster->GetOrientation(), 0.0f, 0.0f, 0.0f, 0.0f, 100, 1))
|
||||
m_caster->GetPhaseMask(), fx, fy, fz, m_caster->GetOrientation(), 0.0f, 0.0f, 0.0f, 0.0f, 100, GO_STATE_READY))
|
||||
{
|
||||
linkedGO->SetRespawnTime(duration > 0 ? duration/IN_MILISECONDS : 0);
|
||||
linkedGO->SetUInt32Value(GAMEOBJECT_LEVEL, m_caster->getLevel() );
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue