public void CallS2SMethod(NebulaCommon.ServerType serverType, string method, object[] arguments) { lock (fiberLock) { if (mFiber != null) { mFiber.Enqueue(() => { try { S2SInvokeMethodStart start = new S2SInvokeMethodStart { arguments = arguments, method = method, sourceServerID = GameApplication.ServerId.ToString(), targetServerType = (byte)serverType }; EventData evt = new EventData((byte)S2SEventCode.InvokeMethodStart, start); if (application != null && application.MasterPeer != null) { application.MasterPeer.SendEvent(evt, new SendParameters()); } } catch (Exception ex) { log.Info("exception"); log.Info(ex.Message); log.Info(ex.StackTrace); } }); } } }
public void CallS2SMethod(ServerType serverType, string method, object[] arguments) { S2SInvokeMethodStart start = new S2SInvokeMethodStart { arguments = arguments, method = method, sourceServerID = SelectCharacterApplication.ServerId.ToString(), targetServerType = (byte)serverType }; EventData evt = new EventData((byte)S2SEventCode.InvokeMethodStart, start); application.MasterPeer.SendEvent(evt, new SendParameters()); }