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

InventoryLocation. Подробнее...

Закрытые члены

proto native bool IsValid ()
 verify current set inventory location
 
proto native int GetType ()
 returns type of InventoryLocation
 
proto native EntityAI GetParent ()
 returns parent of current inventory location
 
proto native EntityAI GetItem ()
 returns item of current inventory location
 
proto native int GetSlot ()
 returns slot id if current type is Attachment
 
proto native int GetIdx ()
 returns index of cargo if current type is Cargo / ProxyCargo
 
proto native int GetRow ()
 returns row of cargo if current type is Cargo / ProxyCargo
 
proto native int GetCol ()
 returns column of cargo if current type is Cargo / ProxyCargo
 
proto native bool GetFlip ()
 returns flip status of cargo
 
proto native vector GetPos ()
 returns position of item in world if type is Ground
 
proto native void GetDir (out float dir[4])
 returns direction of item in world if type is Ground
 
proto native void SetGround (EntityAI e, vector mat[4])
 sets current inventory location type to Ground with transformation mat
 
proto native void SetGroundEx (EntityAI e, vector pos, float dir[4])
 sets current inventory location type to Ground with transformation mat
 
proto native void SetAttachment (notnull EntityAI parent, EntityAI e, int slotId)
 sets current inventory location type to Attachment with slot id set to <slotId>
 
proto native void SetCargoAuto (notnull CargoBase cargo, EntityAI e, int row, int col, bool flip)
 based on Cargo.IsProxyCargo uses SetProxyCargo or SetCargo respectively
 
proto native void SetCargo (notnull EntityAI parent, EntityAI e, int idx, int row, int col, bool flip)
 sets current inventory location type to Cargo with coordinates (idx, row, col)
 
proto native void SetProxyCargo (notnull EntityAI parent, EntityAI e, int idx, int row, int col, bool flip)
 sets current inventory location type to ProxyCargo with coordinates (idx, row, col) @NOTE: typical usage is in building-like dummy structures, where furniture with cargo is part of the model, and is not a physical entity (like person or bag).
 
proto native void SetHands (notnull EntityAI parent, EntityAI e)
 sets current inventory location type to Hands
 
proto native void SetVehicle (notnull EntityAI parent, EntityAI e, int idx)
 
proto native void SetParent (notnull EntityAI parent)
 
proto native void SetItem (notnull EntityAI item)
 
proto native void SetSlot (int slotId)
 
proto native void SetIndex (int idx)
 
proto native void SetRow (int row)
 
proto native void SetCol (int col)
 
proto native void SetFlip (bool flip)
 
proto native void Reset ()
 
proto native bool CompareLocationOnly (notnull InventoryLocation other)
 
proto native bool CollidesWith (notnull InventoryLocation rhs)
 checks if inventory locations collides each with other
 
proto native InventoryLocation Copy (notnull InventoryLocation rhs)
 copies location data to another location
 
proto native InventoryLocation CopyLocationFrom (notnull InventoryLocation rhs, bool copyFlip)
 copies location to another location without m_item member
 
string DumpToString ()
 
bool ReadFromContext (ParamsReadContext ctx)
 
bool WriteToContext (ParamsWriteContext ctx)
 

Закрытые статические члены

static string DumpToStringNullSafe (InventoryLocation loc)
 

Подробное описание

Методы

◆ CollidesWith()

CollidesWith ( notnull InventoryLocation rhs)
private

checks if inventory locations collides each with other

◆ CompareLocationOnly()

proto native bool CompareLocationOnly ( notnull InventoryLocation other)
private

◆ Copy()

Copy ( notnull InventoryLocation rhs)
private

copies location data to another location

@NOTE it copies all data (except enforce internal data)

Используется в InventoryItem::EEItemLocationChanged().

◆ CopyLocationFrom()

CopyLocationFrom ( notnull InventoryLocation rhs,
bool copyFlip )
private

copies location to another location without m_item member

