Skip to content

Commit 8973e7f

Browse files
committed
Attempt to fix Linux build
1 parent 28ac25e commit 8973e7f

File tree

1 file changed

+41
-6
lines changed

1 file changed

+41
-6
lines changed

src/game/Object/UnitEvents.h

+41-6
Original file line numberDiff line numberDiff line change
@@ -123,15 +123,29 @@ class ThreatRefStatusChangeEvent : public UnitBaseEvent
123123
*
124124
* @param pType The type of the event.
125125
*/
126-
ThreatRefStatusChangeEvent(uint32 pType) : UnitBaseEvent(pType), iHostileReference(nullptr), iFValue(0.0f), iIValue(0), iBValue(false), iThreatManager(nullptr) {}
126+
ThreatRefStatusChangeEvent(uint32 pType) : UnitBaseEvent(pType)
127+
{
128+
iHostileReference = nullptr;
129+
iFValue = 0.0f;
130+
iIValue = 0;
131+
iBValue = false;
132+
iThreatManager = nullptr;
133+
}
127134

128135
/**
129136
* @brief Constructor for ThreatRefStatusChangeEvent with a hostile reference.
130137
*
131138
* @param pType The type of the event.
132139
* @param pHostileReference The hostile reference associated with the event.
133140
*/
134-
ThreatRefStatusChangeEvent(uint32 pType, HostileReference* pHostileReference) : UnitBaseEvent(pType), iHostileReference(pHostileReference), iFValue(0.0f), iIValue(0), iBValue(false), iThreatManager(nullptr) {}
141+
ThreatRefStatusChangeEvent(uint32 pType, HostileReference* pHostileReference) : UnitBaseEvent(pType)
142+
{
143+
iHostileReference = pHostileReference;
144+
iFValue = 0.0f;
145+
iIValue = 0;
146+
iBValue = false;
147+
iThreatManager = nullptr;
148+
}
135149

136150
/**
137151
* @brief Constructor for ThreatRefStatusChangeEvent with a float value.
@@ -140,7 +154,14 @@ class ThreatRefStatusChangeEvent : public UnitBaseEvent
140154
* @param pHostileReference The hostile reference associated with the event.
141155
* @param pValue The float value associated with the event.
142156
*/
143-
ThreatRefStatusChangeEvent(uint32 pType, HostileReference* pHostileReference, float pValue) : UnitBaseEvent(pType), iHostileReference(pHostileReference), iFValue(pValue), iIValue(0), iBValue(false), iThreatManager(nullptr) {}
157+
ThreatRefStatusChangeEvent(uint32 pType, HostileReference* pHostileReference, float pValue) : UnitBaseEvent(pType)
158+
{
159+
iHostileReference = pHostileReference;
160+
iFValue = pValue;
161+
iIValue = 0;
162+
iBValue = false;
163+
iThreatManager = nullptr;
164+
}
144165

145166
/**
146167
* @brief Constructor for ThreatRefStatusChangeEvent with a boolean value.
@@ -149,7 +170,14 @@ class ThreatRefStatusChangeEvent : public UnitBaseEvent
149170
* @param pHostileReference The hostile reference associated with the event.
150171
* @param pValue The boolean value associated with the event.
151172
*/
152-
ThreatRefStatusChangeEvent(uint32 pType, HostileReference* pHostileReference, bool pValue) : UnitBaseEvent(pType), iHostileReference(pHostileReference), iFValue(0.0f), iIValue(0), iBValue(pValue), iThreatManager(nullptr) {}
173+
ThreatRefStatusChangeEvent(uint32 pType, HostileReference* pHostileReference, bool pValue) : UnitBaseEvent(pType)
174+
{
175+
iHostileReference = pHostileReference;
176+
iFValue = 0.0f;
177+
iIValue = 0;
178+
iBValue = pValue;
179+
iThreatManager = nullptr;
180+
}
153181

154182
/**
155183
* @brief Gets the integer value associated with the event.
@@ -214,15 +242,22 @@ class ThreatManagerEvent : public ThreatRefStatusChangeEvent
214242
*
215243
* @param pType The type of the event.
216244
*/
217-
ThreatManagerEvent(uint32 pType) : ThreatRefStatusChangeEvent(pType), iThreatContainer(nullptr) {}
245+
ThreatManagerEvent(uint32 pType) : ThreatRefStatusChangeEvent(pType)
246+
{
247+
iThreatContainer = nullptr;
248+
}
218249

219250
/**
220251
* @brief Constructor for ThreatManagerEvent with a hostile reference.
221252
*
222253
* @param pType The type of the event.
223254
* @param pHostileReference The hostile reference associated with the event.
224255
*/
225-
ThreatManagerEvent(uint32 pType, HostileReference* pHostileReference) : ThreatRefStatusChangeEvent(pType, pHostileReference), iThreatContainer(nullptr) {}
256+
ThreatManagerEvent(uint32 pType, HostileReference* pHostileReference) : ThreatRefStatusChangeEvent(pType, pHostileReference)
257+
{
258+
iThreatContainer = nullptr;
259+
}
260+
226261

227262
/**
228263
* @brief Sets the threat container associated with the event.

0 commit comments

Comments
 (0)