mirror of
https://github.com/mangosfour/server.git
synced 2025-12-16 04:37:00 +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
|
// 2 specialized loops for speed optimization in non-unit case
|
||||||
if(isType(TYPEMASK_UNIT)) // unit (creature/player) 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 ) )
|
if( updateMask->GetBit( index ) )
|
||||||
{
|
{
|
||||||
|
|
@ -663,7 +663,7 @@ void Object::_BuildValuesUpdate(uint8 updatetype, ByteBuffer * data, UpdateMask
|
||||||
}
|
}
|
||||||
else if(isType(TYPEMASK_GAMEOBJECT)) // gameobject case
|
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 ) )
|
if( updateMask->GetBit( index ) )
|
||||||
{
|
{
|
||||||
|
|
@ -695,7 +695,7 @@ void Object::_BuildValuesUpdate(uint8 updatetype, ByteBuffer * data, UpdateMask
|
||||||
}
|
}
|
||||||
else // other objects case (no special index checks)
|
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 ) )
|
if( updateMask->GetBit( index ) )
|
||||||
{
|
{
|
||||||
|
|
@ -708,7 +708,7 @@ void Object::_BuildValuesUpdate(uint8 updatetype, ByteBuffer * data, UpdateMask
|
||||||
|
|
||||||
void Object::ClearUpdateMask(bool remove)
|
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])
|
if(m_uint32Values_mirror[index]!= m_uint32Values[index])
|
||||||
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
|
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])
|
if(m_uint32Values_mirror[index]!= m_uint32Values[index])
|
||||||
updateMask->SetBit(index);
|
updateMask->SetBit(index);
|
||||||
|
|
@ -765,7 +765,7 @@ void Object::_SetUpdateBits(UpdateMask *updateMask, Player* /*target*/) const
|
||||||
|
|
||||||
void Object::_SetCreateBits(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)
|
if(GetUInt32Value(index) != 0)
|
||||||
updateMask->SetBit(index);
|
updateMask->SetBit(index);
|
||||||
|
|
@ -884,7 +884,7 @@ void Object::SetUInt16Value( uint16 index, uint8 offset, uint16 value )
|
||||||
return;
|
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(0xFFFF) << (offset * 16));
|
||||||
m_uint32Values[ index ] |= uint32(uint32(value) << (offset * 16));
|
m_uint32Values[ index ] |= uint32(uint32(value) << (offset * 16));
|
||||||
|
|
|
||||||
|
|
@ -126,14 +126,21 @@ bool UpdateData::BuildPacket(WorldPacket *packet)
|
||||||
|
|
||||||
if (pSize > 100 ) // compress large packets
|
if (pSize > 100 ) // compress large packets
|
||||||
{
|
{
|
||||||
packet->resize(pSize);
|
*packet << uint32(pSize);
|
||||||
|
packet->append(buf);
|
||||||
packet->put<uint32>(0, pSize);
|
|
||||||
|
|
||||||
uint32 destsize = pSize;
|
uint32 destsize = pSize;
|
||||||
Compress(const_cast<uint8*>(packet->contents()) + sizeof(uint32), &destsize, (void*)buf.contents(), pSize);
|
|
||||||
|
Compress(const_cast<uint8*>(packet->contents()) + sizeof(uint32),
|
||||||
|
&destsize,
|
||||||
|
const_cast<uint8*>(packet->contents()) + sizeof(uint32),
|
||||||
|
pSize);
|
||||||
|
|
||||||
if (destsize == 0)
|
if (destsize == 0)
|
||||||
|
{
|
||||||
|
sLog.outError("Error while compressing update packet!");
|
||||||
return false;
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
packet->resize( destsize + sizeof(uint32) );
|
packet->resize( destsize + sizeof(uint32) );
|
||||||
packet->SetOpcode( SMSG_COMPRESSED_UPDATE_OBJECT );
|
packet->SetOpcode( SMSG_COMPRESSED_UPDATE_OBJECT );
|
||||||
|
|
|
||||||
|
|
@ -283,7 +283,7 @@
|
||||||
AdditionalDependencies="libmySQL.lib libeay32.lib ws2_32.lib winmm.lib odbc32.lib odbccp32.lib advapi32.lib dbghelp.lib MSVCPRTD.LIB msvcrtd.lib"
|
AdditionalDependencies="libmySQL.lib libeay32.lib ws2_32.lib winmm.lib odbc32.lib odbccp32.lib advapi32.lib dbghelp.lib MSVCPRTD.LIB msvcrtd.lib"
|
||||||
OutputFile="..\..\bin\$(PlatformName)_$(ConfigurationName)\mangosd.exe"
|
OutputFile="..\..\bin\$(PlatformName)_$(ConfigurationName)\mangosd.exe"
|
||||||
Version=""
|
Version=""
|
||||||
LinkIncremental="1"
|
LinkIncremental="2"
|
||||||
SuppressStartupBanner="true"
|
SuppressStartupBanner="true"
|
||||||
AdditionalLibraryDirectories="..\..\dep\lib\$(PlatformName)_$(ConfigurationName)"
|
AdditionalLibraryDirectories="..\..\dep\lib\$(PlatformName)_$(ConfigurationName)"
|
||||||
GenerateDebugInformation="true"
|
GenerateDebugInformation="true"
|
||||||
|
|
|
||||||
|
|
@ -69,7 +69,7 @@
|
||||||
Name="VCLinkerTool"
|
Name="VCLinkerTool"
|
||||||
AdditionalDependencies="mangosd.lib zlib.lib libmySQL.lib libeay32.lib ws2_32.lib winmm.lib odbc32.lib odbccp32.lib aced.lib"
|
AdditionalDependencies="mangosd.lib zlib.lib libmySQL.lib libeay32.lib ws2_32.lib winmm.lib odbc32.lib odbccp32.lib aced.lib"
|
||||||
OutputFile="..\..\bin\$(PlatformName)_$(ConfigurationName)\MaNGOSScript.dll"
|
OutputFile="..\..\bin\$(PlatformName)_$(ConfigurationName)\MaNGOSScript.dll"
|
||||||
LinkIncremental="1"
|
LinkIncremental="2"
|
||||||
AdditionalLibraryDirectories=";.\mangosd__$(PlatformName)_$(ConfigurationName);.\zlib__$(PlatformName)_$(ConfigurationName);..\..\dep\lib\$(PlatformName)_$(ConfigurationName)"
|
AdditionalLibraryDirectories=";.\mangosd__$(PlatformName)_$(ConfigurationName);.\zlib__$(PlatformName)_$(ConfigurationName);..\..\dep\lib\$(PlatformName)_$(ConfigurationName)"
|
||||||
GenerateDebugInformation="true"
|
GenerateDebugInformation="true"
|
||||||
ProgramDatabaseFile="$(OutDir)\MaNGOSScript.pdb"
|
ProgramDatabaseFile="$(OutDir)\MaNGOSScript.pdb"
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue