NULL to nullptr

This commit is contained in:
Arthur Ice
2013-05-04 18:06:58 -07:00
parent e1c2657b11
commit 7560b6b0a7
216 changed files with 4151 additions and 4151 deletions
+13 -13
View File
@@ -15,14 +15,14 @@
namespace Client62 {
static const char *name = "6.2";
static OpcodeManager *opcodes = NULL;
static OpcodeManager *opcodes = nullptr;
static Strategy struct_strategy;
char *SerializeItem(const ItemInst *inst, int16 slot_id, uint32 *length, uint8 depth);
void Register(EQStreamIdentifier &into) {
//create our opcode manager if we havent already
if(opcodes == NULL) {
if(opcodes == nullptr) {
//TODO: get this file name from the config file
string opfile = "patch_";
opfile += name;
@@ -64,7 +64,7 @@ void Reload() {
//opcode managers because we need to change the manager pointer, which means
//we need to go to every stream and replace it's manager.
if(opcodes != NULL) {
if(opcodes != nullptr) {
//TODO: get this file name from the config file
string opfile = "patch_";
opfile += name;
@@ -372,7 +372,7 @@ ENCODE(OP_Track)
{
EQApplicationPacket *in = *p;
*p = NULL;
*p = nullptr;
unsigned char *__emu_buffer = in->pBuffer;
Track_Struct *emu = (Track_Struct *) __emu_buffer;
@@ -407,7 +407,7 @@ ENCODE(OP_ZoneEntry){ ENCODE_FORWARD(OP_ZoneSpawns); }
ENCODE(OP_ZoneSpawns) {
//consume the packet
EQApplicationPacket *in = *p;
*p = NULL;
*p = nullptr;
//store away the emu struct
unsigned char *__emu_buffer = in->pBuffer;
@@ -502,7 +502,7 @@ ENCODE(OP_ItemLinkResponse) { ENCODE_FORWARD(OP_ItemPacket); }
ENCODE(OP_ItemPacket) {
//consume the packet
EQApplicationPacket *in = *p;
*p = NULL;
*p = nullptr;
//store away the emu struct
unsigned char *__emu_buffer = in->pBuffer;
@@ -531,7 +531,7 @@ ENCODE(OP_ItemPacket) {
ENCODE(OP_CharInventory) {
//consume the packet
EQApplicationPacket *in = *p;
*p = NULL;
*p = nullptr;
//store away the emu struct
unsigned char *__emu_buffer = in->pBuffer;
@@ -570,7 +570,7 @@ ENCODE(OP_CharInventory) {
ENCODE(OP_GuildMemberList) {
//consume the packet
EQApplicationPacket *in = *p;
*p = NULL;
*p = nullptr;
//store away the emu struct
unsigned char *__emu_buffer = in->pBuffer;
@@ -660,7 +660,7 @@ ENCODE(OP_GuildMemberList) {
ENCODE(OP_ReadBook) {
EQApplicationPacket *in = *p;
*p = NULL;
*p = nullptr;
unsigned char *__emu_buffer = in->pBuffer;
@@ -709,7 +709,7 @@ ENCODE(OP_Illusion) {
ENCODE(OP_BazaarSearch)
{
EQApplicationPacket *in = *p;
*p = NULL;
*p = nullptr;
char *Buffer = (char *)in->pBuffer;
@@ -949,10 +949,10 @@ DECODE(OP_FaceChange) {
}
char *SerializeItem(const ItemInst *inst, int16 slot_id, uint32 *length, uint8 depth) {
char *serialization = NULL;
char *instance = NULL;
char *serialization = nullptr;
char *instance = nullptr;
const char *protection=(const char *)"\\\\\\\\\\";
char *sub_items[10] = { NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL };
char *sub_items[10] = { nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr };
bool stackable=inst->IsStackable();
uint32 merchant_slot=inst->GetMerchantSlot();
int16 charges=inst->GetCharges();
+27 -27
View File
@@ -18,14 +18,14 @@
namespace RoF {
static const char *name = "RoF";
static OpcodeManager *opcodes = NULL;
static OpcodeManager *opcodes = nullptr;
static Strategy struct_strategy;
char* SerializeItem(const ItemInst *inst, int16 slot_id, uint32 *length, uint8 depth);
void Register(EQStreamIdentifier &into) {
//create our opcode manager if we havent already
if(opcodes == NULL) {
if(opcodes == nullptr) {
//TODO: get this file name from the config file
string opfile = "patch_";
opfile += name;
@@ -69,7 +69,7 @@ void Reload() {
//opcode managers because we need to change the manager pointer, which means
//we need to go to every stream and replace it's manager.
if(opcodes != NULL) {
if(opcodes != nullptr) {
//TODO: get this file name from the config file
string opfile = "patch_";
opfile += name;
@@ -403,7 +403,7 @@ static inline structs::MainInvItemSlotStruct MainInvTitaniumToRoFSlot(uint32 Tit
ENCODE(OP_TaskHistoryReply)
{
EQApplicationPacket *in = *p;
*p = NULL;
*p = nullptr;
// First we need to calculate the length of the new packet
in->SetReadPosition(4);
@@ -522,7 +522,7 @@ ENCODE(OP_TaskHistoryReply)
ENCODE(OP_TaskDescription)
{
EQApplicationPacket *in = *p;
*p = NULL;
*p = nullptr;
EQApplicationPacket *outapp = new EQApplicationPacket(OP_TaskDescription, in->size + 1);
// Set the Write pointer as we don't know what has been done with the packet before we get it.
@@ -539,7 +539,7 @@ ENCODE(OP_TaskDescription)
outapp->WriteUInt32(in->ReadUInt32()); // Duration
outapp->WriteUInt32(in->ReadUInt32()); // Unknown
uint32 StartTime = in->ReadUInt32();
outapp->WriteUInt32(time(NULL) - StartTime); // RoF has elapsed time here rather than starttime
outapp->WriteUInt32(time(nullptr) - StartTime); // RoF has elapsed time here rather than starttime
// Copy the rest of the packet verbatim
uint32 BytesLeftToCopy = in->size - in->GetReadPosition();
@@ -564,7 +564,7 @@ ENCODE(OP_OpenNewTasksWindow) {
structs::AvailableTaskTrailer_Struct* __eq_AvailableTaskTrailer;
EQApplicationPacket *in = *p;
*p = NULL;
*p = nullptr;
unsigned char *__emu_buffer = in->pBuffer;
@@ -847,7 +847,7 @@ ENCODE(OP_LeadershipExpUpdate) {
ENCODE(OP_PlayerProfile)
{
EQApplicationPacket *in = *p;
*p = NULL;
*p = nullptr;
unsigned char *__emu_buffer = in->pBuffer;
PlayerProfile_Struct *emu = (PlayerProfile_Struct *) __emu_buffer;
@@ -1631,7 +1631,7 @@ ENCODE(OP_NewZone) {
ENCODE(OP_Track)
{
EQApplicationPacket *in = *p;
*p = NULL;
*p = nullptr;
unsigned char *__emu_buffer = in->pBuffer;
Track_Struct *emu = (Track_Struct *) __emu_buffer;
@@ -1709,7 +1709,7 @@ ENCODE(OP_PetBuffWindow)
ENCODE(OP_Barter)
{
EQApplicationPacket *in = *p;
*p = NULL;
*p = nullptr;
char *Buffer = (char *)in->pBuffer;
@@ -1750,7 +1750,7 @@ ENCODE(OP_Barter)
ENCODE(OP_BazaarSearch)
{
EQApplicationPacket *in = *p;
*p = NULL;
*p = nullptr;
char *Buffer = (char *)in->pBuffer;
@@ -1807,7 +1807,7 @@ ENCODE(OP_ZoneSpawns)
{
//consume the packet
EQApplicationPacket *in = *p;
*p = NULL;
*p = nullptr;
//store away the emu struct
unsigned char *__emu_buffer = in->pBuffer;
@@ -2074,7 +2074,7 @@ ENCODE(OP_ZoneSpawns)
ENCODE(OP_MercenaryDataResponse) {
//consume the packet
EQApplicationPacket *in = *p;
*p = NULL;
*p = nullptr;
//store away the emu struct
unsigned char *__emu_buffer = in->pBuffer;
@@ -2138,7 +2138,7 @@ ENCODE(OP_MercenaryDataResponse) {
ENCODE(OP_MercenaryDataUpdate) {
//consume the packet
EQApplicationPacket *in = *p;
*p = NULL;
*p = nullptr;
//store away the emu struct
unsigned char *__emu_buffer = in->pBuffer;
@@ -2218,7 +2218,7 @@ ENCODE(OP_ItemLinkResponse) { ENCODE_FORWARD(OP_ItemPacket); }
ENCODE(OP_ItemPacket) {
//consume the packet
EQApplicationPacket *in = *p;
*p = NULL;
*p = nullptr;
unsigned char *__emu_buffer = in->pBuffer;
ItemPacket_Struct *old_item_pkt=(ItemPacket_Struct *)__emu_buffer;
@@ -2247,7 +2247,7 @@ ENCODE(OP_CharInventory) {
//consume the packet
EQApplicationPacket *in = *p;
*p = NULL;
*p = nullptr;
if(in->size == 0) {
@@ -2325,7 +2325,7 @@ ENCODE(OP_CharInventory) {
ENCODE(OP_GuildMemberList) {
//consume the packet
EQApplicationPacket *in = *p;
*p = NULL;
*p = nullptr;
//store away the emu struct
unsigned char *__emu_buffer = in->pBuffer;
@@ -2456,7 +2456,7 @@ ENCODE(OP_GroundSpawn)
// We are not encoding the spawn_id field here, but it doesn't appear to matter.
//
EQApplicationPacket *in = *p;
*p = NULL;
*p = nullptr;
Object_Struct *emu = (Object_Struct *) in->pBuffer;
@@ -2782,7 +2782,7 @@ ENCODE(OP_Buff) {
eq->bufffade = 2;
// Bit of a hack. OP_Buff appears to add/remove the buff while OP_BuffCreate adds/removes the actual buff icon
EQApplicationPacket *outapp = NULL;
EQApplicationPacket *outapp = nullptr;
if(eq->bufffade == 1)
{
outapp = new EQApplicationPacket(OP_BuffCreate, 29);
@@ -3086,7 +3086,7 @@ ENCODE(OP_AdventureMerchantSell) {
ENCODE(OP_RaidUpdate)
{
EQApplicationPacket *inapp = *p;
*p = NULL;
*p = nullptr;
unsigned char * __emu_buffer = inapp->pBuffer;
RaidGeneral_Struct *raid_gen = (RaidGeneral_Struct*)__emu_buffer;
@@ -3150,7 +3150,7 @@ ENCODE(OP_VetRewardsAvaliable)
unsigned char * __emu_buffer = inapp->pBuffer;
uint32 count = ((*p)->Size() / sizeof(InternalVeteranReward));
*p = NULL;
*p = nullptr;
EQApplicationPacket *outapp_create = new EQApplicationPacket(OP_VetRewardsAvaliable, (sizeof(structs::VeteranReward)*count));
uchar *old_data = __emu_buffer;
@@ -3181,7 +3181,7 @@ ENCODE(OP_VetRewardsAvaliable)
ENCODE(OP_WhoAllResponse)
{
EQApplicationPacket *in = *p;
*p = NULL;
*p = nullptr;
char *InBuffer = (char *)in->pBuffer;
@@ -3481,7 +3481,7 @@ ENCODE(OP_GroupUpdate)
ENCODE(OP_ChannelMessage)
{
EQApplicationPacket *in = *p;
*p = NULL;
*p = nullptr;
ChannelMessage_Struct *emu = (ChannelMessage_Struct *) in->pBuffer;
@@ -3517,7 +3517,7 @@ ENCODE(OP_ChannelMessage)
ENCODE(OP_GuildsList)
{
EQApplicationPacket *in = *p;
*p = NULL;
*p = nullptr;
uint32 NumberOfGuilds = in->size / 64;
@@ -3768,7 +3768,7 @@ ENCODE(OP_WearChange)
ENCODE(OP_SpawnAppearance)
{
EQApplicationPacket *in = *p;
*p = NULL;
*p = nullptr;
unsigned char *emu_buffer = in->pBuffer;
@@ -3872,7 +3872,7 @@ ENCODE(OP_AltCurrencySell)
ENCODE(OP_AltCurrency)
{
EQApplicationPacket *in = *p;
*p = NULL;
*p = nullptr;
unsigned char *emu_buffer = in->pBuffer;
uint32 opcode = *((uint32*)emu_buffer);
@@ -5307,7 +5307,7 @@ char* SerializeItem(const ItemInst *inst, int16 slot_id_in, uint32 *length, uint
for(int x = 0; x < 10; ++x) {
SubSerializations[x] = NULL;
SubSerializations[x] = nullptr;
const ItemInst* subitem = ((const ItemInst*)inst)->GetItem(x);
+5 -5
View File
@@ -18,7 +18,7 @@
#define FASTQUEUE(packet) dest->FastQueuePacket(&packet, ack_req);
#define TAKE(packet_name) \
EQApplicationPacket *packet_name = *p; \
*p = NULL;
*p = nullptr;
//simple buffer-to-buffer movement for fixed length packets
//the eq packet is mapped into `eq`, the emu packet into `emu`
@@ -29,7 +29,7 @@
//like a direct encode, but for variable length packets (two stage)
#define SETUP_VAR_ENCODE(emu_struct) \
EQApplicationPacket *__packet = *p; \
*p = NULL; \
*p = nullptr; \
unsigned char *__emu_buffer = __packet->pBuffer; \
emu_struct *emu = (emu_struct *) __emu_buffer; \
uint32 __i = 0; \
@@ -67,7 +67,7 @@
_log(NET__STRUCTS, "Wrong size on outbound %s (" #struct_ "): Got %d, expected %d", opcodes->EmuToName((*p)->GetOpcode()), (*p)->size, sizeof(struct_)); \
_hex(NET__STRUCT_HEX, (*p)->pBuffer, (*p)->size); \
delete *p; \
*p = NULL; \
*p = nullptr; \
return; \
}
#define ENCODE_LENGTH_ATLEAST(struct_) \
@@ -75,7 +75,7 @@
_log(NET__STRUCTS, "Wrong size on outbound %s (" #struct_ "): Got %d, expected at least %d", opcodes->EmuToName((*p)->GetOpcode()), (*p)->size, sizeof(struct_)); \
_hex(NET__STRUCT_HEX, (*p)->pBuffer, (*p)->size); \
delete *p; \
*p = NULL; \
*p = nullptr; \
return; \
}
@@ -87,7 +87,7 @@
#define EAT_ENCODE(op) \
ENCODE(op) { \
delete *p; \
*p = NULL; \
*p = nullptr; \
}
+19 -19
View File
@@ -18,14 +18,14 @@
namespace SoD {
static const char *name = "SoD";
static OpcodeManager *opcodes = NULL;
static OpcodeManager *opcodes = nullptr;
static Strategy struct_strategy;
char* SerializeItem(const ItemInst *inst, int16 slot_id, uint32 *length, uint8 depth);
void Register(EQStreamIdentifier &into) {
//create our opcode manager if we havent already
if(opcodes == NULL) {
if(opcodes == nullptr) {
//TODO: get this file name from the config file
string opfile = "patch_";
opfile += name;
@@ -69,7 +69,7 @@ void Reload() {
//opcode managers because we need to change the manager pointer, which means
//we need to go to every stream and replace it's manager.
if(opcodes != NULL) {
if(opcodes != nullptr) {
//TODO: get this file name from the config file
string opfile = "patch_";
opfile += name;
@@ -185,7 +185,7 @@ ENCODE(OP_OpenNewTasksWindow) {
structs::AvailableTaskTrailer_Struct* __eq_AvailableTaskTrailer;
EQApplicationPacket *in = *p;
*p = NULL;
*p = nullptr;
unsigned char *__emu_buffer = in->pBuffer;
@@ -749,7 +749,7 @@ ENCODE(OP_NewZone) {
ENCODE(OP_Track)
{
EQApplicationPacket *in = *p;
*p = NULL;
*p = nullptr;
unsigned char *__emu_buffer = in->pBuffer;
Track_Struct *emu = (Track_Struct *) __emu_buffer;
@@ -795,7 +795,7 @@ ENCODE(OP_Track)
ENCODE(OP_PetBuffWindow)
{
EQApplicationPacket *in = *p;
*p = NULL;
*p = nullptr;
unsigned char *__emu_buffer = in->pBuffer;
@@ -832,7 +832,7 @@ ENCODE(OP_PetBuffWindow)
ENCODE(OP_Barter)
{
EQApplicationPacket *in = *p;
*p = NULL;
*p = nullptr;
char *Buffer = (char *)in->pBuffer;
@@ -889,7 +889,7 @@ DECODE(OP_InspectRequest) {
ENCODE(OP_BazaarSearch)
{
EQApplicationPacket *in = *p;
*p = NULL;
*p = nullptr;
char *Buffer = (char *)in->pBuffer;
@@ -945,7 +945,7 @@ ENCODE(OP_ZoneEntry){ ENCODE_FORWARD(OP_ZoneSpawns); }
ENCODE(OP_ZoneSpawns) {
//consume the packet
EQApplicationPacket *in = *p;
*p = NULL;
*p = nullptr;
//store away the emu struct
unsigned char *__emu_buffer = in->pBuffer;
@@ -1261,7 +1261,7 @@ ENCODE(OP_ZoneSpawns) {
ENCODE(OP_MercenaryDataResponse) {
//consume the packet
EQApplicationPacket *in = *p;
*p = NULL;
*p = nullptr;
//store away the emu struct
unsigned char *__emu_buffer = in->pBuffer;
@@ -1328,7 +1328,7 @@ ENCODE(OP_MercenaryDataResponse) {
ENCODE(OP_MercenaryDataUpdate) {
//consume the packet
EQApplicationPacket *in = *p;
*p = NULL;
*p = nullptr;
//store away the emu struct
unsigned char *__emu_buffer = in->pBuffer;
@@ -1399,7 +1399,7 @@ ENCODE(OP_ItemLinkResponse) { ENCODE_FORWARD(OP_ItemPacket); }
ENCODE(OP_ItemPacket) {
//consume the packet
EQApplicationPacket *in = *p;
*p = NULL;
*p = nullptr;
unsigned char *__emu_buffer = in->pBuffer;
ItemPacket_Struct *old_item_pkt=(ItemPacket_Struct *)__emu_buffer;
@@ -1428,7 +1428,7 @@ ENCODE(OP_CharInventory) {
//consume the packet
EQApplicationPacket *in = *p;
*p = NULL;
*p = nullptr;
if(in->size == 0) {
@@ -1506,7 +1506,7 @@ ENCODE(OP_CharInventory) {
ENCODE(OP_GuildMemberList) {
//consume the packet
EQApplicationPacket *in = *p;
*p = NULL;
*p = nullptr;
//store away the emu struct
unsigned char *__emu_buffer = in->pBuffer;
@@ -1875,7 +1875,7 @@ ENCODE(OP_Trader) {
if((*p)->size != sizeof(TraderBuy_Struct)) {
EQApplicationPacket *in = *p;
*p = NULL;
*p = nullptr;
dest->FastQueuePacket(&in, ack_req);
return;
}
@@ -2033,7 +2033,7 @@ ENCODE(OP_AdventureMerchantSell) {
ENCODE(OP_RaidUpdate)
{
EQApplicationPacket *inapp = *p;
*p = NULL;
*p = nullptr;
unsigned char * __emu_buffer = inapp->pBuffer;
RaidGeneral_Struct *raid_gen = (RaidGeneral_Struct*)__emu_buffer;
@@ -2097,7 +2097,7 @@ ENCODE(OP_VetRewardsAvaliable)
unsigned char * __emu_buffer = inapp->pBuffer;
uint32 count = ((*p)->Size() / sizeof(InternalVeteranReward));
*p = NULL;
*p = nullptr;
EQApplicationPacket *outapp_create = new EQApplicationPacket(OP_VetRewardsAvaliable, (sizeof(structs::VeteranReward)*count));
uchar *old_data = __emu_buffer;
@@ -2128,7 +2128,7 @@ ENCODE(OP_VetRewardsAvaliable)
ENCODE(OP_WhoAllResponse)
{
EQApplicationPacket *in = *p;
*p = NULL;
*p = nullptr;
char *InBuffer = (char *)in->pBuffer;
@@ -3453,7 +3453,7 @@ char* SerializeItem(const ItemInst *inst, int16 slot_id_in, uint32 *length, uint
for(int x = 0; x < 10; ++x) {
SubSerializations[x] = NULL;
SubSerializations[x] = nullptr;
const ItemInst* subitem = ((const ItemInst*)inst)->GetItem(x);
+17 -17
View File
@@ -18,14 +18,14 @@
namespace SoF {
static const char *name = "SoF";
static OpcodeManager *opcodes = NULL;
static OpcodeManager *opcodes = nullptr;
static Strategy struct_strategy;
char* SerializeItem(const ItemInst *inst, int16 slot_id, uint32 *length, uint8 depth);
void Register(EQStreamIdentifier &into) {
//create our opcode manager if we havent already
if(opcodes == NULL) {
if(opcodes == nullptr) {
//TODO: get this file name from the config file
string opfile = "patch_";
opfile += name;
@@ -69,7 +69,7 @@ void Reload() {
//opcode managers because we need to change the manager pointer, which means
//we need to go to every stream and replace it's manager.
if(opcodes != NULL) {
if(opcodes != nullptr) {
//TODO: get this file name from the config file
string opfile = "patch_";
opfile += name;
@@ -185,7 +185,7 @@ ENCODE(OP_OpenNewTasksWindow) {
structs::AvailableTaskTrailer_Struct* __eq_AvailableTaskTrailer;
EQApplicationPacket *in = *p;
*p = NULL;
*p = nullptr;
unsigned char *__emu_buffer = in->pBuffer;
@@ -748,7 +748,7 @@ ENCODE(OP_NewZone) {
ENCODE(OP_Track)
{
EQApplicationPacket *in = *p;
*p = NULL;
*p = nullptr;
unsigned char *__emu_buffer = in->pBuffer;
Track_Struct *emu = (Track_Struct *) __emu_buffer;
@@ -783,7 +783,7 @@ ENCODE(OP_ZoneEntry){ ENCODE_FORWARD(OP_ZoneSpawns); }
ENCODE(OP_ZoneSpawns) {
//consume the packet
EQApplicationPacket *in = *p;
*p = NULL;
*p = nullptr;
//store away the emu struct
unsigned char *__emu_buffer = in->pBuffer;
@@ -903,7 +903,7 @@ ENCODE(OP_ZoneSpawns) {
uint32 ofs;
uint32 val;
uint8 rnd = rand() & 0x0F;
if (sep == NULL)
if (sep == nullptr)
{
ofs = 0;
if ((emu->lastName[2] < '0') || (emu->lastName[2] > '9'))
@@ -917,7 +917,7 @@ ENCODE(OP_ZoneSpawns) {
}
else
{
sep[0] = NULL;
sep[0] = nullptr;
ofs = atoi(&emu->lastName[2]);
sep[0] = '=';
if ((sep[1] < '0') || (sep[1] > '9'))
@@ -1012,7 +1012,7 @@ ENCODE(OP_ItemLinkResponse) { ENCODE_FORWARD(OP_ItemPacket); }
ENCODE(OP_ItemPacket) {
//consume the packet
EQApplicationPacket *in = *p;
*p = NULL;
*p = nullptr;
unsigned char *__emu_buffer = in->pBuffer;
ItemPacket_Struct *old_item_pkt=(ItemPacket_Struct *)__emu_buffer;
@@ -1041,7 +1041,7 @@ ENCODE(OP_CharInventory) {
//consume the packet
EQApplicationPacket *in = *p;
*p = NULL;
*p = nullptr;
if(in->size == 0) {
@@ -1119,7 +1119,7 @@ ENCODE(OP_CharInventory) {
ENCODE(OP_GuildMemberList) {
//consume the packet
EQApplicationPacket *in = *p;
*p = NULL;
*p = nullptr;
//store away the emu struct
unsigned char *__emu_buffer = in->pBuffer;
@@ -1460,14 +1460,14 @@ ENCODE(OP_BazaarSearch) {
if(((*p)->size == sizeof(BazaarReturnDone_Struct)) || ((*p)->size == sizeof(BazaarWelcome_Struct))) {
EQApplicationPacket *in = *p;
*p = NULL;
*p = nullptr;
dest->FastQueuePacket(&in, ack_req);
return;
}
//consume the packet
EQApplicationPacket *in = *p;
*p = NULL;
*p = nullptr;
//store away the emu struct
unsigned char *__emu_buffer = in->pBuffer;
@@ -1513,7 +1513,7 @@ ENCODE(OP_Trader) {
if((*p)->size != sizeof(TraderBuy_Struct)) {
EQApplicationPacket *in = *p;
*p = NULL;
*p = nullptr;
dest->FastQueuePacket(&in, ack_req);
return;
}
@@ -1671,7 +1671,7 @@ ENCODE(OP_AdventureMerchantSell) {
ENCODE(OP_RaidUpdate)
{
EQApplicationPacket *inapp = *p;
*p = NULL;
*p = nullptr;
unsigned char * __emu_buffer = inapp->pBuffer;
RaidGeneral_Struct *raid_gen = (RaidGeneral_Struct*)__emu_buffer;
@@ -1735,7 +1735,7 @@ ENCODE(OP_VetRewardsAvaliable)
unsigned char * __emu_buffer = inapp->pBuffer;
uint32 count = ((*p)->Size() / sizeof(InternalVeteranReward));
*p = NULL;
*p = nullptr;
EQApplicationPacket *outapp_create = new EQApplicationPacket(OP_VetRewardsAvaliable, (sizeof(structs::VeteranReward)*count));
uchar *old_data = __emu_buffer;
@@ -2772,7 +2772,7 @@ char* SerializeItem(const ItemInst *inst, int16 slot_id_in, uint32 *length, uint
for(int x = 0; x < 10; ++x) {
SubSerializations[x] = NULL;
SubSerializations[x] = nullptr;
const ItemInst* subitem = ((const ItemInst*)inst)->GetItem(x);
+17 -17
View File
@@ -16,14 +16,14 @@
namespace Titanium {
static const char *name = "Titanium";
static OpcodeManager *opcodes = NULL;
static OpcodeManager *opcodes = nullptr;
static Strategy struct_strategy;
char *SerializeItem(const ItemInst *inst, int16 slot_id, uint32 *length, uint8 depth);
void Register(EQStreamIdentifier &into) {
//create our opcode manager if we havent already
if(opcodes == NULL) {
if(opcodes == nullptr) {
//TODO: get this file name from the config file
string opfile = "patch_";
opfile += name;
@@ -67,7 +67,7 @@ void Reload() {
//opcode managers because we need to change the manager pointer, which means
//we need to go to every stream and replace it's manager.
if(opcodes != NULL) {
if(opcodes != nullptr) {
//TODO: get this file name from the config file
string opfile = "patch_";
opfile += name;
@@ -422,7 +422,7 @@ ENCODE(OP_Track)
{
EQApplicationPacket *in = *p;
*p = NULL;
*p = nullptr;
unsigned char *__emu_buffer = in->pBuffer;
Track_Struct *emu = (Track_Struct *) __emu_buffer;
@@ -457,7 +457,7 @@ ENCODE(OP_ZoneEntry){ ENCODE_FORWARD(OP_ZoneSpawns); }
ENCODE(OP_ZoneSpawns) {
//consume the packet
EQApplicationPacket *in = *p;
*p = NULL;
*p = nullptr;
//store away the emu struct
unsigned char *__emu_buffer = in->pBuffer;
@@ -594,7 +594,7 @@ ENCODE(OP_ItemLinkResponse) { ENCODE_FORWARD(OP_ItemPacket); }
ENCODE(OP_ItemPacket) {
//consume the packet
EQApplicationPacket *in = *p;
*p = NULL;
*p = nullptr;
//store away the emu struct
unsigned char *__emu_buffer = in->pBuffer;
@@ -624,7 +624,7 @@ ENCODE(OP_ItemPacket) {
ENCODE(OP_CharInventory) {
//consume the packet
EQApplicationPacket *in = *p;
*p = NULL;
*p = nullptr;
//store away the emu struct
unsigned char *__emu_buffer = in->pBuffer;
@@ -666,14 +666,14 @@ ENCODE(OP_BazaarSearch) {
if(((*p)->size == sizeof(BazaarReturnDone_Struct)) || ((*p)->size == sizeof(BazaarWelcome_Struct))) {
EQApplicationPacket *in = *p;
*p = NULL;
*p = nullptr;
dest->FastQueuePacket(&in, ack_req);
return;
}
//consume the packet
EQApplicationPacket *in = *p;
*p = NULL;
*p = nullptr;
//store away the emu struct
unsigned char *__emu_buffer = in->pBuffer;
@@ -719,7 +719,7 @@ ENCODE(OP_Trader) {
if((*p)->size != sizeof(TraderBuy_Struct)) {
EQApplicationPacket *in = *p;
*p = NULL;
*p = nullptr;
dest->FastQueuePacket(&in, ack_req);
return;
}
@@ -745,7 +745,7 @@ ENCODE(OP_TraderBuy) {
ENCODE(OP_GuildMemberList) {
//consume the packet
EQApplicationPacket *in = *p;
*p = NULL;
*p = nullptr;
//store away the emu struct
unsigned char *__emu_buffer = in->pBuffer;
@@ -839,7 +839,7 @@ ENCODE(OP_GuildMemberList) {
ENCODE(OP_ReadBook) {
EQApplicationPacket *in = *p;
*p = NULL;
*p = nullptr;
unsigned char *__emu_buffer = in->pBuffer;
@@ -898,7 +898,7 @@ ENCODE(OP_VetRewardsAvaliable)
unsigned char * __emu_buffer = inapp->pBuffer;
uint32 count = ((*p)->Size() / sizeof(InternalVeteranReward));
*p = NULL;
*p = nullptr;
EQApplicationPacket *outapp_create = new EQApplicationPacket(OP_VetRewardsAvaliable, (sizeof(structs::VeteranReward)*count));
uchar *old_data = __emu_buffer;
@@ -1212,7 +1212,7 @@ DECODE(OP_InspectAnswer) {
ENCODE(OP_LFGuild)
{
EQApplicationPacket *in = *p;
*p = NULL;
*p = nullptr;
uint32 Command = in->ReadUInt32();
@@ -1367,10 +1367,10 @@ DECODE(OP_LFGuild)
}
char *SerializeItem(const ItemInst *inst, int16 slot_id, uint32 *length, uint8 depth) {
char *serialization = NULL;
char *instance = NULL;
char *serialization = nullptr;
char *instance = nullptr;
const char *protection=(const char *)"\\\\\\\\\\";
char *sub_items[10] = { NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL };
char *sub_items[10] = { nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr };
bool stackable=inst->IsStackable();
uint32 merchant_slot=inst->GetMerchantSlot();
int16 charges=inst->GetCharges();
+24 -24
View File
@@ -19,14 +19,14 @@ namespace Underfoot
{
static const char *name = "Underfoot";
static OpcodeManager *opcodes = NULL;
static OpcodeManager *opcodes = nullptr;
static Strategy struct_strategy;
char* SerializeItem(const ItemInst *inst, int16 slot_id, uint32 *length, uint8 depth);
void Register(EQStreamIdentifier &into) {
//create our opcode manager if we havent already
if(opcodes == NULL) {
if(opcodes == nullptr) {
//TODO: get this file name from the config file
string opfile = "patch_";
opfile += name;
@@ -70,7 +70,7 @@ void Reload() {
//opcode managers because we need to change the manager pointer, which means
//we need to go to every stream and replace it's manager.
if(opcodes != NULL) {
if(opcodes != nullptr) {
//TODO: get this file name from the config file
string opfile = "patch_";
opfile += name;
@@ -186,7 +186,7 @@ ENCODE(OP_OpenNewTasksWindow) {
structs::AvailableTaskTrailer_Struct* __eq_AvailableTaskTrailer;
EQApplicationPacket *in = *p;
*p = NULL;
*p = nullptr;
unsigned char *__emu_buffer = in->pBuffer;
@@ -775,7 +775,7 @@ ENCODE(OP_NewZone) {
ENCODE(OP_Track)
{
EQApplicationPacket *in = *p;
*p = NULL;
*p = nullptr;
unsigned char *__emu_buffer = in->pBuffer;
Track_Struct *emu = (Track_Struct *) __emu_buffer;
@@ -821,7 +821,7 @@ ENCODE(OP_Track)
ENCODE(OP_PetBuffWindow)
{
EQApplicationPacket *in = *p;
*p = NULL;
*p = nullptr;
unsigned char *__emu_buffer = in->pBuffer;
@@ -860,7 +860,7 @@ ENCODE(OP_PetBuffWindow)
ENCODE(OP_Barter)
{
EQApplicationPacket *in = *p;
*p = NULL;
*p = nullptr;
char *Buffer = (char *)in->pBuffer;
@@ -901,7 +901,7 @@ ENCODE(OP_Barter)
ENCODE(OP_BazaarSearch)
{
EQApplicationPacket *in = *p;
*p = NULL;
*p = nullptr;
char *Buffer = (char *)in->pBuffer;
@@ -957,7 +957,7 @@ ENCODE(OP_ZoneEntry){ ENCODE_FORWARD(OP_ZoneSpawns); }
ENCODE(OP_ZoneSpawns) {
//consume the packet
EQApplicationPacket *in = *p;
*p = NULL;
*p = nullptr;
//store away the emu struct
unsigned char *__emu_buffer = in->pBuffer;
@@ -1272,7 +1272,7 @@ ENCODE(OP_ZoneSpawns) {
ENCODE(OP_MercenaryDataResponse) {
//consume the packet
EQApplicationPacket *in = *p;
*p = NULL;
*p = nullptr;
//store away the emu struct
unsigned char *__emu_buffer = in->pBuffer;
@@ -1335,7 +1335,7 @@ ENCODE(OP_MercenaryDataResponse) {
ENCODE(OP_MercenaryDataUpdate) {
//consume the packet
EQApplicationPacket *in = *p;
*p = NULL;
*p = nullptr;
//store away the emu struct
unsigned char *__emu_buffer = in->pBuffer;
@@ -1411,7 +1411,7 @@ ENCODE(OP_ItemLinkResponse) { ENCODE_FORWARD(OP_ItemPacket); }
ENCODE(OP_ItemPacket) {
//consume the packet
EQApplicationPacket *in = *p;
*p = NULL;
*p = nullptr;
unsigned char *__emu_buffer = in->pBuffer;
ItemPacket_Struct *old_item_pkt=(ItemPacket_Struct *)__emu_buffer;
@@ -1440,7 +1440,7 @@ ENCODE(OP_CharInventory) {
//consume the packet
EQApplicationPacket *in = *p;
*p = NULL;
*p = nullptr;
if(in->size == 0) {
@@ -1518,7 +1518,7 @@ ENCODE(OP_CharInventory) {
ENCODE(OP_GuildMemberList) {
//consume the packet
EQApplicationPacket *in = *p;
*p = NULL;
*p = nullptr;
//store away the emu struct
unsigned char *__emu_buffer = in->pBuffer;
@@ -1646,7 +1646,7 @@ ENCODE(OP_GroundSpawn)
// We are not encoding the spawn_id field here, or a size but it doesn't appear to matter.
//
EQApplicationPacket *in = *p;
*p = NULL;
*p = nullptr;
Object_Struct *emu = (Object_Struct *) in->pBuffer;
@@ -1935,7 +1935,7 @@ ENCODE(OP_Trader) {
if((*p)->size != sizeof(TraderBuy_Struct)) {
EQApplicationPacket *in = *p;
*p = NULL;
*p = nullptr;
dest->FastQueuePacket(&in, ack_req);
return;
}
@@ -2093,7 +2093,7 @@ ENCODE(OP_AdventureMerchantSell) {
ENCODE(OP_RaidUpdate)
{
EQApplicationPacket *inapp = *p;
*p = NULL;
*p = nullptr;
unsigned char * __emu_buffer = inapp->pBuffer;
RaidGeneral_Struct *raid_gen = (RaidGeneral_Struct*)__emu_buffer;
@@ -2157,7 +2157,7 @@ ENCODE(OP_VetRewardsAvaliable)
unsigned char * __emu_buffer = inapp->pBuffer;
uint32 count = ((*p)->Size() / sizeof(InternalVeteranReward));
*p = NULL;
*p = nullptr;
EQApplicationPacket *outapp_create = new EQApplicationPacket(OP_VetRewardsAvaliable, (sizeof(structs::VeteranReward)*count));
uchar *old_data = __emu_buffer;
@@ -2188,7 +2188,7 @@ ENCODE(OP_VetRewardsAvaliable)
ENCODE(OP_WhoAllResponse)
{
EQApplicationPacket *in = *p;
*p = NULL;
*p = nullptr;
char *InBuffer = (char *)in->pBuffer;
@@ -2438,7 +2438,7 @@ ENCODE(OP_GroupUpdate)
ENCODE(OP_ChannelMessage)
{
EQApplicationPacket *in = *p;
*p = NULL;
*p = nullptr;
ChannelMessage_Struct *emu = (ChannelMessage_Struct *) in->pBuffer;
@@ -2474,7 +2474,7 @@ ENCODE(OP_ChannelMessage)
ENCODE(OP_GuildsList)
{
EQApplicationPacket *in = *p;
*p = NULL;
*p = nullptr;
uint32 NumberOfGuilds = in->size / 64;
@@ -2742,7 +2742,7 @@ ENCODE(OP_WearChange)
ENCODE(OP_SpawnAppearance)
{
EQApplicationPacket *in = *p;
*p = NULL;
*p = nullptr;
unsigned char *emu_buffer = in->pBuffer;
@@ -2793,7 +2793,7 @@ ENCODE(OP_AltCurrencySell)
ENCODE(OP_AltCurrency)
{
EQApplicationPacket *in = *p;
*p = NULL;
*p = nullptr;
unsigned char *emu_buffer = in->pBuffer;
uint32 opcode = *((uint32*)emu_buffer);
@@ -3881,7 +3881,7 @@ char* SerializeItem(const ItemInst *inst, int16 slot_id_in, uint32 *length, uint
for(int x = 0; x < 10; ++x) {
SubSerializations[x] = NULL;
SubSerializations[x] = nullptr;
const ItemInst* subitem = ((const ItemInst*)inst)->GetItem(x);