472 {
473 int tmp = -1;
475
476 int type = -1;
478 return;
479
480 switch (type)
481 {
483 {
484 InventoryLocation src = new InventoryLocation();
485 InventoryLocation dst = new InventoryLocation();
486
489 if (LogManager.IsSyncLogEnable())
syncDebugPrint(
"[syncinv] t=" +
g_Game.GetTime() +
"ms ServerInventoryCommand cmd=" +
typename.EnumToString(
InventoryCommandType, type) +
" src=" + InventoryLocation.DumpToStringNullSafe(src) +
" dst=" + InventoryLocation.DumpToStringNullSafe(dst));
490
492 {
493 Error(
"[syncinv] ServerInventoryCommand (cmd=SYNC_MOVE) dropped, item not in bubble");
494 break;
495 }
496
498 break;
499 }
500
502 {
505
506 if (!e.GetSrcEntity())
507 {
508 Error(
"[syncinv] ServerInventoryCommand (cmd=HAND_EVENT) dropped, item not in bubble");
509 break;
510 }
511 e.m_Player.GetHumanInventory().ProcessHandEvent(e);
512 break;
513 }
514
517 {
518 InventoryLocation src1 = new InventoryLocation();
519 InventoryLocation src2 = new InventoryLocation();
520 InventoryLocation dst1 = new InventoryLocation();
521 InventoryLocation dst2 = new InventoryLocation();
526
528 {
529 if (LogManager.IsSyncLogEnable())
syncDebugPrint(
"[syncinv] t=" +
g_Game.GetTime() +
"ms ServerInventoryCommand Swap src1=" + InventoryLocation.DumpToStringNullSafe(src1) +
" src2=" + InventoryLocation.DumpToStringNullSafe(src2) +
" dst1=" + InventoryLocation.DumpToStringNullSafe(dst1) +
" dst2=" + InventoryLocation.DumpToStringNullSafe(dst2));
530
532 }
533 else
534 Error(
"ServerInventoryCommand - cannot swap, invalid location input: src1=" + InventoryLocation.DumpToStringNullSafe(src1) +
" src2=" + InventoryLocation.DumpToStringNullSafe(src2) +
" dst1=" + InventoryLocation.DumpToStringNullSafe(dst1) +
" dst2=" + InventoryLocation.DumpToStringNullSafe(dst2));
535
536 break;
537 }
538 }
539 }
void syncDebugPrint(string s)
void HandEventBase(Man p=null, InventoryLocation src=null)
static proto native bool LocationSyncMoveEntity(notnull InventoryLocation src_loc, notnull InventoryLocation dst_loc)
synchronously removes item from current inventory location and adds it to destination no anims involv...
static proto native bool LocationSwap(notnull InventoryLocation src1, notnull InventoryLocation src2, notnull InventoryLocation dst1, notnull InventoryLocation dst2)
swaps two entities
override string DumpToString()
proto native bool IsValid()
verify current set inventory location
bool ReadFromContext(ParamsReadContext ctx)
proto native EntityAI GetItem()
returns item of current inventory location
proto bool Read(void value_in)
void Error(string err)
Messagebox with error message.