From 3de9b857e01b7da7148b35b1618a4fb9a70b6638 Mon Sep 17 00:00:00 2001 From: Antz Date: Wed, 7 Dec 2016 19:06:18 +0000 Subject: [PATCH] remove obsolete code. Thanks H0zen --- src/game/Object/Object.cpp | 68 -------------------------------------- src/game/Object/Object.h | 4 --- 2 files changed, 72 deletions(-) diff --git a/src/game/Object/Object.cpp b/src/game/Object/Object.cpp index df0ec18f..fe10bcec 100644 --- a/src/game/Object/Object.cpp +++ b/src/game/Object/Object.cpp @@ -138,18 +138,6 @@ void Object::SendForcedObjectUpdate() } } -void Object::BuildMovementUpdateBlock(UpdateData* data, uint8 flags) const -{ - ByteBuffer buf(500); - - buf << uint8(UPDATETYPE_MOVEMENT); - buf << GetObjectGuid(); - - BuildMovementUpdate(&buf, flags); - - data->AddUpdateBlock(buf); -} - void Object::BuildCreateUpdateBlockForPlayer(UpdateData* data, Player* target) const { if (!target) @@ -719,62 +707,6 @@ void Object::RemoveFlag(uint16 index, uint32 oldFlag) } } -void Object::RemovePlayerSpecificFlag(uint16 index, uint32 oldFlag, Player* plr) -{ - /* Validate input */ - MANGOS_ASSERT(index < m_valuesCount || PrintIndexError(index, true)); - - uint32 oldval, newval; - - /* See if we already have custom flags set for the player */ - if (m_plrSpecificFlags.find(plr->GetGUIDLow()) != m_plrSpecificFlags.end()) - { oldval = m_plrSpecificFlags.find(plr->GetGUIDLow())->second; } - /* We don't already have flags, get them from the creature */ - else - { oldval = m_uint32Values[index]; } - - /* Set the new flag */ - newval = oldval & ~oldval; - - /* Make sure they're not the same */ - if (oldval != newval) - { - /* Update existing flag */ - m_plrSpecificFlags.find(plr->GetGUIDLow())->second = newval; - - /* Push updates to client */ - MarkForClientUpdate(); - } -} - -void Object::SetPlayerSpecificFlag(uint16 index, uint32 newFlag, Player* plr) -{ - /* Validate input */ - MANGOS_ASSERT(index < m_valuesCount || PrintIndexError(index, true)); - - uint32 oldval, newval; - - /* See if we already have custom flags set for the player */ - if (m_plrSpecificFlags.find(plr->GetGUIDLow()) != m_plrSpecificFlags.end()) - { oldval = m_plrSpecificFlags.find(plr->GetGUIDLow())->second; } - /* We don't already have flags, get them from the creature */ - else - { oldval = m_uint32Values[index]; } - - /* Set the new flag */ - newval = oldval | newFlag; - - /* Make sure they're not the same */ - if (oldval != newval) - { - /* Update existing flag */ - m_plrSpecificFlags.find(plr->GetGUIDLow())->second = newval; - - /* Push updates to client */ - MarkForClientUpdate(); - } -} - void Object::SetByteFlag(uint16 index, uint8 offset, uint8 newFlag) { MANGOS_ASSERT(index < m_valuesCount || PrintIndexError(index, true)); diff --git a/src/game/Object/Object.h b/src/game/Object/Object.h index 91836260..b3ecf325 100644 --- a/src/game/Object/Object.h +++ b/src/game/Object/Object.h @@ -180,7 +180,6 @@ class Object void BuildValuesUpdateBlockForPlayer(UpdateData* data, Player* target) const; void BuildOutOfRangeUpdateBlock(UpdateData* data) const; - void BuildMovementUpdateBlock(UpdateData* data, uint8 flags = 0) const; virtual void DestroyForPlayer(Player* target) const; @@ -274,9 +273,6 @@ class Object void SetFlag(uint16 index, uint32 newFlag); void RemoveFlag(uint16 index, uint32 oldFlag); - void SetPlayerSpecificFlag(uint16 index, uint32 newFlag, Player* plr); - void RemovePlayerSpecificFlag(uint16 index, uint32 newFlag, Player* plr); - void ToggleFlag(uint16 index, uint32 flag) { if (HasFlag(index, flag))