@NOTE it does NOT do a copy of m_item member!

◆ DumpToString()

string DumpToString ( )
inlineprivate
234 {
235 string res = "{ type=" + typename.EnumToString(InventoryLocationType, GetType());
236 switch (GetType())
237 {
238 case InventoryLocationType.UNKNOWN:
239 {
240 break;
241 }
242 case InventoryLocationType.GROUND:
243 {
244 res = res + " item=" + Object.GetDebugName(GetItem());
245 vector pos = GetPos();
246 float dir[4];
247 GetDir(dir);
248 res = res + " pos=(" + pos[0] + ", " + pos[1] + ", " + pos[2] + ")";
249 res = res + " dir=(" + dir[0] + ", " + dir[1] + ", " + dir[2] + ", " + dir[3] + ")";
250 break;
251 }
252 case InventoryLocationType.ATTACHMENT:
253 {
254 res = res + " item=" + Object.GetDebugName(GetItem());
255 res = res + " parent=" + Object.GetDebugName(GetParent());
256 res = res + " slot=" + GetSlot();
257 break;
258 }
259 case InventoryLocationType.CARGO:
260 {
261 res = res + " item=" + Object.GetDebugName(GetItem());
262 res = res + " parent=" + Object.GetDebugName(GetParent());
263 res = res + " idx=" + GetIdx() + " row=" + GetRow() + " col=" + GetCol() + " f=" + GetFlip();
264 break;
265 }
266 case InventoryLocationType.HANDS:
267 {
268 res = res + " item=" + Object.GetDebugName(GetItem());
269 res = res + " parent=" + Object.GetDebugName(GetParent());
270 break;
271 }
272 case InventoryLocationType.PROXYCARGO:
273 {
274 res = res + " item=" + Object.GetDebugName(GetItem());
275 res = res + " parent=" + Object.GetDebugName(GetParent());
276 res = res + " idx=" + GetIdx() + " row=" + GetRow() + " col=" + GetCol() + " f=" + GetFlip();
277 break;
278 }
279 case InventoryLocationType.VEHICLE:
280 {
281 res = res + " item=" + Object.GetDebugName(GetItem());
282 res = res + " parent=" + Object.GetDebugName(GetParent());
283 res = res + " idx=" + GetIdx();
284 break;
285 }
286 default:
287 {
288 res = res + "??";
289 break;
290 }
291 }
292 res = res + " }";
293 return res;
294 }
InventoryLocationType
types of Inventory Location
Definition InventoryLocation.c:4
proto native int GetType()
returns type of InventoryLocation
proto native vector GetPos()
returns position of item in world if type is Ground
proto native int GetCol()
returns column of cargo if current type is Cargo / ProxyCargo
proto native int GetRow()
returns row of cargo if current type is Cargo / ProxyCargo
proto native int GetIdx()
returns index of cargo if current type is Cargo / ProxyCargo
proto native EntityAI GetParent()
returns parent of current inventory location
proto native void GetDir(out float dir[4])
returns direction of item in world if type is Ground
proto native EntityAI GetItem()
returns item of current inventory location
proto native bool GetFlip()
returns flip status of cargo
proto native int GetSlot()
returns slot id if current type is Attachment
Definition ObjectTyped.c:2
Definition EntityAI.c:95
Definition EnConvert.c:106

Перекрестные ссылки GetCol(), GetDir(), GetFlip(), GetIdx(), GetItem(), GetParent(), GetPos(), GetRow(), GetSlot() и GetType().

◆ DumpToStringNullSafe()

static string DumpToStringNullSafe ( InventoryLocation loc)
inlinestaticprivate
227 {
228 if (loc)
229 return loc.DumpToString();
230 return "{ null }";
231 }

