diff options
author | megamage <none@none> | 2009-08-29 23:20:16 -0500 |
---|---|---|
committer | megamage <none@none> | 2009-08-29 23:20:16 -0500 |
commit | d802cd3811c77a1b0bef95a65fdfc4872ff557a8 (patch) | |
tree | 68be363ef1f3ce843a32254a9b8fd122b7803434 /src/game/DynamicObject.cpp | |
parent | 6954eae60ac320639451bd83782f294da367b733 (diff) |
*More update about positions.
*Ulduar: do not allow demolisher to regenerate pyrite. Player must shoot down and grab the containers to refill pyrite.
--HG--
branch : trunk
Diffstat (limited to 'src/game/DynamicObject.cpp')
-rw-r--r-- | src/game/DynamicObject.cpp | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/src/game/DynamicObject.cpp b/src/game/DynamicObject.cpp index 34b009bc7d4..5dd4059e21c 100644 --- a/src/game/DynamicObject.cpp +++ b/src/game/DynamicObject.cpp @@ -70,12 +70,10 @@ void DynamicObject::RemoveFromWorld() } } -bool DynamicObject::Create(uint32 guidlow, Unit *caster, uint32 spellId, uint32 effMask, float x, float y, float z, int32 duration, float radius, bool active) +bool DynamicObject::Create(uint32 guidlow, Unit *caster, uint32 spellId, uint32 effMask, const Position &pos, int32 duration, float radius, bool active) { SetMap(caster->GetMap()); - - Relocate(x, y, z, 0); - + Relocate(pos); if(!IsPositionValid()) { sLog.outError("DynamicObject (spell %u eff %u) not created. Suggested coordinates isn't valid (X: %f Y: %f)",spellId,effMask,GetPositionX(),GetPositionY()); @@ -90,9 +88,9 @@ bool DynamicObject::Create(uint32 guidlow, Unit *caster, uint32 spellId, uint32 SetUInt32Value( DYNAMICOBJECT_BYTES, 0x00000001 ); SetUInt32Value( DYNAMICOBJECT_SPELLID, spellId ); SetFloatValue( DYNAMICOBJECT_RADIUS, radius); - SetFloatValue( DYNAMICOBJECT_POS_X, x ); - SetFloatValue( DYNAMICOBJECT_POS_Y, y ); - SetFloatValue( DYNAMICOBJECT_POS_Z, z ); + SetFloatValue( DYNAMICOBJECT_POS_X, pos.m_positionX ); + SetFloatValue( DYNAMICOBJECT_POS_Y, pos.m_positionY ); + SetFloatValue( DYNAMICOBJECT_POS_Z, pos.m_positionZ ); SetUInt32Value( DYNAMICOBJECT_CASTTIME, getMSTime() ); // new 2.4.0 m_aliveDuration = duration; |