MCPcopy Create free account
hub / github.com/OGSR/OGSR-Engine / STATE_Read

Method STATE_Read

ogsr_engine/COMMON_AI/xrServer_Objects_ALife_Monsters.cpp:175–238  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

173}
174
175void CSE_ALifeTraderAbstract::STATE_Read(NET_Packet& tNetPacket, u16 size)
176{
177 u16 m_wVersion = base()->m_wVersion;
178 if (m_wVersion > 19)
179 {
180 if (m_wVersion < 108)
181 {
182 R_ASSERT(!tNetPacket.r_u32());
183 }
184
185 if (m_wVersion < 36)
186 {
187 xr_vector<u16> temp;
188 load_data(temp, tNetPacket);
189 }
190
191 if (m_wVersion > 62)
192 tNetPacket.r_u32(m_dwMoney);
193
194 if ((m_wVersion > 75) && (m_wVersion < 98))
195 {
196 int tmp;
197 tNetPacket.r_s32(tmp);
198 if (tmp != -1)
199 m_SpecificCharacter = CSpecificCharacter::IndexToId(tmp);
200 else
201 m_SpecificCharacter = NULL;
202 }
203 else if (m_wVersion >= 98)
204 {
205 tNetPacket.r_stringZ(m_SpecificCharacter);
206 }
207
208 if (m_wVersion > 77)
209 m_trader_flags.assign(tNetPacket.r_u32());
210
211 if ((m_wVersion > 81) && (m_wVersion < 96))
212 {
213 int tmp;
214 tNetPacket.r_s32(tmp);
215 m_sCharacterProfile = CCharacterInfo::IndexToId(tmp);
216 VERIFY(xr_strlen(m_sCharacterProfile));
217 }
218 else if (m_wVersion > 95)
219 tNetPacket.r_stringZ(m_sCharacterProfile);
220
221 if (m_wVersion > 85)
222 tNetPacket.r_s32(m_community_index);
223 if (m_wVersion > 86)
224 {
225 tNetPacket.r_s32(m_rank);
226 tNetPacket.r_s32(m_reputation);
227 }
228
229 if (m_wVersion > 104)
230 {
231 load_data(m_character_name, tNetPacket);
232 }

Callers

nothing calls this directly

Calls 14

load_dataFunction · 0.85
IndexToIdFunction · 0.70
baseClass · 0.50
xr_strlenFunction · 0.50
r_u32Method · 0.45
r_s32Method · 0.45
r_stringZMethod · 0.45
assignMethod · 0.45
r_floatMethod · 0.45
r_u16Method · 0.45
r_u8Method · 0.45
rMethod · 0.45

Tested by

no test coverage detected