public static void BroadcastFromServer(long offerAmount) { if (Main.netMode != NetmodeID.Server) { throw new ModHelpersException("Not server"); } var protocol = new DemandReplyProtocol { WhoAmI = -1, OfferAmount = offerAmount }; protocol.SendToClient(-1, -1); }
public static void BroadcastFromClient(long offerTested, long offerAmount) { if (Main.netMode != NetmodeID.MultiplayerClient) { throw new ModHelpersException("Not client"); } var protocol = new DemandReplyProtocol { WhoAmI = Main.myPlayer, OfferTested = offerTested, OfferAmount = offerAmount }; protocol.SendToServer(true); }