feat 历史记录
This commit is contained in:
@@ -4,8 +4,7 @@ import (
|
||||
"context"
|
||||
"fmt"
|
||||
"git.hlsq.asia/mmorpg/service-common/db/redis"
|
||||
"git.hlsq.asia/mmorpg/service-common/net/grpc/service"
|
||||
"git.hlsq.asia/mmorpg/service-common/net/grpc/stream_client"
|
||||
"git.hlsq.asia/mmorpg/service-common/net/grpc/grpc_client"
|
||||
"git.hlsq.asia/mmorpg/service-common/proto/rs/grpc_pb"
|
||||
"git.hlsq.asia/mmorpg/service-common/proto/ss/ss_pb"
|
||||
"git.hlsq.asia/mmorpg/service-gateway/internal/global"
|
||||
@@ -55,7 +54,7 @@ func (c *Client) handle(event Event) {
|
||||
}
|
||||
|
||||
func (c *Client) onEnter(msg *ss_pb.C2S_EnterInstance) {
|
||||
client, err := service.SceneNewClientLB()
|
||||
client, err := grpc_client.SceneNewClientLB()
|
||||
if err != nil {
|
||||
c.logger.Errorf("SceneNewClient err: %v", err)
|
||||
return
|
||||
@@ -79,7 +78,7 @@ func (c *Client) onLeave() {
|
||||
if c.SceneSID == "" {
|
||||
return
|
||||
}
|
||||
client, err := service.SceneNewClient(c.SceneSID)
|
||||
client, err := grpc_client.SceneNewClient(c.SceneSID)
|
||||
if err != nil {
|
||||
c.logger.Errorf("SceneNewClient err: %v", err)
|
||||
return
|
||||
@@ -98,7 +97,7 @@ func (c *Client) onAction(msg *ss_pb.C2S_Action) {
|
||||
if c.SceneSID == "" {
|
||||
return
|
||||
}
|
||||
if err := stream_client.SendMessageToScene(c.SceneSID, stream_client.FunAction, &grpc_pb.ActionReq{
|
||||
if err := grpc_client.SendMessageToScene(c.SceneSID, grpc_client.FunAction, &grpc_pb.ActionReq{
|
||||
UniqueNo: c.UniqueNo,
|
||||
USN: c.USN,
|
||||
Action: int32(msg.Action),
|
||||
@@ -107,5 +106,6 @@ func (c *Client) onAction(msg *ss_pb.C2S_Action) {
|
||||
SkillID: msg.SkillID,
|
||||
}); err != nil {
|
||||
c.logger.Errorf("send action err: %v", err)
|
||||
return
|
||||
}
|
||||
}
|
||||
|
||||
@@ -5,7 +5,7 @@ import (
|
||||
"fmt"
|
||||
"git.hlsq.asia/mmorpg/service-common/db/redis"
|
||||
"git.hlsq.asia/mmorpg/service-common/log"
|
||||
"git.hlsq.asia/mmorpg/service-common/net/grpc/service"
|
||||
"git.hlsq.asia/mmorpg/service-common/net/grpc/grpc_client"
|
||||
"git.hlsq.asia/mmorpg/service-common/proto/rs/grpc_pb"
|
||||
"git.hlsq.asia/mmorpg/service-common/proto/ss/ss_pb"
|
||||
"git.hlsq.asia/mmorpg/service-gateway/internal/global"
|
||||
@@ -162,7 +162,7 @@ func (l *Login) CheckOnline(user *User) string {
|
||||
|
||||
// KickUser 把玩家踢下线
|
||||
func (l *Login) KickUser(gatewaySID string, usn string) bool {
|
||||
gc, err := service.GatewayNewClient(gatewaySID)
|
||||
gc, err := grpc_client.GatewayNewClient(gatewaySID)
|
||||
if err != nil {
|
||||
log.Errorf("KickUser cannot find gateway client: %v, sid: %v", err, gatewaySID)
|
||||
return false
|
||||
|
||||
Reference in New Issue
Block a user