DayZ 1.27
DayZ Explorer by KGB
 
Загрузка...
Поиск...
Не найдено

◆ OnStoreLoad()

bool BleedingSourcesManagerBase::OnStoreLoad ( ParamsReadContext ctx,
int version )
inlineprotected

См. определение в файле BleedingSourcesManagerServer.c строка 248

249 {
250 int active_bits;
251 if(!ctx.Read(active_bits))
252 {
253 return false;
254 }
255
256 int bit_offset = 0;
257 for(int i = 0; i < BIT_INT_SIZE; i++)
258 {
259 int bit = 1 << bit_offset;
260 if( (bit & active_bits) != 0 && CanAddBleedingSource(bit))
261 {
263 int active_time = 0;
264 if(!ctx.Read(active_time))
265 {
266 return false;
267 }
268 else
269 {
270 SetBleedingSourceActiveTime(bit,active_time);
271 }
272 if( version >= 121 )//type was added in this version
273 {
275 if (!ctx.Read(type))
276 {
277 return false;
278 }
279 else
280 {
281 SetBleedingSourceType(bit,type);
282 }
283 }
284 }
285 bit_offset++;
286 }
287 return true;
288 }
eBleedingSourceType
Определения BleedingSource.c:2
const int BIT_INT_SIZE
Определения BitArray.c:4
void AddBleedingSource(int bit)
Определения BleedingSourcesManagerBase.c:260
void SetBleedingSourceActiveTime(int bit, int time)
Определения BleedingSourcesManagerBase.c:284
bool CanAddBleedingSource(int bit)
Определения BleedingSourcesManagerBase.c:241
void SetBleedingSourceType(int bit, eBleedingSourceType type)
Определения BleedingSourcesManagerBase.c:292
proto bool Read(void value_in)

Перекрестные ссылки AddBleedingSource(), BIT_INT_SIZE, CanAddBleedingSource(), Serializer::Read(), SetBleedingSourceActiveTime() и SetBleedingSourceType().