|
@@ -13,13 +13,15 @@ import (
|
|
)
|
|
)
|
|
|
|
|
|
func (p *actorPlayer) invite() {
|
|
func (p *actorPlayer) invite() {
|
|
-
|
|
|
|
pid := mdb.RDB.Get(context.Background(), fmt.Sprintf("%v:1:%v", constant.InviteKey, p.Player.OpenId)).Val()
|
|
pid := mdb.RDB.Get(context.Background(), fmt.Sprintf("%v:1:%v", constant.InviteKey, p.Player.OpenId)).Val()
|
|
-
|
|
|
|
|
|
+ //如果邀请是自己不处理
|
|
|
|
+ if p.Player.UserName == pid {
|
|
|
|
+ return
|
|
|
|
+ }
|
|
p.Player.Pid = pid
|
|
p.Player.Pid = pid
|
|
p.Player.SetInvite(pid)
|
|
p.Player.SetInvite(pid)
|
|
//添加日志
|
|
//添加日志
|
|
- clog.Infof("player invite,playerName:%v, inviteName:%v", p.Player.UserName, pid)
|
|
|
|
|
|
+ clog.Infof("player invite,playerName:%v, inviteName:%v", p.Player.UserName, pid)
|
|
}
|
|
}
|
|
|
|
|
|
func (p *actorPlayer) inviteRecord() (*param.WeeklyRankConfigResp, int32) {
|
|
func (p *actorPlayer) inviteRecord() (*param.WeeklyRankConfigResp, int32) {
|