上传竞技场币

This commit is contained in:
liwei1dao 2022-12-02 10:57:14 +08:00
parent ed5b3342b4
commit aae164bec7
2 changed files with 9 additions and 0 deletions

View File

@ -295,6 +295,7 @@ const (
ResFriend = "friendPoint" //友情点
StarCoin = "starcoin" //星座币
SociatyCoin = "guildcoin" //公会币
ArenaCoin = "arenacoin" //竞技场币
)
const (
Gold int32 = 1 //金币

View File

@ -326,6 +326,14 @@ func (this *User) change(session comm.IUserSession, attr string, add int32) (cha
}
}
change.Guildcoin += add
case comm.ArenaCoin:
if add < 0 {
if userEx.ArenaCoin+add < 0 {
code = pb.ErrorCode_UserSociatyCoinNoEnough
return
}
}
change.Guildcoin += add
default:
err = errors.New(fmt.Sprintf("%s no supported", attr))
return