Используется в CGame::AddInventoryJunctureEx(), GameInventory::AddInventoryReservationEx(), HandEventBase::CheckRequestSrc(), GameInventory::ClearInventoryReservationEx(), ManBase::CreateCopyOfItemInInventory(), DumpToString(), HandEventBase::DumpToString(), ReplaceItemWithNewLambdaBase::Execute(), GameInventory::ExtendInventoryReservationEx(), HumanInventory::ForceSwapEntities(), ForceSwapEntities(), HandGuardBase::GuardCondition(), HandleForceSwapEntities(), HandleSwapEntities(), HandleTakeToDst(), HumanInventory::OnEntityInHandsCreated(), HumanInventory::OnEntityInHandsDestroyed(), WeaponStateBase::OnEntry(), ActionDigInStash::OnFinishProgressServer(), ManBase::OnQuickBarSingleUse(), GameInventory::OnServerInventoryCommandStatic(), ReplaceItemWithNewLambdaBase::RemoveOldItemFromLocation(), SelectAnimationOfForceSwapInHands(), InventoryInputUserData::SendInputUserDataDestroy(), InventoryInputUserData::SendInputUserDataMove(), InventoryInputUserData::SendInputUserDataSwap(), SendServerHandEventViaJuncture(), InventoryInputUserData::SendServerMove(), InventoryInputUserData::SendServerSwap(), ActionBase::SetupAction(), HumanInventory::SwapEntities(), HumanInventory::TakeToDst(), TakeToDst(), EntityAI::TakeToDstImpl(), TryAcquireInventoryJunctureFromServer(), TryAcquireTwoInventoryJuncturesFromServer(), ReplaceItemWithNewLambdaBase::UndoRemoveOldItemFromLocation(), ValidateDestroy(), ValidateSwap() и ValidateSyncMove().

◆ GetCol()

GetCol ( )
private

returns column of cargo if current type is Cargo / ProxyCargo

Возвращает
index or -1

Используется в DumpToString() и WriteToContext().

◆ GetDir()

GetDir ( out float dir[4])
private

returns direction of item in world if type is Ground

Возвращает
position

Используется в DumpToString() и WriteToContext().

◆ GetFlip()

GetFlip ( )
private

returns flip status of cargo

Возвращает
true/false

Используется в DumpToString() и WriteToContext().

◆ GetIdx()

GetIdx ( )
private

returns index of cargo if current type is Cargo / ProxyCargo

Возвращает
index or -1

Используется в DumpToString() и WriteToContext().

◆ GetItem()

GetItem ( )
private

returns item of current inventory location

Item can be null if and only if this is a query for location of item that is about to be created (new spawn).

Возвращает
item

Используется в DumpToString() и WriteToContext().

◆ GetParent()

GetParent ( )
private

returns parent of current inventory location

Parent entity can be null if item is on ground.

Возвращает
parent entity, null otherwise

Используется в DumpToString() и WriteToContext().

◆ GetPos()

GetPos ( )
private

returns position of item in world if type is Ground

Возвращает
position

Используется в DumpToString() и WriteToContext().

◆ GetRow()

GetRow ( )
private

returns row of cargo if current type is Cargo / ProxyCargo

Возвращает
row or -1

Используется в DumpToString() и WriteToContext().

◆ GetSlot()

GetSlot ( )
private

returns slot id if current type is Attachment

@NOTE: slot id is related to order of entries in DZ/data/config.cpp secton CfgSlots

Возвращает
slot id if attachment, -1 otherwise

Используется в DumpToString() и WriteToContext().

◆ GetType()

GetType ( )
private

returns type of InventoryLocation

См. также
InventoryLocationType for known types of inventory locations

Используется в DumpToString() и WriteToContext().

◆ IsValid()

IsValid ( )
private

verify current set inventory location

Возвращает
true if valid, false otherwise

◆ ReadFromContext()

bool ReadFromContext ( ParamsReadContext ctx)
inlineprivate
297 {
298 EntityAI parent;
300 int type = 0;
301 int idx = -1;
302 int row = -1;
303 int col = -1;
304 bool flp = false;
305 if (!ctx.Read(type))
306 return false;
307
308 switch (type)
309 {
310 case InventoryLocationType.UNKNOWN:
311 {
312 break;
313 }
314 case InventoryLocationType.GROUND:
315 {
316 if (!ctx.Read(item))
317 return false;
318 vector pos;
319 if (!ctx.Read(pos))
320 return false;
321
322 float dir[4];
323 if (!ctx.Read(dir))
324 return false;
325
326 if (!item)
327 {
328#ifdef ENABLE_LOGGING
329#ifdef SERVER
330 Debug.Log(string.Format("Item=%1 does not exist on server!", Object.GetDebugName(item)), "GROUND" , "n/a", "ReadFromContext", this.ToString() );
331#endif
332#endif
333 break; // parent or item is possibly not spawned in bubble yet
334 }
335
336 SetGroundEx(item, pos, dir);
337 break;
338 }
339 case InventoryLocationType.ATTACHMENT:
340 {
341 if (!ctx.Read(parent))
342 return false;
343 if (!ctx.Read(item))
344 return false;
345 int slot;
346 if (!ctx.Read(slot))
347 return false;
348
349 if (!parent || !item)
350 {
351#ifdef ENABLE_LOGGING
352#ifdef SERVER
353 Debug.Log(string.Format("Parent=%1 or Item=%2 does not exist on server!", Object.GetDebugName(parent), Object.GetDebugName(item)), "ATTACHMENT" , "n/a", "ReadFromContext", this.ToString() );
354#endif
355#endif
356 break; // parent or item is possibly not spawned in bubble yet
357 }
358
359 SetAttachment(parent, item, slot);
360 break;
361 }
362 case InventoryLocationType.CARGO:
363 {
364 if (!ctx.Read(parent))
365 return false;
366 if (!ctx.Read(item))
367 return false;
368 if (!ctx.Read(idx))
369 return false;
370 if (!ctx.Read(row))
371 return false;
372 if (!ctx.Read(col))
373 return false;
374 if (!ctx.Read(flp))
375 return false;
376
377 if (!parent || !item)
378 {
379#ifdef ENABLE_LOGGING
380#ifdef SERVER
381 Debug.Log(string.Format("Parent=%1 or Item=%2 does not exist on server!", Object.GetDebugName(parent), Object.GetDebugName(item)), "CARGO" , "n/a", "ReadFromContext", this.ToString() );
382#endif
383#endif
384 break; // parent or item is possibly not spawned in bubble yet
385 }
386
387 SetCargo(parent, item, idx, row, col, flp);
388 break;
389 }
390 case InventoryLocationType.HANDS:
391 {
392 if (!ctx.Read(parent))
393 return false;
394 if (!ctx.Read(item))
395 return false;
396
397 if (!parent || !item)
398 {
399#ifdef ENABLE_LOGGING
400#ifdef SERVER
401 Debug.Log(string.Format("Parent=%1 or Item=%2 does not exist on server!", Object.GetDebugName(parent), Object.GetDebugName(item)), "HANDS" , "n/a", "ReadFromContext", this.ToString() );
402#endif
403#endif
404 break; // parent or item is possibly not spawned in bubble yet
405 }
406
407 SetHands(parent, item);
408 break;
409 }
410 case InventoryLocationType.PROXYCARGO:
411 {
412 if (!ctx.Read(parent))
413 return false;
414 if (!ctx.Read(item))
415 return false;
416 if (!ctx.Read(idx))
417 return false;
418 if (!ctx.Read(row))
419 return false;
420 if (!ctx.Read(col))
421 return false;
422 if (!ctx.Read(flp))
423 return false;
424
425 if (!parent || !item)
426 {
427#ifdef ENABLE_LOGGING
428#ifdef SERVER
429 Debug.Log(string.Format("Parent=%1 or Item=%2 does not exist on server!", Object.GetDebugName(parent), Object.GetDebugName(item)), "PROXYCARGO" , "n/a", "ReadFromContext", this.ToString() );
430#endif
431#endif
432 break; // parent or item is possibly not spawned in bubble yet
433 }
434
435 SetProxyCargo(parent, item, idx, row, col, flp);
436 break;
437 }
438 case InventoryLocationType.VEHICLE:
439 {
440 if (!ctx.Read(parent))
441 return false;
442 if (!ctx.Read(item))
443 return false;
444 if (!ctx.Read(idx))
445 return false;
446
447 if (!parent || !item)
448 {
449#ifdef ENABLE_LOGGING
450#ifdef SERVER
451 Debug.Log(string.Format("Parent=%1 or Item=%2 does not exist on server!", Object.GetDebugName(parent), Object.GetDebugName(item)), "VEHICLE" , "n/a", "ReadFromContext", this.ToString() );
452#endif
453#endif
454 break; // parent or item is possibly not spawned in bubble yet
455 }
456
457 SetVehicle(parent, item, idx);
458 break;
459 }
460 default:
461 {
462 ErrorEx("ReadFromContext - really unknown location type, this should not happen, type=" + type);
463 return false;
464 }
465 }
466 return true;
467 }
Definition Debug.c:14
static void Log(string message=LOG_DEFAULT, string plugin=LOG_DEFAULT, string author=LOG_DEFAULT, string label=LOG_DEFAULT, string entity=LOG_DEFAULT)
Prints debug message with normal prio.
Definition Debug.c:136
Definition Building.c:6
proto native void SetGroundEx(EntityAI e, vector pos, float dir[4])
sets current inventory location type to Ground with transformation mat
proto native void SetCargo(notnull EntityAI parent, EntityAI e, int idx, int row, int col, bool flip)
sets current inventory location type to Cargo with coordinates (idx, row, col)
proto native void SetVehicle(notnull EntityAI parent, EntityAI e, int idx)
proto native void SetProxyCargo(notnull EntityAI parent, EntityAI e, int idx, int row, int col, bool flip)
sets current inventory location type to ProxyCargo with coordinates (idx, row, col) @NOTE: typical us...
proto native void SetHands(notnull EntityAI parent, EntityAI e)
sets current inventory location type to Hands
proto native void SetAttachment(notnull EntityAI parent, EntityAI e, int slotId)
sets current inventory location type to Attachment with slot id set to <slotId>
enum ShapeType ErrorEx

