From e99528fe732ccd12d9ed3c0a3a315ad6c095fb25 Mon Sep 17 00:00:00 2001 From: hg <4683435+hgtw@users.noreply.github.com> Date: Tue, 30 Jun 2020 20:53:05 -0400 Subject: [PATCH] Change lockout packet variable to signed --- common/eq_packet_structs.h | 2 +- common/patches/rof.cpp | 2 +- common/patches/rof2.cpp | 2 +- common/patches/rof2_structs.h | 2 +- common/patches/rof_structs.h | 2 +- common/patches/sod.cpp | 2 +- common/patches/sod_structs.h | 2 +- common/patches/sof.cpp | 2 +- common/patches/sof_structs.h | 2 +- common/patches/titanium.cpp | 2 +- common/patches/titanium_structs.h | 2 +- common/patches/uf.cpp | 2 +- common/patches/uf_structs.h | 2 +- zone/expedition.cpp | 4 ++-- zone/expedition.h | 4 ++-- 15 files changed, 17 insertions(+), 17 deletions(-) diff --git a/common/eq_packet_structs.h b/common/eq_packet_structs.h index da589abbf..22be26b1d 100644 --- a/common/eq_packet_structs.h +++ b/common/eq_packet_structs.h @@ -4896,7 +4896,7 @@ struct ExpeditionLockoutTimerEntry_Struct { /*000*/ char expedition_name[128]; // variable length, null terminated, max 0x80 (128) /*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) }; diff --git a/common/patches/rof.cpp b/common/patches/rof.cpp index 6d7d0021b..3549a0c2c 100644 --- a/common/patches/rof.cpp +++ b/common/patches/rof.cpp @@ -811,7 +811,7 @@ namespace RoF { buf.WriteString(emu->timers[i].expedition_name); 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); } diff --git a/common/patches/rof2.cpp b/common/patches/rof2.cpp index 671d539ed..bc53369ae 100644 --- a/common/patches/rof2.cpp +++ b/common/patches/rof2.cpp @@ -860,7 +860,7 @@ namespace RoF2 { buf.WriteString(emu->timers[i].expedition_name); 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); } diff --git a/common/patches/rof2_structs.h b/common/patches/rof2_structs.h index 5e2b99ba2..b1be0c00a 100644 --- a/common/patches/rof2_structs.h +++ b/common/patches/rof2_structs.h @@ -4944,7 +4944,7 @@ struct ExpeditionLockoutTimerEntry_Struct { /*000*/ char expedition_name[1]; // variable length, null terminated, max 0x80 (128) /*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) }; diff --git a/common/patches/rof_structs.h b/common/patches/rof_structs.h index e99a6b96a..6fa44177e 100644 --- a/common/patches/rof_structs.h +++ b/common/patches/rof_structs.h @@ -4876,7 +4876,7 @@ struct ExpeditionLockoutTimerEntry_Struct { /*000*/ char expedition_name[1]; // variable length, null terminated, max 0x80 (128) /*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) }; diff --git a/common/patches/sod.cpp b/common/patches/sod.cpp index e84641919..1857cd731 100644 --- a/common/patches/sod.cpp +++ b/common/patches/sod.cpp @@ -584,7 +584,7 @@ namespace SoD { buf.WriteString(emu->timers[i].expedition_name); 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); } diff --git a/common/patches/sod_structs.h b/common/patches/sod_structs.h index f31ee6792..514722cb1 100644 --- a/common/patches/sod_structs.h +++ b/common/patches/sod_structs.h @@ -4231,7 +4231,7 @@ struct ExpeditionLockoutTimerEntry_Struct { /*000*/ char expedition_name[1]; // variable length, null terminated, max 0x80 (128) /*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) }; diff --git a/common/patches/sof.cpp b/common/patches/sof.cpp index ccb1fd19e..ddef71c4c 100644 --- a/common/patches/sof.cpp +++ b/common/patches/sof.cpp @@ -572,7 +572,7 @@ namespace SoF { buf.WriteString(emu->timers[i].expedition_name); 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); } diff --git a/common/patches/sof_structs.h b/common/patches/sof_structs.h index fac58e554..7755e767f 100644 --- a/common/patches/sof_structs.h +++ b/common/patches/sof_structs.h @@ -4145,7 +4145,7 @@ struct ExpeditionLockoutTimerEntry_Struct { /*000*/ char expedition_name[1]; // variable length, null terminated, max 0x80 (128) /*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) }; diff --git a/common/patches/titanium.cpp b/common/patches/titanium.cpp index 5b97f7110..04fd10d9c 100644 --- a/common/patches/titanium.cpp +++ b/common/patches/titanium.cpp @@ -515,7 +515,7 @@ namespace Titanium { buf.WriteString(emu->timers[i].expedition_name); 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); } diff --git a/common/patches/titanium_structs.h b/common/patches/titanium_structs.h index ba5bb6ab5..092c3d2a3 100644 --- a/common/patches/titanium_structs.h +++ b/common/patches/titanium_structs.h @@ -3356,7 +3356,7 @@ struct ExpeditionLockoutTimerEntry_Struct { /*000*/ char expedition_name[1]; // variable length, null terminated, max 0x80 (128) /*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) }; diff --git a/common/patches/uf.cpp b/common/patches/uf.cpp index fa3000346..599272ad4 100644 --- a/common/patches/uf.cpp +++ b/common/patches/uf.cpp @@ -714,7 +714,7 @@ namespace UF { buf.WriteString(emu->timers[i].expedition_name); 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); } diff --git a/common/patches/uf_structs.h b/common/patches/uf_structs.h index 7a8eab757..70c1c6cd1 100644 --- a/common/patches/uf_structs.h +++ b/common/patches/uf_structs.h @@ -4312,7 +4312,7 @@ struct ExpeditionLockoutTimerEntry_Struct { /*000*/ char expedition_name[1]; // variable length, null terminated, max 0x80 (128) /*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) }; diff --git a/zone/expedition.cpp b/zone/expedition.cpp index eaa90c382..cb9ab6d0e 100644 --- a/zone/expedition.cpp +++ b/zone/expedition.cpp @@ -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 KICKPLAYERS_EVERYONE = "Everyone"; -const uint32_t Expedition::REPLAY_TIMER_ID = std::numeric_limits::max(); -const uint32_t Expedition::EVENT_TIMER_ID = 1; +const int32_t Expedition::REPLAY_TIMER_ID = -1; +const int32_t Expedition::EVENT_TIMER_ID = 1; Expedition::Expedition( uint32_t id, const std::string& uuid, const DynamicZone& dynamic_zone, std::string expedition_name, diff --git a/zone/expedition.h b/zone/expedition.h index 5e9d4c28f..fbaebcb46 100644 --- a/zone/expedition.h +++ b/zone/expedition.h @@ -137,8 +137,8 @@ public: 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); } - static const uint32_t REPLAY_TIMER_ID; - static const uint32_t EVENT_TIMER_ID; + static const int32_t REPLAY_TIMER_ID; + static const int32_t EVENT_TIMER_ID; private: static void CacheExpeditions(MySQLRequestResult& results);