* Restored compilation on Linux after last revision
* Inserted some GCC 4.3 specific headers * Shaddar & bLuma: fix for SMSG_UPDATE_OBJECT on antrix
This commit is contained in:
parent
32248f0880
commit
24fbafdd51
@ -98,7 +98,7 @@ void ControlSocket::SendTelnetText(std::string s)
|
||||
|
||||
void ControlSocket::_Execute(std::string s)
|
||||
{
|
||||
DefReturnResult& r = _instance->GetScripts()->RunSingleLine(s);
|
||||
DefReturnResult r = _instance->GetScripts()->RunSingleLine(s);
|
||||
if(r.ok)
|
||||
{
|
||||
std::stringstream ss;
|
||||
|
||||
@ -38,11 +38,11 @@ void WorldSession::_HandleUpdateObjectOpcode(WorldPacket& recvPacket)
|
||||
{
|
||||
uint8 utype;
|
||||
uint8 hasTransport;
|
||||
uint32 usize, ublocks;
|
||||
uint32 usize, ublocks, readblocks=0;
|
||||
uint64 uguid;
|
||||
recvPacket >> ublocks >> hasTransport;
|
||||
logdev("UpdateObject: hasTransport = %u", hasTransport);
|
||||
while(recvPacket.rpos() < recvPacket.size())
|
||||
logdev("UpdateObject: blocks = %u, hasTransport = %u", ublocks, hasTransport);
|
||||
while((recvPacket.rpos() < recvPacket.size())&& (readblocks < ublocks))
|
||||
{
|
||||
recvPacket >> utype;
|
||||
switch(utype)
|
||||
@ -226,6 +226,7 @@ void WorldSession::_HandleUpdateObjectOpcode(WorldPacket& recvPacket)
|
||||
return;
|
||||
}
|
||||
} // switch
|
||||
readblocks++;
|
||||
} // while
|
||||
|
||||
} // func
|
||||
|
||||
@ -44,10 +44,12 @@ class UpdateMask
|
||||
( (uint8 *)mUpdateMask )[ index >> 3 ] &= (0xff ^ (1 << ( index & 0x7 ) ) );
|
||||
}
|
||||
|
||||
inline bool GetBit (uint32 index)
|
||||
{
|
||||
return ( ( (uint8 *)mUpdateMask)[ index >> 3 ] & ( 1 << ( index & 0x7 ) )) != 0;
|
||||
}
|
||||
inline bool GetBit (uint32 index)
|
||||
{
|
||||
if ( (index >> 3) >= mCount )
|
||||
return false;
|
||||
return ( ( (uint8 *)mUpdateMask)[ index >> 3 ] & ( 1 << ( index & 0x7 ) )) != 0;
|
||||
}
|
||||
|
||||
inline uint32 GetBlockCount() { return mBlocks; }
|
||||
inline uint32 GetLength() { return mBlocks << 2; }
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
#include <new.h>
|
||||
#include <new>
|
||||
|
||||
#include "common.h"
|
||||
#include "main.h"
|
||||
@ -80,7 +80,7 @@ void _new_handler(void)
|
||||
int main(int argc, char* argv[]) {
|
||||
try
|
||||
{
|
||||
set_new_handler(_new_handler);
|
||||
std::set_new_handler(_new_handler);
|
||||
log_prepare("logfile.txt","a");
|
||||
logcustom(0,LGREEN,"+----------------------------------+");
|
||||
logcustom(0,LGREEN,"| (C) 2006-2008 Snowstorm Software |");
|
||||
|
||||
@ -23,6 +23,9 @@
|
||||
#include <list>
|
||||
#include <map>
|
||||
#include <string>
|
||||
#if defined( __GNUC__ ) && (__GNUC__ * 10000 + __GNUC_MINOR__ * 100)>=40300
|
||||
#include <cstring>
|
||||
#endif
|
||||
|
||||
class ByteBufferException
|
||||
{
|
||||
|
||||
@ -22,6 +22,9 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
#ifndef _SOCKETBASE_H
|
||||
#define _SOCKETBASE_H
|
||||
#if defined( __GNUC__ ) && (__GNUC__ * 10000 + __GNUC_MINOR__ * 100)>=40300
|
||||
#include <cstring>
|
||||
#endif
|
||||
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
@ -70,6 +70,7 @@
|
||||
#else
|
||||
#define stricmp strcasecmp
|
||||
#define strnicmp strncasecmp
|
||||
#define memicmp memcmp
|
||||
#define I64FMT "%016llX"
|
||||
#define I64FMTD "%llu"
|
||||
#define SI64FMTD "%lld"
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user