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传递过来的会话禁用此接口
|
Push() (err error) //警告 api传递过来的会话禁用此接口
|
||||||
Close() (err error)
|
Close() (err error)
|
||||||
Reset()
|
Reset()
|
||||||
|
Clone() (clone *UserSession) //克隆
|
||||||
ToString() string
|
ToString() string
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -159,7 +159,15 @@ func (this *UserSession) Push() (err error) {
|
|||||||
|
|
||||||
// 克隆
|
// 克隆
|
||||||
func (this *UserSession) Clone() (clone *UserSession) {
|
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
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -46,7 +46,7 @@ func (this *apiComp) ChallengeReward(session comm.IUserSession, req *pb.ArenaCha
|
|||||||
errdata = &pb.ErrorData{
|
errdata = &pb.ErrorData{
|
||||||
Code: pb.ErrorCode_BattleValidationFailed,
|
Code: pb.ErrorCode_BattleValidationFailed,
|
||||||
Title: pb.ErrorCode_BattleValidationFailed.ToString(),
|
Title: pb.ErrorCode_BattleValidationFailed.ToString(),
|
||||||
Message: err.Error(),
|
Message: "battle iswin fail",
|
||||||
}
|
}
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
@ -48,7 +48,6 @@ func (this *apiComp) Info(session comm.IUserSession, req *pb.ArenaInfoReq) (errd
|
|||||||
info = &pb.DBArenaUser{
|
info = &pb.DBArenaUser{
|
||||||
Uid: session.GetUserId(),
|
Uid: session.GetUserId(),
|
||||||
Name: user.Name,
|
Name: user.Name,
|
||||||
// Avatar: user.Avatar,
|
|
||||||
Lv: user.Lv,
|
Lv: user.Lv,
|
||||||
Sex: user.Gender,
|
Sex: user.Gender,
|
||||||
Skin: user.CurSkin,
|
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) {
|
func (this *modelPasson) updateUserPasson(uid string, data *pb.DBPasson) (err error) {
|
||||||
if err = this.Change(uid, map[string]interface{}{
|
if err = this.Change(uid, map[string]interface{}{
|
||||||
|
"passonlv": data.Passonlv,
|
||||||
"teacher": data.Teacher,
|
"teacher": data.Teacher,
|
||||||
"student": data.Student,
|
"student": data.Student,
|
||||||
}); err != nil {
|
}); err != nil {
|
||||||
|
Loading…
Reference in New Issue
Block a user