Ejemplo n.º 1
0
        public static void RegisterNewNetRPCs(ZRoutedRpc zrpc)
        {
            Utils.Log($"Registering server side and client side RPCs for Map Sharing Made Easy");
            if (zrpc == null)
            {
                Utils.Log("No zrpc instance found");
                return;
            }

            zrpc.Register("SetMapSharingConfigValues", new Action <long, ZPackage>(RPC_ClientSetConfigValues));
            zrpc.Register("CheckMapSharingModVersion", new Action <long, ZPackage>(RPC_ClientCheckModVersion));
            zrpc.Register("ReceiveMapData", new Action <long, ZPackage>(MapTransfer.RPC_ReceiveMapData));
        }
Ejemplo n.º 2
0
        public void RegisterRPC(ZRoutedRpc routedRpc)
        {
            //routedRpc.Register<ZPackage>("SpawnBounties", RPC_SpawnBounties);
            routedRpc.Register <string>("SendKillLogs", RPC_Client_ReceiveKillLogs);

            if (Common.Utils.IsServer())
            {
                routedRpc.Register <ZPackage, string, bool>("SlayBountyTarget", RPC_SlayBountyTarget);
                routedRpc.Register <long>("RequestKillLogs", RPC_Server_RequestKillLogs);
                routedRpc.Register <long>("ClearKillLogs", RPC_Server_ClearKillLogs);
            }
            else
            {
                routedRpc.Register <ZPackage, string, bool>("SlayBountyTargetFromServer", RPC_Client_SlayBountyTargetFromServer);
            }
        }
Ejemplo n.º 3
0
 public static void RegisterRPC(ZRoutedRpc routedRpc)
 {
     if (!Common.Utils.IsServer())
     {
         routedRpc.Register <ZPackage>(Name_RPC_ServerKnownMats, RPC_ServerKnownMats);
         routedRpc.Register <ZPackage>(Name_RPC_ServerKnownRecipes, RPC_ServerKnownRecipes);
     }
     routedRpc.Register <ZPackage>(Name_RPC_ClientKnownMats, RPC_ClientKnownMats);
     routedRpc.Register <ZPackage>(Name_RPC_ClientKnownRecipes, RPC_ClientKnownRecipes);
     routedRpc.Register <string>(Name_RPC_AddKnownRecipe, RPC_AddKnownRecipe);
     routedRpc.Register <string>(Name_RPC_AddKnownMaterial, RPC_AddKnownMaterial);
 }