Перекрестные ссылки ErrorEx, Debug::Log(), SetAttachment(), SetCargo(), SetGroundEx(), SetHands(), SetProxyCargo() и SetVehicle().

Используется в HandEventRemove::ReadFromContext().

◆ Reset()

Reset ( )
private

◆ SetAttachment()

SetAttachment ( notnull EntityAI parent,
EntityAI e,
int slotId )
private

sets current inventory location type to Attachment with slot id set to <slotId>

Аргументы
[in]parentparent entity the item <e> will be attached to
[in]eentity with this inventory location (null for new spawns)
[in]slotIdslot id where the item will be attached

Используется в ReadFromContext().

◆ SetCargo()

SetCargo ( notnull EntityAI parent,
EntityAI e,
int idx,
int row,
int col,
bool flip )
private

sets current inventory location type to Cargo with coordinates (idx, row, col)

Аргументы
[in]parentparent entity that will receive item <e> into cargo
[in]eentity with this inventory location (null for new spawns)
[in]idxindex of cargo
[in]rowrow of the cargo
[in]colcolumn of the cargo

Используется в ReadFromContext().

◆ SetCargoAuto()

SetCargoAuto ( notnull CargoBase cargo,
EntityAI e,
int row,
int col,
bool flip )
private

based on Cargo.IsProxyCargo uses SetProxyCargo or SetCargo respectively

Аргументы
[in]cargocargo that will receive item <e> into cargo
[in]eentity with this inventory location (null for new spawns)
[in]rowrow of the cargo
[in]colcolumn of the cargo

◆ SetCol()

proto native void SetCol ( int col)
private

