玩家等级变化公告
This commit is contained in:
parent
91a9c65d03
commit
60d8ec19b2
@ -192,6 +192,15 @@ func (this *ModelUser) ChangeLevel(event interface{}, next func(event interface{
|
||||
ul.session.SendMsg(string(this.module.GetType()), UserSubTypeLvChangedPush,
|
||||
&pb.UserLvChangedPush{Uid: ul.session.GetUserId(), Exp: ul.exp, Lv: ul.lv})
|
||||
this.module.DispenseRes(ul.session, rewards, true)
|
||||
|
||||
mc, err := this.module.service.GetModule(comm.ModuleChat)
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
if chat, ok := mc.(comm.IChat); ok {
|
||||
chat.SendSysChatToUser(ul.session, comm.ChatSystem12, ul.lv, 0, ul.name)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@ -202,4 +211,5 @@ type UserListen struct {
|
||||
session comm.IUserSession
|
||||
exp int64
|
||||
lv int32
|
||||
name string
|
||||
}
|
||||
|
@ -409,6 +409,7 @@ func (this *User) EventUserChanged(session comm.IUserSession) {
|
||||
ul.session = session
|
||||
ul.exp = user.Exp
|
||||
ul.lv = user.Lv
|
||||
ul.name = user.Name
|
||||
}
|
||||
this.modelUser.EventApp.Dispatch(comm.EventUserChanged, ul)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user