mirror of
https://github.com/EQEmu/Server.git
synced 2026-05-31 13:16:39 +00:00
NULL to nullptr
This commit is contained in:
+27
-27
@@ -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);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user