上传用户信息

This commit is contained in:
liwei1dao 2023-09-07 19:04:08 +08:00
parent d5d9fbb785
commit 7a0916b006
4 changed files with 10 additions and 3 deletions

View File

@ -515,7 +515,9 @@ const (
const (
ResGold = "gold" //金币
ResExp = "exp" //经验
Lv = "lv" //等级
VipExp = "vipexp" //经验
Vip = "vip" //vip
ResDiamond = "diamond" //钻石
ResTaskActive = "taskActive" //任务活跃度
ResFriend = "friendPoint" //友情点

View File

@ -173,8 +173,8 @@ type (
// 批量处理
AddAttributeValues(session IUserSession, attrs map[string]int32, bPush bool) (errdata *pb.ErrorData)
//用户改变事件
EventUserChanged(session IUserSession)
EventUserVipChanged(session IUserSession)
// EventUserChanged(session IUserSession)
// EventUserVipChanged(session IUserSession)
//获取用户expand
GetUserExpand(uid string) (result *pb.DBUserExpand, err error)
//更新用户expand

View File

@ -279,6 +279,7 @@ func (this *ModelUser) changelv(session comm.IUserSession, lv int32, exp int64,
)
}
this.module.chat.SendSysChatToUser(session, comm.ChatSystem12, lv, 0, name)
this.module.sys.CheckOpenCond(session, comm.OpencondTypePlatlv, lv)
session.Push()
}

View File

@ -53,6 +53,7 @@ func NewModule() core.IModule {
type User struct {
modules.ModuleBase
chat comm.IChat
sys comm.ISys
api *apiComp
modelUser *ModelUser
modelSession *ModelSession
@ -97,7 +98,10 @@ func (this *User) Start() (err error) {
return
}
this.chat = module.(comm.IChat)
if module, err = this.service.GetModule(comm.ModuleSys); err != nil {
return
}
this.sys = module.(comm.ISys)
return
}