◆ SetFlip()

proto native void SetFlip ( bool flip)
private

◆ SetGround()

SetGround ( EntityAI e,
vector mat[4] )
private

sets current inventory location type to Ground with transformation mat

Аргументы
[in]eentity with this inventory location (null for new spawns)
[in]mattransformation matrix

◆ SetGroundEx()

SetGroundEx ( EntityAI e,
vector pos,
float dir[4] )
private

sets current inventory location type to Ground with transformation mat

Аргументы
[in]eentity with this inventory location (null for new spawns)
[in]posposition vector
[in]dirdirection quat

Используется в ReadFromContext().

◆ SetHands()

SetHands ( notnull EntityAI parent,
EntityAI e )
private

sets current inventory location type to Hands

Аргументы
[in]parentparent entity the item <e> will be attached to. this'd better be inherited from Person
[in]eentity with this inventory location (null for new spawns)

Используется в ReadFromContext().

◆ SetIndex()

proto native void SetIndex ( int idx)
private

◆ SetItem()

SetItem ( notnull EntityAI item)
private

brief sets current inventory location's item

◆ SetParent()

SetParent ( notnull EntityAI parent)
private

brief sets current inventory location's GetParent

◆ SetProxyCargo()

SetProxyCargo ( notnull EntityAI parent,
EntityAI e,
int idx,
int row,
int col,
bool flip )
private

sets current inventory location type to ProxyCargo with coordinates (idx, row, col) @NOTE: typical usage is in building-like dummy structures, where furniture with cargo is part of the model, and is not a physical entity (like person or bag).

Аргументы
[in]parentparent entity that will receive item <e> into proxy cargo
[in]eentity with this inventory location (null for new spawns)
[in]idxindex of cargo
[in]rowrow of the cargo
[in]colcolumn of the cargo

Используется в ReadFromContext().

◆ SetRow()

proto native void SetRow ( int row)
private

◆ SetSlot()

proto native void SetSlot ( int slotId)
private

◆ SetVehicle()

SetVehicle ( notnull EntityAI parent,
EntityAI e,
int idx )
private

brief sets current inventory location's GetParent

Аргументы
[in]idxindex of seat

Используется в ReadFromContext().

◆ WriteToContext()

