From 4024a1c50c45fa4711e66d3f736cd03c1af409f3 Mon Sep 17 00:00:00 2001 From: NoFantasy Date: Tue, 29 Jun 2010 12:22:54 +0200 Subject: [PATCH] [10121] Add a few comments about DYNAMICOBJECT_BYTES + fix typo in one. --- src/game/DynamicObject.cpp | 13 +++++++++++++ src/game/SpellEffects.cpp | 2 +- src/shared/revision_nr.h | 2 +- 3 files changed, 15 insertions(+), 2 deletions(-) diff --git a/src/game/DynamicObject.cpp b/src/game/DynamicObject.cpp index a95b0666a..c9c39df8b 100644 --- a/src/game/DynamicObject.cpp +++ b/src/game/DynamicObject.cpp @@ -74,7 +74,20 @@ bool DynamicObject::Create( uint32 guidlow, Unit *caster, uint32 spellId, SpellE SetObjectScale(DEFAULT_OBJECT_SCALE); SetUInt64Value(DYNAMICOBJECT_CASTER, caster->GetGUID()); + + /* Bytes field, so it's really 4 bit fields. These flags are unknown, but we do know that 0x00000001 is set for most. + Farsight for example, does not have this flag, instead it has 0x80000002. + Flags are set dynamically with some conditions, so one spell may have different flags set, depending on those conditions. + The size of the visual may be controlled to some degree with these flags. + + uint32 bytes = 0x00000000; + bytes |= 0x01; + bytes |= 0x00 << 8; + bytes |= 0x00 << 16; + bytes |= 0x00 << 24; + */ SetUInt32Value(DYNAMICOBJECT_BYTES, 0x00000001); + SetUInt32Value(DYNAMICOBJECT_SPELLID, spellId); SetFloatValue(DYNAMICOBJECT_RADIUS, radius); SetUInt32Value(DYNAMICOBJECT_CASTTIME, getMSTime()); // new 2.4.0 diff --git a/src/game/SpellEffects.cpp b/src/game/SpellEffects.cpp index b161f7242..a765308c5 100644 --- a/src/game/SpellEffects.cpp +++ b/src/game/SpellEffects.cpp @@ -4239,7 +4239,7 @@ void Spell::EffectAddFarsight(SpellEffectIndex eff_idx) return; } - // DYNAMICOBJECT_BYTES is appareltly different from the default bytes set in ::Create + // DYNAMICOBJECT_BYTES is apparently different from the default bytes set in ::Create dynObj->SetUInt32Value(DYNAMICOBJECT_BYTES, 0x80000002); m_caster->AddDynObject(dynObj); diff --git a/src/shared/revision_nr.h b/src/shared/revision_nr.h index 097eec9eb..c6508e84a 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 "10120" + #define REVISION_NR "10121" #endif // __REVISION_NR_H__