Merge branch 'dev' of http://git.legu.cc/liwei_3d/go_dreamfactory into dev
This commit is contained in:
commit
29e0cdda57
@ -66,6 +66,7 @@ type IUserSession interface {
|
||||
Push() (err error) //警告 api传递过来的会话禁用此接口
|
||||
Close() (err error)
|
||||
Reset()
|
||||
Clone() (clone *UserSession) //克隆
|
||||
ToString() string
|
||||
}
|
||||
|
||||
|
@ -159,7 +159,15 @@ func (this *UserSession) Push() (err error) {
|
||||
|
||||
// 克隆
|
||||
func (this *UserSession) Clone() (clone *UserSession) {
|
||||
|
||||
clone = &UserSession{
|
||||
msgqueue: make([]*pb.UserMessage, 0),
|
||||
service: this.service,
|
||||
IP: this.IP,
|
||||
SessionId: this.SessionId,
|
||||
GatewayServiceId: this.GatewayServiceId,
|
||||
ServiceTag: this.ServiceTag,
|
||||
UserId: this.UserId,
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
|
@ -46,7 +46,7 @@ func (this *apiComp) ChallengeReward(session comm.IUserSession, req *pb.ArenaCha
|
||||
errdata = &pb.ErrorData{
|
||||
Code: pb.ErrorCode_BattleValidationFailed,
|
||||
Title: pb.ErrorCode_BattleValidationFailed.ToString(),
|
||||
Message: err.Error(),
|
||||
Message: "battle iswin fail",
|
||||
}
|
||||
return
|
||||
}
|
||||
|
@ -48,7 +48,6 @@ func (this *apiComp) Info(session comm.IUserSession, req *pb.ArenaInfoReq) (errd
|
||||
info = &pb.DBArenaUser{
|
||||
Uid: session.GetUserId(),
|
||||
Name: user.Name,
|
||||
// Avatar: user.Avatar,
|
||||
Lv: user.Lv,
|
||||
Sex: user.Gender,
|
||||
Skin: user.CurSkin,
|
||||
|
@ -57,6 +57,7 @@ func (this *modelPasson) getUserPasson(uid string) (results *pb.DBPasson, err er
|
||||
|
||||
func (this *modelPasson) updateUserPasson(uid string, data *pb.DBPasson) (err error) {
|
||||
if err = this.Change(uid, map[string]interface{}{
|
||||
"passonlv": data.Passonlv,
|
||||
"teacher": data.Teacher,
|
||||
"student": data.Student,
|
||||
}); err != nil {
|
||||
|
Loading…
Reference in New Issue
Block a user