上传进机场币
This commit is contained in:
parent
1a02e08995
commit
cad863345a
@ -267,6 +267,7 @@ func (this *User) change(session comm.IUserSession, attr string, add int32) (cha
|
||||
Friend: userEx.FriendPoint,
|
||||
Starcoin: user.Starcoin,
|
||||
Guildcoin: userEx.SociatyCoin,
|
||||
ArenaCoin: userEx.ArenaCoin,
|
||||
}
|
||||
|
||||
switch attr {
|
||||
@ -329,11 +330,11 @@ func (this *User) change(session comm.IUserSession, attr string, add int32) (cha
|
||||
case comm.ArenaCoin:
|
||||
if add < 0 {
|
||||
if userEx.ArenaCoin+add < 0 {
|
||||
code = pb.ErrorCode_UserSociatyCoinNoEnough
|
||||
code = pb.ErrorCode_UserArenaCoinNoEnough
|
||||
return
|
||||
}
|
||||
}
|
||||
change.Guildcoin += add
|
||||
change.ArenaCoin += add
|
||||
default:
|
||||
err = errors.New(fmt.Sprintf("%s no supported", attr))
|
||||
return
|
||||
@ -352,6 +353,7 @@ func (this *User) change(session comm.IUserSession, attr string, add int32) (cha
|
||||
updateEx := map[string]interface{}{
|
||||
comm.ResFriend: change.Friend,
|
||||
comm.SociatyCoin: change.Guildcoin,
|
||||
comm.ArenaCoin: change.ArenaCoin,
|
||||
}
|
||||
|
||||
if err := this.modelUser.updateUserAttr(uid, update); err != nil {
|
||||
|
Loading…
Reference in New Issue
Block a user