Merge branch 'dev' of http://git.legu.cc/liwei_3d/go_dreamfactory into dev
This commit is contained in:
commit
ef8aed1a7d
@ -192,6 +192,15 @@ func (this *ModelUser) ChangeLevel(event interface{}, next func(event interface{
|
|||||||
ul.session.SendMsg(string(this.module.GetType()), UserSubTypeLvChangedPush,
|
ul.session.SendMsg(string(this.module.GetType()), UserSubTypeLvChangedPush,
|
||||||
&pb.UserLvChangedPush{Uid: ul.session.GetUserId(), Exp: ul.exp, Lv: ul.lv})
|
&pb.UserLvChangedPush{Uid: ul.session.GetUserId(), Exp: ul.exp, Lv: ul.lv})
|
||||||
this.module.DispenseRes(ul.session, rewards, true)
|
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
|
session comm.IUserSession
|
||||||
exp int64
|
exp int64
|
||||||
lv int32
|
lv int32
|
||||||
|
name string
|
||||||
}
|
}
|
||||||
|
@ -246,7 +246,7 @@ func (this *User) change(session comm.IUserSession, attr string, add int32) (cha
|
|||||||
userEx *pb.DBUserExpand
|
userEx *pb.DBUserExpand
|
||||||
err error
|
err error
|
||||||
)
|
)
|
||||||
|
|
||||||
user = this.GetUser(uid)
|
user = this.GetUser(uid)
|
||||||
userEx, err = this.GetUserExpand(uid)
|
userEx, err = this.GetUserExpand(uid)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
@ -409,6 +409,7 @@ func (this *User) EventUserChanged(session comm.IUserSession) {
|
|||||||
ul.session = session
|
ul.session = session
|
||||||
ul.exp = user.Exp
|
ul.exp = user.Exp
|
||||||
ul.lv = user.Lv
|
ul.lv = user.Lv
|
||||||
|
ul.name = user.Name
|
||||||
}
|
}
|
||||||
this.modelUser.EventApp.Dispatch(comm.EventUserChanged, ul)
|
this.modelUser.EventApp.Dispatch(comm.EventUserChanged, ul)
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user