mirror of
https://github.com/mangosfour/server.git
synced 2025-12-14 16:37:01 +00:00
Fixed warnings.
This commit is contained in:
parent
8d6b26b6ab
commit
f7c733cd21
4 changed files with 20 additions and 13 deletions
|
|
@ -612,7 +612,7 @@ void Object::_BuildValuesUpdate(uint8 updatetype, ByteBuffer * data, UpdateMask
|
|||
// 2 specialized loops for speed optimization in non-unit case
|
||||
if(isType(TYPEMASK_UNIT)) // unit (creature/player) case
|
||||
{
|
||||
for( uint16 index = 0; index < m_valuesCount; index ++ )
|
||||
for( uint16 index = 0; index < m_valuesCount; ++index )
|
||||
{
|
||||
if( updateMask->GetBit( index ) )
|
||||
{
|
||||
|
|
@ -663,7 +663,7 @@ void Object::_BuildValuesUpdate(uint8 updatetype, ByteBuffer * data, UpdateMask
|
|||
}
|
||||
else if(isType(TYPEMASK_GAMEOBJECT)) // gameobject case
|
||||
{
|
||||
for( uint16 index = 0; index < m_valuesCount; index ++ )
|
||||
for( uint16 index = 0; index < m_valuesCount; ++index )
|
||||
{
|
||||
if( updateMask->GetBit( index ) )
|
||||
{
|
||||
|
|
@ -695,7 +695,7 @@ void Object::_BuildValuesUpdate(uint8 updatetype, ByteBuffer * data, UpdateMask
|
|||
}
|
||||
else // other objects case (no special index checks)
|
||||
{
|
||||
for( uint16 index = 0; index < m_valuesCount; index ++ )
|
||||
for( uint16 index = 0; index < m_valuesCount; ++index )
|
||||
{
|
||||
if( updateMask->GetBit( index ) )
|
||||
{
|
||||
|
|
@ -708,7 +708,7 @@ void Object::_BuildValuesUpdate(uint8 updatetype, ByteBuffer * data, UpdateMask
|
|||
|
||||
void Object::ClearUpdateMask(bool remove)
|
||||
{
|
||||
for( uint16 index = 0; index < m_valuesCount; index ++ )
|
||||
for( uint16 index = 0; index < m_valuesCount; ++index )
|
||||
{
|
||||
if(m_uint32Values_mirror[index]!= m_uint32Values[index])
|
||||
m_uint32Values_mirror[index] = m_uint32Values[index];
|
||||
|
|
@ -756,7 +756,7 @@ bool Object::LoadValues(const char* data)
|
|||
|
||||
void Object::_SetUpdateBits(UpdateMask *updateMask, Player* /*target*/) const
|
||||
{
|
||||
for( uint16 index = 0; index < m_valuesCount; index ++ )
|
||||
for( uint16 index = 0; index < m_valuesCount; ++index )
|
||||
{
|
||||
if(m_uint32Values_mirror[index]!= m_uint32Values[index])
|
||||
updateMask->SetBit(index);
|
||||
|
|
@ -765,7 +765,7 @@ void Object::_SetUpdateBits(UpdateMask *updateMask, Player* /*target*/) const
|
|||
|
||||
void Object::_SetCreateBits(UpdateMask *updateMask, Player* /*target*/) const
|
||||
{
|
||||
for( uint16 index = 0; index < m_valuesCount; index++ )
|
||||
for( uint16 index = 0; index < m_valuesCount; ++index )
|
||||
{
|
||||
if(GetUInt32Value(index) != 0)
|
||||
updateMask->SetBit(index);
|
||||
|
|
@ -884,7 +884,7 @@ void Object::SetUInt16Value( uint16 index, uint8 offset, uint16 value )
|
|||
return;
|
||||
}
|
||||
|
||||
if(uint8(m_uint32Values[ index ] >> (offset * 16)) != value)
|
||||
if(uint16(m_uint32Values[ index ] >> (offset * 16)) != value)
|
||||
{
|
||||
m_uint32Values[ index ] &= ~uint32(uint32(0xFFFF) << (offset * 16));
|
||||
m_uint32Values[ index ] |= uint32(uint32(value) << (offset * 16));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue