diff --git a/comp_rpc.go b/comp_rpc.go index e23e902..e45cadb 100644 --- a/comp_rpc.go +++ b/comp_rpc.go @@ -65,16 +65,16 @@ func (c *ComponentBehavior) GlobalBroadcastOnewayRPC(excludeSelf bool, comp, met } // CliRPC 向客户端发送RPC -func (c *ComponentBehavior) CliRPC(method string, args ...any) async.AsyncRet { - return rpcutil.ProxyEntity(c, c.GetEntity().GetId()).CliRPC(method, args...) +func (c *ComponentBehavior) CliRPC(proc, method string, args ...any) async.AsyncRet { + return rpcutil.ProxyEntity(c, c.GetEntity().GetId()).CliRPC(proc, method, args...) } // CliOnewayRPC 向客户端发送单向RPC -func (c *ComponentBehavior) CliOnewayRPC(method string, args ...any) error { - return rpcutil.ProxyEntity(c, c.GetEntity().GetId()).CliOnewayRPC(method, args...) +func (c *ComponentBehavior) CliOnewayRPC(proc, method string, args ...any) error { + return rpcutil.ProxyEntity(c, c.GetEntity().GetId()).CliOnewayRPC(proc, method, args...) } // BroadcastCliOnewayRPC 向包含实体的所有分组发送单向RPC -func (c *ComponentBehavior) BroadcastCliOnewayRPC(method string, args ...any) error { - return rpcutil.ProxyEntity(c, c.GetEntity().GetId()).BroadcastCliOnewayRPC(method, args...) +func (c *ComponentBehavior) BroadcastCliOnewayRPC(proc, method string, args ...any) error { + return rpcutil.ProxyEntity(c, c.GetEntity().GetId()).BroadcastCliOnewayRPC(proc, method, args...) } diff --git a/entity_rpc.go b/entity_rpc.go index 80a5069..6784e94 100644 --- a/entity_rpc.go +++ b/entity_rpc.go @@ -65,16 +65,16 @@ func (e *EntityBehavior) GlobalBroadcastOnewayRPC(excludeSelf bool, comp, method } // CliRPC 向客户端发送RPC -func (e *EntityBehavior) CliRPC(method string, args ...any) async.AsyncRet { - return rpcutil.ProxyEntity(e, e.GetId()).CliRPC(method, args...) +func (e *EntityBehavior) CliRPC(proc, method string, args ...any) async.AsyncRet { + return rpcutil.ProxyEntity(e, e.GetId()).CliRPC(proc, method, args...) } // CliOnewayRPC 向客户端发送单向RPC -func (e *EntityBehavior) CliOnewayRPC(method string, args ...any) error { - return rpcutil.ProxyEntity(e, e.GetId()).CliOnewayRPC(method, args...) +func (e *EntityBehavior) CliOnewayRPC(proc, method string, args ...any) error { + return rpcutil.ProxyEntity(e, e.GetId()).CliOnewayRPC(proc, method, args...) } // BroadcastCliOnewayRPC 向包含实体的所有分组发送单向RPC -func (e *EntityBehavior) BroadcastCliOnewayRPC(method string, args ...any) error { - return rpcutil.ProxyEntity(e, e.GetId()).BroadcastCliOnewayRPC(method, args...) +func (e *EntityBehavior) BroadcastCliOnewayRPC(proc, method string, args ...any) error { + return rpcutil.ProxyEntity(e, e.GetId()).BroadcastCliOnewayRPC(proc, method, args...) }