|
|
@@ -63,11 +63,34 @@ func init() {
|
|
|
util.InfoF("SSAccountGetRoleListReq openid=%v zone=%v account data not empty need create", msg.OpenId, msg.ZoneId)
|
|
|
//数据不存在
|
|
|
//东南亚审核使用账号覆盖
|
|
|
- _ = GetRoleListFromRedis("h2z8udyf8ga741708", msg.ZoneId, ack)
|
|
|
- ack.Roles[0].OpenId = msg.OpenId
|
|
|
-
|
|
|
- err = SetRoleListToRedis(msg.OpenId, msg.ZoneId, ack)
|
|
|
- model.ServiceReplay(ev, ack)
|
|
|
+ //_ = GetRoleListFromRedis("h2z8udyf8ga741708", msg.ZoneId, ack)
|
|
|
+ //ack.Roles[0].OpenId = msg.OpenId
|
|
|
+ //
|
|
|
+ //err = SetRoleListToRedis(msg.OpenId, msg.ZoneId, ack)
|
|
|
+ ack2 := &serverproto.SSAccountGetRoleListAck{}
|
|
|
+ _ = GetRoleListFromRedis("h2z8udyf8ga741708", msg.ZoneId, ack2)
|
|
|
+ uidd := ack2.Roles[0].Uid
|
|
|
+ //获取copy玩家的基本数据
|
|
|
+ tmpRoleBase2 := &serverproto.RoleBase{}
|
|
|
+ GetRoleBaseFromRedis(uidd, tmpRoleBase2)
|
|
|
+ tmpRoleBase2.Id = cliId.SessID
|
|
|
+ tmpRoleBase2.NickName = ""
|
|
|
+ tmpRoleHero2 := &serverproto.RoleHero{}
|
|
|
+ GetRoleHeroDataFromRedis(uidd, tmpRoleHero2)
|
|
|
+ tmpRoleBattle2 := &serverproto.RoleBattle{}
|
|
|
+ GetSystemDataFromRedis(RoleBattleDataPrefix, uidd, tmpRoleBattle2)
|
|
|
+ tmpRoleEquip2 := &serverproto.RoleEquip{}
|
|
|
+ GetSystemDataFromRedis(RoleEquipDataPrefix, uidd, tmpRoleEquip2)
|
|
|
+ //复制到新号上
|
|
|
+ _ = SetRoleToRedis(cliId.SessID, tmpRoleBase2)
|
|
|
+ SetRoleHeroDataToRedis(cliId.SessID, tmpRoleHero2)
|
|
|
+ SetSystemDataToRedis(RoleBattleDataPrefix, cliId.SessID, tmpRoleBattle2)
|
|
|
+ SetSystemDataToRedis(RoleEquipDataPrefix, cliId.SessID, tmpRoleEquip2)
|
|
|
+ ack2.Roles[0].OpenId = msg.OpenId
|
|
|
+ ack2.Roles[0].Uid = cliId.SessID
|
|
|
+ err = SetRoleListToRedis(msg.OpenId, msg.ZoneId, ack2)
|
|
|
+ GetRolePetDataFromRedis2(uidd, cliId.SessID, ev)
|
|
|
+ model.ServiceReplay(ev, ack2)
|
|
|
} else {
|
|
|
model.ServiceReplay(ev, ack)
|
|
|
}
|
|
|
@@ -140,6 +163,10 @@ func init() {
|
|
|
//SetRoleHeroDataToRedis(cliId.SessID, tmpRoleHero2)
|
|
|
//SetSystemDataToRedis(RoleBattleDataPrefix, cliId.SessID, tmpRoleBattle2)
|
|
|
//SetSystemDataToRedis(RoleEquipDataPrefix, cliId.SessID, tmpRoleEquip2)
|
|
|
+ //ack.Err = int32(serverproto.ErrorCode_ERROR_ROLE_HAS_CREATE)
|
|
|
+ //ack.CreateRoleUid = tmpRoleBase2.Id
|
|
|
+ //model.ServiceReplay(ev, ack)
|
|
|
+ //return
|
|
|
//以上
|
|
|
err := SetRoleToRedis(cliId.SessID, msg.Base)
|
|
|
if err != nil {
|
|
|
@@ -165,6 +192,7 @@ func init() {
|
|
|
}
|
|
|
UpdatePlayerBriefInfo(cliId.SessID, briefInfo, true, msg.ActiveCode, msg.OpenId, msg.SubPlatform)
|
|
|
}
|
|
|
+ return
|
|
|
}
|
|
|
ack.Err = int32(serverproto.ErrorCode_ERROR_OK)
|
|
|
}
|