9 src.WriteToContext(ctx);
10 dst.WriteToContext(ctx);
19 SerializeMove(ctx, type, src, dst);
27 item.GetInventory().GetCurrentInventoryLocation(il);
28 il.WriteToContext(ctx);
34 int nItems = items.Count();
37 for (
int i = 0; i < nItems; ++i)
39 SerializeInventoryCheckForItem(ctx, items[i]);
47 int nItems = items.Count();
49 for (
int i = 0; i < nItems; i++)
51 SerializeInventoryCheckForItem(ctx, items[i]);
54 ctx.Send(player,
ERPCs.RPC_ITEM_REPAIR,
false, player.GetIdentity());
63 SerializeMove(ctx, type, src, dst);
74 src1.WriteToContext(ctx);
75 src2.WriteToContext(ctx);
76 dst1.WriteToContext(ctx);
77 dst2.WriteToContext(ctx);
78 ctx.Write(skippedSwap);
87 SerializeSwap(ctx, src1, src2, dst1, dst2, skippedSwap);
98 SerializeSwap(ctx, src1, src2, dst1, dst2, skippedSwap);
109 e.WriteToContext(ctx);
118 SerializeHandEvent(ctx, e);
123 static void SendServerHandEventViaInventoryCommand(notnull Man player,
HandEventBase e)
128 if (e.IsServerSideOnly())
129 Error(
"[syncinv] SendServerHandEvent - called on server side event only, e=" + e.DumpToString());
130 if (player.IsAlive())
131 Error(
"[syncinv] SendServerHandEvent - called on living thing.. server hand command is only for dead people, e=" + e.DumpToString());
132 if (
LogManager.IsSyncLogEnable())
syncDebugPrint(
"[syncinv] SendServerHandEventViaInventoryCommand SendInputUserDataHandEvent e=" + e.DumpToString());
134 SerializeHandEvent(ctx, e);
static proto native bool ServerLocationSwap(notnull InventoryLocation src1, notnull InventoryLocation src2, notnull InventoryLocation dst1, notnull InventoryLocation dst2, ParamsWriteContext ctx)
swaps two entities
static proto native bool ServerLocationSyncMoveEntity(Man player, notnull EntityAI item, ParamsWriteContext ctx)
synchronously removes item from current inventory location and adds it to destination + sync via inve...