From b8540cf04d0522a9bf6804f7ce11d75a46744d21 Mon Sep 17 00:00:00 2001 From: NoFantasy Date: Mon, 28 Jun 2010 12:55:09 +0200 Subject: [PATCH] [10116] Remove some wrongly initialized fields for dynamic object. This will correct visual appearance of spells like for example id 26573. Signed-off-by: NoFantasy --- src/game/DynamicObject.cpp | 10 +++++----- src/game/SpellEffects.cpp | 8 ++++---- src/shared/revision_nr.h | 2 +- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/src/game/DynamicObject.cpp b/src/game/DynamicObject.cpp index ff10001fa..a95b0666a 100644 --- a/src/game/DynamicObject.cpp +++ b/src/game/DynamicObject.cpp @@ -73,11 +73,11 @@ bool DynamicObject::Create( uint32 guidlow, Unit *caster, uint32 spellId, SpellE SetEntry(spellId); SetObjectScale(DEFAULT_OBJECT_SCALE); - SetUInt64Value( DYNAMICOBJECT_CASTER, caster->GetGUID() ); - SetUInt32Value( DYNAMICOBJECT_BYTES, 0x00000001 ); - SetUInt32Value( DYNAMICOBJECT_SPELLID, spellId ); - SetFloatValue( DYNAMICOBJECT_RADIUS, radius); - SetUInt32Value( DYNAMICOBJECT_CASTTIME, getMSTime() ); // new 2.4.0 + SetUInt64Value(DYNAMICOBJECT_CASTER, caster->GetGUID()); + SetUInt32Value(DYNAMICOBJECT_BYTES, 0x00000001); + SetUInt32Value(DYNAMICOBJECT_SPELLID, spellId); + SetFloatValue(DYNAMICOBJECT_RADIUS, radius); + SetUInt32Value(DYNAMICOBJECT_CASTTIME, getMSTime()); // new 2.4.0 m_aliveDuration = duration; m_radius = radius; diff --git a/src/game/SpellEffects.cpp b/src/game/SpellEffects.cpp index fda410265..b161f7242 100644 --- a/src/game/SpellEffects.cpp +++ b/src/game/SpellEffects.cpp @@ -3446,9 +3446,7 @@ void Spell::EffectPersistentAA(SpellEffectIndex eff_idx) delete dynObj; return; } - dynObj->SetUInt32Value(OBJECT_FIELD_TYPE, 65); - dynObj->SetUInt32Value(GAMEOBJECT_DISPLAYID, 368003); - dynObj->SetUInt32Value(DYNAMICOBJECT_BYTES, 0x01eeeeee); + m_caster->AddDynObject(dynObj); m_caster->GetMap()->Add(dynObj); } @@ -4240,8 +4238,10 @@ void Spell::EffectAddFarsight(SpellEffectIndex eff_idx) delete dynObj; return; } - dynObj->SetUInt32Value(OBJECT_FIELD_TYPE, 65); + + // DYNAMICOBJECT_BYTES is appareltly different from the default bytes set in ::Create dynObj->SetUInt32Value(DYNAMICOBJECT_BYTES, 0x80000002); + m_caster->AddDynObject(dynObj); m_caster->GetMap()->Add(dynObj); diff --git a/src/shared/revision_nr.h b/src/shared/revision_nr.h index c3a84219e..0095e4755 100644 --- a/src/shared/revision_nr.h +++ b/src/shared/revision_nr.h @@ -1,4 +1,4 @@ #ifndef __REVISION_NR_H__ #define __REVISION_NR_H__ - #define REVISION_NR "10115" + #define REVISION_NR "10116" #endif // __REVISION_NR_H__