上传竞技场币
This commit is contained in:
parent
ed5b3342b4
commit
aae164bec7
@ -295,6 +295,7 @@ const (
|
|||||||
ResFriend = "friendPoint" //友情点
|
ResFriend = "friendPoint" //友情点
|
||||||
StarCoin = "starcoin" //星座币
|
StarCoin = "starcoin" //星座币
|
||||||
SociatyCoin = "guildcoin" //公会币
|
SociatyCoin = "guildcoin" //公会币
|
||||||
|
ArenaCoin = "arenacoin" //竞技场币
|
||||||
)
|
)
|
||||||
const (
|
const (
|
||||||
Gold int32 = 1 //金币
|
Gold int32 = 1 //金币
|
||||||
|
@ -326,6 +326,14 @@ func (this *User) change(session comm.IUserSession, attr string, add int32) (cha
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
change.Guildcoin += add
|
change.Guildcoin += add
|
||||||
|
case comm.ArenaCoin:
|
||||||
|
if add < 0 {
|
||||||
|
if userEx.ArenaCoin+add < 0 {
|
||||||
|
code = pb.ErrorCode_UserSociatyCoinNoEnough
|
||||||
|
return
|
||||||
|
}
|
||||||
|
}
|
||||||
|
change.Guildcoin += add
|
||||||
default:
|
default:
|
||||||
err = errors.New(fmt.Sprintf("%s no supported", attr))
|
err = errors.New(fmt.Sprintf("%s no supported", attr))
|
||||||
return
|
return
|
||||||
|
Loading…
Reference in New Issue
Block a user