diff options
| author | Rat <gmstreetrat@gmail.com> | 2014-12-20 17:25:15 +0100 |
|---|---|---|
| committer | Rat <gmstreetrat@gmail.com> | 2014-12-20 17:25:15 +0100 |
| commit | ec513ecfc2128e06b5fe34ad5c282817c7f41721 (patch) | |
| tree | 3337d48cc71bff4a7f2836023970837af3446c2e /src/server/game/Entities/Object | |
| parent | e6339778c8f29aada3a08b51f6668f813ea8ba2e (diff) | |
Core/Items:
- Added basic inventory item movements
(packets need to be ported to new handlers after more testing)
- Fixed some item visual bugs
Diffstat (limited to 'src/server/game/Entities/Object')
| -rw-r--r-- | src/server/game/Entities/Object/Object.cpp | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/src/server/game/Entities/Object/Object.cpp b/src/server/game/Entities/Object/Object.cpp index 40a8ed046fb..0aa9098adf1 100644 --- a/src/server/game/Entities/Object/Object.cpp +++ b/src/server/game/Entities/Object/Object.cpp @@ -1078,12 +1078,14 @@ void Object::SetUInt64Value(uint16 index, uint64 value) bool Object::AddGuidValue(uint16 index, ObjectGuid const& value) { - ASSERT(index + 1 < m_valuesCount || PrintIndexError(index, true)); + ASSERT(index + 3 < m_valuesCount || PrintIndexError(index, true)); if (!value.IsEmpty() && ((ObjectGuid*)&(m_uint32Values[index]))->IsEmpty()) { *((ObjectGuid*)&(m_uint32Values[index])) = value; _changesMask.SetBit(index); _changesMask.SetBit(index + 1); + _changesMask.SetBit(index + 2); + _changesMask.SetBit(index + 3); if (m_inWorld && !m_objectUpdated) { @@ -1099,13 +1101,15 @@ bool Object::AddGuidValue(uint16 index, ObjectGuid const& value) bool Object::RemoveGuidValue(uint16 index, ObjectGuid const& value) { - ASSERT(index + 1 < m_valuesCount || PrintIndexError(index, true)); + ASSERT(index + 3 < m_valuesCount || PrintIndexError(index, true)); if (!value.IsEmpty() && *((ObjectGuid*)&(m_uint32Values[index])) == value) { m_uint32Values[index] = 0; m_uint32Values[index + 1] = 0; _changesMask.SetBit(index); _changesMask.SetBit(index + 1); + _changesMask.SetBit(index + 2); + _changesMask.SetBit(index + 3); if (m_inWorld && !m_objectUpdated) { @@ -1186,12 +1190,14 @@ void Object::SetUInt16Value(uint16 index, uint8 offset, uint16 value) void Object::SetGuidValue(uint16 index, ObjectGuid const& value) { - ASSERT(index + 1 < m_valuesCount || PrintIndexError(index, true)); + ASSERT(index + 3 < m_valuesCount || PrintIndexError(index, true)); if (*((ObjectGuid*)&(m_uint32Values[index])) != value) { *((ObjectGuid*)&(m_uint32Values[index])) = value; _changesMask.SetBit(index); _changesMask.SetBit(index + 1); + _changesMask.SetBit(index + 2); + _changesMask.SetBit(index + 3); if (m_inWorld && !m_objectUpdated) { |
