From ab146caaa86e5d0f89bdbcf967f3d620b5aa3c25 Mon Sep 17 00:00:00 2001 From: Xanadu Date: Thu, 11 Feb 2010 21:31:12 +0100 Subject: Fixed persistent area aura visual radii (flamestrike, consecration etc.). Thanks to QAston and _manuel_ for research. Closes issue 522. Closes issue 719. --HG-- branch : trunk --- src/game/DynamicObject.cpp | 10 ++++++++-- src/game/SpellEffects.cpp | 1 - 2 files changed, 8 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/game/DynamicObject.cpp b/src/game/DynamicObject.cpp index c6cbd786c4b..88d9848d3c2 100644 --- a/src/game/DynamicObject.cpp +++ b/src/game/DynamicObject.cpp @@ -88,10 +88,16 @@ bool DynamicObject::Create(uint32 guidlow, Unit *caster, uint32 spellId, const P SetEntry(spellId); SetFloatValue( OBJECT_FIELD_SCALE_X, 1 ); SetUInt64Value( DYNAMICOBJECT_CASTER, caster->GetGUID() ); - SetUInt32Value( DYNAMICOBJECT_BYTES, 0x00000001 ); // effectMask? + + // The lower word of DYNAMICOBJECT_BYTES must be 0x0001. This value means that the visual radius will be overriden + // by client for most of the "ground patch" visual effect spells and a few "skyfall" ones like Hurricane. + // If any other value is used, the client will _always_ use the radius provided in DYNAMICOBJECT_RADIUS, but + // precompensation is necessary (eg radius *= 2) for many spells. Anyway, blizz sends 0x0001 for all the spells + // I saw sniffed... + SetUInt32Value( DYNAMICOBJECT_BYTES, 0x00000001 ); SetUInt32Value( DYNAMICOBJECT_SPELLID, spellId ); SetFloatValue( DYNAMICOBJECT_RADIUS, radius ); - SetUInt32Value( DYNAMICOBJECT_CASTTIME, getMSTime() ); // new 2.4.0 + SetUInt32Value( DYNAMICOBJECT_CASTTIME, getMSTime() ); m_isWorldObject = active; return true; diff --git a/src/game/SpellEffects.cpp b/src/game/SpellEffects.cpp index f04d3a78715..56eb08e56de 100644 --- a/src/game/SpellEffects.cpp +++ b/src/game/SpellEffects.cpp @@ -3125,7 +3125,6 @@ void Spell::EffectPersistentAA(uint32 i) delete dynObj; return; } - dynObj->SetUInt32Value(DYNAMICOBJECT_BYTES, 0x01eeeeee); caster->AddDynObject(dynObj); dynObj->GetMap()->Add(dynObj); -- cgit v1.2.3