bool WriteToContext ( ParamsWriteContext ctx)
inlineprivate
470 {
471 if (!ctx.Write(GetType()))
472 {
473 Error("InventoryLocation::WriteToContext - cannot write to context! failed to write type");
474 return false;
475 }
476
477 switch (GetType())
478 {
479 case InventoryLocationType.UNKNOWN:
480 {
481 break;
482 }
483 case InventoryLocationType.GROUND:
484 {
485 if (!ctx.Write(GetItem()))
486 {
487 Error("InventoryLocation::WriteToContext - cannot write to context! failed GND, arg=item");
488 return false;
489 }
490
491 vector pos = GetPos();
492 if (!ctx.Write(pos))
493 {
494 Error("InventoryLocation::WriteToContext - cannot write to context! failed GND, arg=pos");
495 return false;
496 }
497
498 float dir[4];
499 GetDir(dir);
500 if (!ctx.Write(dir))
501 {
502 Error("InventoryLocation::WriteToContext - cannot write to context! failed GND, arg=dir");
503 return false;
504 }
505
506 break;
507 }
508 case InventoryLocationType.ATTACHMENT:
509 {
510 if (!ctx.Write(GetParent()))
511 {
512 Error("InventoryLocation::WriteToContext - cannot write to context! failed ATT, arg=parent");
513 return false;
514 }
515 if (!ctx.Write(GetItem()))
516 {
517 Error("InventoryLocation::WriteToContext - cannot write to context! failed ATT, arg=item");
518 return false;
519 }
520 if (!ctx.Write(GetSlot()))
521 {
522 Error("InventoryLocation::WriteToContext - cannot write to context! failed ATT, arg=slot");
523 return false;
524 }
525 break;
526 }
527 case InventoryLocationType.CARGO:
528 {
529 if (!ctx.Write(GetParent()))
530 {
531 Error("InventoryLocation::WriteToContext - cannot write to context! failed CGO, arg=parent");
532 return false;
533 }
534 if (!ctx.Write(GetItem()))
535 {
536 Error("InventoryLocation::WriteToContext - cannot write to context! failed CGO, arg=item");
537 return false;
538 }
539 if (!ctx.Write(GetIdx()))
540 {
541 Error("InventoryLocation::WriteToContext - cannot write to context! failed CGO, arg=idx");
542 return false;
543 }
544 if (!ctx.Write(GetRow()))
545 {
546 Error("InventoryLocation::WriteToContext - cannot write to context! failed CGO, arg=row");
547 return false;
548 }
549 if (!ctx.Write(GetCol()))
550 {
551 Error("InventoryLocation::WriteToContext - cannot write to context! failed CGO, arg=col");
552 return false;
553 }
554 if (!ctx.Write(GetFlip()))
555 {
556 Error("InventoryLocation::WriteToContext - cannot write to context! failed CGO, arg=flp");
557 return false;
558 }
559 break;
560 }
561 case InventoryLocationType.HANDS:
562 {
563 if (!ctx.Write(GetParent()))
564 {
565 Error("InventoryLocation::WriteToContext - cannot write to context! failed HND, arg=parent");
566 return false;
567 }
568 if (!ctx.Write(GetItem()))
569 {
570 Error("InventoryLocation::WriteToContext - cannot write to context! failed HND, arg=item");
571 return false;
572 }
573 break;
574 }
575 case InventoryLocationType.PROXYCARGO:
576 {
577 if (!ctx.Write(GetParent()))
578 {
579 Error("InventoryLocation::WriteToContext - cannot write to context! failed PXY, arg=parent");
580 return false;
581 }
582 if (!ctx.Write(GetItem()))
583 {
584 Error("InventoryLocation::WriteToContext - cannot write to context! failed PXY, arg=item");
585 return false;
586 }
587 if (!ctx.Write(GetIdx()))
588 {
589 Error("InventoryLocation::WriteToContext - cannot write to context! failed PXY, arg=idx");
590 return false;
591 }
592 if (!ctx.Write(GetRow()))
593 {
594 Error("InventoryLocation::WriteToContext - cannot write to context! failed PXY, arg=row");
595 return false;
596 }
597 if (!ctx.Write(GetCol()))
598 {
599 Error("InventoryLocation::WriteToContext - cannot write to context! failed PXY, arg=col");
600 return false;
601 }
602 if (!ctx.Write(GetFlip()))
603 {
604 Error("InventoryLocation::WriteToContext - cannot write to context! failed PXY, arg=flp");
605 return false;
606 }
607
608 break;
609 }
610
611 case InventoryLocationType.VEHICLE:
612 {
613 if (!ctx.Write(GetParent()))
614 {
615 Error("InventoryLocation::WriteToContext - cannot write to context! failed VHC, arg=parent");
616 return false;
617 }
618 if (!ctx.Write(GetItem()))
619 {
620 Error("InventoryLocation::WriteToContext - cannot write to context! failed VHC, arg=item");
621 return false;
622 }
623 if (!ctx.Write(GetIdx()))
624 {
625 Error("InventoryLocation::WriteToContext - cannot write to context! failed VHC, arg=idx");
626 return false;
627 }
628 break;
629 }
630 default:
631 {
632 Error("WriteToContext - really unknown location type, this should not happen, type=" + GetType());
633 return false;
634 }
635 }
636 return true;
637 }
void Error(string err)
Messagebox with error message.
Definition EnDebug.c:90

Перекрестные ссылки Error(), GetCol(), GetDir(), GetFlip(), GetIdx(), GetItem(), GetParent(), GetPos(), GetRow(), GetSlot() и GetType().


Объявления и описания членов класса находятся в файле: