Change lockout packet variable to signed

This commit is contained in:
hg 2020-06-30 20:53:05 -04:00
parent 70161aecc4
commit e99528fe73
15 changed files with 17 additions and 17 deletions

View File

@ -4896,7 +4896,7 @@ struct ExpeditionLockoutTimerEntry_Struct
{ {
/*000*/ char expedition_name[128]; // variable length, null terminated, max 0x80 (128) /*000*/ char expedition_name[128]; // variable length, null terminated, max 0x80 (128)
/*000*/ uint32 seconds_remaining; /*000*/ uint32 seconds_remaining;
/*000*/ uint32 event_type; // seen -1 (0xffffffff) for replay timers and 1 for event timers /*000*/ int32 event_type; // seen -1 (0xffffffff) for replay timers and 1 for event timers
/*000*/ char event_name[256]; // variable length, null terminated, max 0x100 (256) /*000*/ char event_name[256]; // variable length, null terminated, max 0x100 (256)
}; };

View File

@ -811,7 +811,7 @@ namespace RoF
{ {
buf.WriteString(emu->timers[i].expedition_name); buf.WriteString(emu->timers[i].expedition_name);
buf.WriteUInt32(emu->timers[i].seconds_remaining); buf.WriteUInt32(emu->timers[i].seconds_remaining);
buf.WriteUInt32(emu->timers[i].event_type); buf.WriteInt32(emu->timers[i].event_type);
buf.WriteString(emu->timers[i].event_name); buf.WriteString(emu->timers[i].event_name);
} }

View File

@ -860,7 +860,7 @@ namespace RoF2
{ {
buf.WriteString(emu->timers[i].expedition_name); buf.WriteString(emu->timers[i].expedition_name);
buf.WriteUInt32(emu->timers[i].seconds_remaining); buf.WriteUInt32(emu->timers[i].seconds_remaining);
buf.WriteUInt32(emu->timers[i].event_type); buf.WriteInt32(emu->timers[i].event_type);
buf.WriteString(emu->timers[i].event_name); buf.WriteString(emu->timers[i].event_name);
} }

View File

@ -4944,7 +4944,7 @@ struct ExpeditionLockoutTimerEntry_Struct
{ {
/*000*/ char expedition_name[1]; // variable length, null terminated, max 0x80 (128) /*000*/ char expedition_name[1]; // variable length, null terminated, max 0x80 (128)
/*000*/ uint32 seconds_remaining; /*000*/ uint32 seconds_remaining;
/*000*/ uint32 event_type; // seen -1 (0xffffffff) for replay timers and 1 for event timers /*000*/ int32 event_type; // seen -1 (0xffffffff) for replay timers and 1 for event timers
/*000*/ char event_name[1]; // variable length, null terminated, max 0x100 (256) /*000*/ char event_name[1]; // variable length, null terminated, max 0x100 (256)
}; };

View File

@ -4876,7 +4876,7 @@ struct ExpeditionLockoutTimerEntry_Struct
{ {
/*000*/ char expedition_name[1]; // variable length, null terminated, max 0x80 (128) /*000*/ char expedition_name[1]; // variable length, null terminated, max 0x80 (128)
/*000*/ uint32 seconds_remaining; /*000*/ uint32 seconds_remaining;
/*000*/ uint32 event_type; // seen -1 (0xffffffff) for replay timers and 1 for event timers /*000*/ int32 event_type; // seen -1 (0xffffffff) for replay timers and 1 for event timers
/*000*/ char event_name[1]; // variable length, null terminated, max 0x100 (256) /*000*/ char event_name[1]; // variable length, null terminated, max 0x100 (256)
}; };

View File

@ -584,7 +584,7 @@ namespace SoD
{ {
buf.WriteString(emu->timers[i].expedition_name); buf.WriteString(emu->timers[i].expedition_name);
buf.WriteUInt32(emu->timers[i].seconds_remaining); buf.WriteUInt32(emu->timers[i].seconds_remaining);
buf.WriteUInt32(emu->timers[i].event_type); buf.WriteInt32(emu->timers[i].event_type);
buf.WriteString(emu->timers[i].event_name); buf.WriteString(emu->timers[i].event_name);
} }

View File

@ -4231,7 +4231,7 @@ struct ExpeditionLockoutTimerEntry_Struct
{ {
/*000*/ char expedition_name[1]; // variable length, null terminated, max 0x80 (128) /*000*/ char expedition_name[1]; // variable length, null terminated, max 0x80 (128)
/*000*/ uint32 seconds_remaining; /*000*/ uint32 seconds_remaining;
/*000*/ uint32 event_type; // seen -1 (0xffffffff) for replay timers and 1 for event timers /*000*/ int32 event_type; // seen -1 (0xffffffff) for replay timers and 1 for event timers
/*000*/ char event_name[1]; // variable length, null terminated, max 0x100 (256) /*000*/ char event_name[1]; // variable length, null terminated, max 0x100 (256)
}; };

View File

@ -572,7 +572,7 @@ namespace SoF
{ {
buf.WriteString(emu->timers[i].expedition_name); buf.WriteString(emu->timers[i].expedition_name);
buf.WriteUInt32(emu->timers[i].seconds_remaining); buf.WriteUInt32(emu->timers[i].seconds_remaining);
buf.WriteUInt32(emu->timers[i].event_type); buf.WriteInt32(emu->timers[i].event_type);
buf.WriteString(emu->timers[i].event_name); buf.WriteString(emu->timers[i].event_name);
} }

View File

@ -4145,7 +4145,7 @@ struct ExpeditionLockoutTimerEntry_Struct
{ {
/*000*/ char expedition_name[1]; // variable length, null terminated, max 0x80 (128) /*000*/ char expedition_name[1]; // variable length, null terminated, max 0x80 (128)
/*000*/ uint32 seconds_remaining; /*000*/ uint32 seconds_remaining;
/*000*/ uint32 event_type; // seen -1 (0xffffffff) for replay timers and 1 for event timers /*000*/ int32 event_type; // seen -1 (0xffffffff) for replay timers and 1 for event timers
/*000*/ char event_name[1]; // variable length, null terminated, max 0x100 (256) /*000*/ char event_name[1]; // variable length, null terminated, max 0x100 (256)
}; };

View File

@ -515,7 +515,7 @@ namespace Titanium
{ {
buf.WriteString(emu->timers[i].expedition_name); buf.WriteString(emu->timers[i].expedition_name);
buf.WriteUInt32(emu->timers[i].seconds_remaining); buf.WriteUInt32(emu->timers[i].seconds_remaining);
buf.WriteUInt32(emu->timers[i].event_type); buf.WriteInt32(emu->timers[i].event_type);
buf.WriteString(emu->timers[i].event_name); buf.WriteString(emu->timers[i].event_name);
} }

View File

@ -3356,7 +3356,7 @@ struct ExpeditionLockoutTimerEntry_Struct
{ {
/*000*/ char expedition_name[1]; // variable length, null terminated, max 0x80 (128) /*000*/ char expedition_name[1]; // variable length, null terminated, max 0x80 (128)
/*000*/ uint32 seconds_remaining; /*000*/ uint32 seconds_remaining;
/*000*/ uint32 event_type; // seen -1 (0xffffffff) for replay timers and 1 for event timers /*000*/ int32 event_type; // seen -1 (0xffffffff) for replay timers and 1 for event timers
/*000*/ char event_name[1]; // variable length, null terminated, max 0x100 (256) /*000*/ char event_name[1]; // variable length, null terminated, max 0x100 (256)
}; };

View File

@ -714,7 +714,7 @@ namespace UF
{ {
buf.WriteString(emu->timers[i].expedition_name); buf.WriteString(emu->timers[i].expedition_name);
buf.WriteUInt32(emu->timers[i].seconds_remaining); buf.WriteUInt32(emu->timers[i].seconds_remaining);
buf.WriteUInt32(emu->timers[i].event_type); buf.WriteInt32(emu->timers[i].event_type);
buf.WriteString(emu->timers[i].event_name); buf.WriteString(emu->timers[i].event_name);
} }

View File

@ -4312,7 +4312,7 @@ struct ExpeditionLockoutTimerEntry_Struct
{ {
/*000*/ char expedition_name[1]; // variable length, null terminated, max 0x80 (128) /*000*/ char expedition_name[1]; // variable length, null terminated, max 0x80 (128)
/*000*/ uint32 seconds_remaining; /*000*/ uint32 seconds_remaining;
/*000*/ uint32 event_type; // seen -1 (0xffffffff) for replay timers and 1 for event timers /*000*/ int32 event_type; // seen -1 (0xffffffff) for replay timers and 1 for event timers
/*000*/ char event_name[1]; // variable length, null terminated, max 0x100 (256) /*000*/ char event_name[1]; // variable length, null terminated, max 0x100 (256)
}; };

View File

@ -43,8 +43,8 @@ const char* const DZADD_INVITE_WARNING = "Warning! You will be given repla
const char* const DZADD_INVITE_WARNING_TIMER = "%s - %sD:%sH:%sM"; const char* const DZADD_INVITE_WARNING_TIMER = "%s - %sD:%sH:%sM";
const char* const KICKPLAYERS_EVERYONE = "Everyone"; const char* const KICKPLAYERS_EVERYONE = "Everyone";
const uint32_t Expedition::REPLAY_TIMER_ID = std::numeric_limits<uint32_t>::max(); const int32_t Expedition::REPLAY_TIMER_ID = -1;
const uint32_t Expedition::EVENT_TIMER_ID = 1; const int32_t Expedition::EVENT_TIMER_ID = 1;
Expedition::Expedition( Expedition::Expedition(
uint32_t id, const std::string& uuid, const DynamicZone& dynamic_zone, std::string expedition_name, uint32_t id, const std::string& uuid, const DynamicZone& dynamic_zone, std::string expedition_name,

View File

@ -137,8 +137,8 @@ public:
void SetDzZoneInLocation(float x, float y, float z, float heading, bool update_db = false); void SetDzZoneInLocation(float x, float y, float z, float heading, bool update_db = false);
void SetDzDuration(uint32_t new_duration) { m_dynamiczone.SetUpdatedDuration(new_duration); } void SetDzDuration(uint32_t new_duration) { m_dynamiczone.SetUpdatedDuration(new_duration); }
static const uint32_t REPLAY_TIMER_ID; static const int32_t REPLAY_TIMER_ID;
static const uint32_t EVENT_TIMER_ID; static const int32_t EVENT_TIMER_ID;
private: private:
static void CacheExpeditions(MySQLRequestResult& results); static void CacheExpeditions(MySQLRequestResult& results);