上传代码
This commit is contained in:
parent
04e8b8db59
commit
b3273d8e13
@ -133,7 +133,7 @@ func (this *apiComp) Challenge(session comm.IUserSession, req *pb.ArenaChallenge
|
|||||||
}
|
}
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
bule.Integral = red.Integral
|
bule.Integral = req.Aiintegral
|
||||||
bule.Dan = red.Dan
|
bule.Dan = red.Dan
|
||||||
}
|
}
|
||||||
redplay := &pb.ArenaPlayer{
|
redplay := &pb.ArenaPlayer{
|
||||||
|
@ -21,6 +21,8 @@ const (
|
|||||||
game_monster = "game_monster.json" //怪物表
|
game_monster = "game_monster.json" //怪物表
|
||||||
game_arenaactiveking = "game_arenaactiveking.json" //王者之上奖励
|
game_arenaactiveking = "game_arenaactiveking.json" //王者之上奖励
|
||||||
game_arenaweeklytask = "game_arenaweeklytask.json" //奖励
|
game_arenaweeklytask = "game_arenaweeklytask.json" //奖励
|
||||||
|
|
||||||
|
game_arenaactivewin = "game_arenaactivewin.json" //连击奖励
|
||||||
)
|
)
|
||||||
|
|
||||||
///竞技场配置管理组件
|
///竞技场配置管理组件
|
||||||
|
@ -186,6 +186,7 @@ func (this *modelArena) updateArenaUserInfo(info *pb.DBArenaUser) (err error) {
|
|||||||
"danaward": info.Danaward,
|
"danaward": info.Danaward,
|
||||||
"maxdan": info.Maxdan,
|
"maxdan": info.Maxdan,
|
||||||
"weekaward": info.Weekaward,
|
"weekaward": info.Weekaward,
|
||||||
|
"prededuction": info.Prededuction,
|
||||||
})
|
})
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
@ -408,13 +409,13 @@ func (this *modelArena) integralCompute(red, bule *pb.ArenaPlayer, iswin bool) {
|
|||||||
}
|
}
|
||||||
if iswin {
|
if iswin {
|
||||||
red.Changeintegral = int32(redactive.KValue * float32(1-1/float32(1+10^(bule.Integral-red.Integral)/400)))
|
red.Changeintegral = int32(redactive.KValue * float32(1-1/float32(1+10^(bule.Integral-red.Integral)/400)))
|
||||||
red.Integral = red.Integral + red.Changeintegral
|
|
||||||
bule.Changeintegral = int32(buleactive.KValue * float32(0-1/float32(1+10^(red.Integral-bule.Integral)/400)))
|
bule.Changeintegral = int32(buleactive.KValue * float32(0-1/float32(1+10^(red.Integral-bule.Integral)/400)))
|
||||||
|
red.Integral = red.Integral + red.Changeintegral
|
||||||
bule.Integral = bule.Integral + bule.Changeintegral
|
bule.Integral = bule.Integral + bule.Changeintegral
|
||||||
} else {
|
} else {
|
||||||
red.Changeintegral = int32(redactive.KValue * float32(0-1/float32(1+10^(bule.Integral-red.Integral)/400)))
|
red.Changeintegral = int32(redactive.KValue * float32(0-1/float32(1+10^(bule.Integral-red.Integral)/400)))
|
||||||
red.Integral = red.Integral + red.Changeintegral
|
|
||||||
bule.Changeintegral = int32(redactive.KValue * float32(1-1/float32(1+10^(red.Integral-bule.Integral)/400)))
|
bule.Changeintegral = int32(redactive.KValue * float32(1-1/float32(1+10^(red.Integral-bule.Integral)/400)))
|
||||||
|
red.Integral = red.Integral + red.Changeintegral
|
||||||
bule.Integral = bule.Integral + bule.Changeintegral
|
bule.Integral = bule.Integral + bule.Changeintegral
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -506,8 +506,9 @@ type ArenaChallengeReq struct {
|
|||||||
|
|
||||||
Playerid string `protobuf:"bytes,1,opt,name=playerid,proto3" json:"playerid"`
|
Playerid string `protobuf:"bytes,1,opt,name=playerid,proto3" json:"playerid"`
|
||||||
Isai bool `protobuf:"varint,2,opt,name=isai,proto3" json:"isai"` //是否是ai
|
Isai bool `protobuf:"varint,2,opt,name=isai,proto3" json:"isai"` //是否是ai
|
||||||
MformatId int32 `protobuf:"varint,3,opt,name=mformatId,proto3" json:"mformatId"` // AIId
|
Aiintegral int32 `protobuf:"varint,3,opt,name=aiintegral,proto3" json:"aiintegral"` // ai 积分
|
||||||
Battle *BattleFormation `protobuf:"bytes,4,opt,name=battle,proto3" json:"battle"` //战斗类型
|
MformatId int32 `protobuf:"varint,4,opt,name=mformatId,proto3" json:"mformatId"` // AIId
|
||||||
|
Battle *BattleFormation `protobuf:"bytes,5,opt,name=battle,proto3" json:"battle"` //战斗类型
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *ArenaChallengeReq) Reset() {
|
func (x *ArenaChallengeReq) Reset() {
|
||||||
@ -556,6 +557,13 @@ func (x *ArenaChallengeReq) GetIsai() bool {
|
|||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (x *ArenaChallengeReq) GetAiintegral() int32 {
|
||||||
|
if x != nil {
|
||||||
|
return x.Aiintegral
|
||||||
|
}
|
||||||
|
return 0
|
||||||
|
}
|
||||||
|
|
||||||
func (x *ArenaChallengeReq) GetMformatId() int32 {
|
func (x *ArenaChallengeReq) GetMformatId() int32 {
|
||||||
if x != nil {
|
if x != nil {
|
||||||
return x.MformatId
|
return x.MformatId
|
||||||
@ -1619,14 +1627,16 @@ var file_arena_arena_msg_proto_rawDesc = []byte{
|
|||||||
0x0f, 0x41, 0x72, 0x65, 0x6e, 0x61, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x52, 0x65, 0x73, 0x70,
|
0x0f, 0x41, 0x72, 0x65, 0x6e, 0x61, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x52, 0x65, 0x73, 0x70,
|
||||||
0x12, 0x26, 0x0a, 0x07, 0x70, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28,
|
0x12, 0x26, 0x0a, 0x07, 0x70, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28,
|
||||||
0x0b, 0x32, 0x0c, 0x2e, 0x41, 0x72, 0x65, 0x6e, 0x61, 0x50, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x52,
|
0x0b, 0x32, 0x0c, 0x2e, 0x41, 0x72, 0x65, 0x6e, 0x61, 0x50, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x52,
|
||||||
0x07, 0x70, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x73, 0x22, 0x8b, 0x01, 0x0a, 0x11, 0x41, 0x72, 0x65,
|
0x07, 0x70, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x73, 0x22, 0xab, 0x01, 0x0a, 0x11, 0x41, 0x72, 0x65,
|
||||||
0x6e, 0x61, 0x43, 0x68, 0x61, 0x6c, 0x6c, 0x65, 0x6e, 0x67, 0x65, 0x52, 0x65, 0x71, 0x12, 0x1a,
|
0x6e, 0x61, 0x43, 0x68, 0x61, 0x6c, 0x6c, 0x65, 0x6e, 0x67, 0x65, 0x52, 0x65, 0x71, 0x12, 0x1a,
|
||||||
0x0a, 0x08, 0x70, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09,
|
0x0a, 0x08, 0x70, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09,
|
||||||
0x52, 0x08, 0x70, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x69, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x69, 0x73,
|
0x52, 0x08, 0x70, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x69, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x69, 0x73,
|
||||||
0x61, 0x69, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x04, 0x69, 0x73, 0x61, 0x69, 0x12, 0x1c,
|
0x61, 0x69, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x04, 0x69, 0x73, 0x61, 0x69, 0x12, 0x1e,
|
||||||
0x0a, 0x09, 0x6d, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x49, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28,
|
0x0a, 0x0a, 0x61, 0x69, 0x69, 0x6e, 0x74, 0x65, 0x67, 0x72, 0x61, 0x6c, 0x18, 0x03, 0x20, 0x01,
|
||||||
|
0x28, 0x05, 0x52, 0x0a, 0x61, 0x69, 0x69, 0x6e, 0x74, 0x65, 0x67, 0x72, 0x61, 0x6c, 0x12, 0x1c,
|
||||||
|
0x0a, 0x09, 0x6d, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x49, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28,
|
||||||
0x05, 0x52, 0x09, 0x6d, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x49, 0x64, 0x12, 0x28, 0x0a, 0x06,
|
0x05, 0x52, 0x09, 0x6d, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x49, 0x64, 0x12, 0x28, 0x0a, 0x06,
|
||||||
0x62, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x42,
|
0x62, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x42,
|
||||||
0x61, 0x74, 0x74, 0x6c, 0x65, 0x46, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x06,
|
0x61, 0x74, 0x74, 0x6c, 0x65, 0x46, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x06,
|
||||||
0x62, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x22, 0x55, 0x0a, 0x12, 0x41, 0x72, 0x65, 0x6e, 0x61, 0x43,
|
0x62, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x22, 0x55, 0x0a, 0x12, 0x41, 0x72, 0x65, 0x6e, 0x61, 0x43,
|
||||||
0x68, 0x61, 0x6c, 0x6c, 0x65, 0x6e, 0x67, 0x65, 0x52, 0x65, 0x73, 0x70, 0x12, 0x1e, 0x0a, 0x04,
|
0x68, 0x61, 0x6c, 0x6c, 0x65, 0x6e, 0x67, 0x65, 0x52, 0x65, 0x73, 0x70, 0x12, 0x1e, 0x0a, 0x04,
|
||||||
|
@ -499,8 +499,7 @@ type IntegralRankListResp struct {
|
|||||||
sizeCache protoimpl.SizeCache
|
sizeCache protoimpl.SizeCache
|
||||||
unknownFields protoimpl.UnknownFields
|
unknownFields protoimpl.UnknownFields
|
||||||
|
|
||||||
Ranks []*DBIntegralRank `protobuf:"bytes,1,rep,name=ranks,proto3" json:"ranks"`
|
Ranks []*DBIntegralRank `protobuf:"bytes,1,rep,name=ranks,proto3" json:"ranks"` // repeated DBIntegralRank friends = 2;
|
||||||
Friends []*DBIntegralRank `protobuf:"bytes,2,rep,name=friends,proto3" json:"friends"`
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *IntegralRankListResp) Reset() {
|
func (x *IntegralRankListResp) Reset() {
|
||||||
@ -542,13 +541,6 @@ func (x *IntegralRankListResp) GetRanks() []*DBIntegralRank {
|
|||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *IntegralRankListResp) GetFriends() []*DBIntegralRank {
|
|
||||||
if x != nil {
|
|
||||||
return x.Friends
|
|
||||||
}
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
|
|
||||||
// 领取成就
|
// 领取成就
|
||||||
type IntegralGetAchieveReq struct {
|
type IntegralGetAchieveReq struct {
|
||||||
state protoimpl.MessageState
|
state protoimpl.MessageState
|
||||||
@ -709,21 +701,19 @@ var file_integral_integral_msg_proto_rawDesc = []byte{
|
|||||||
0x61, 0x72, 0x64, 0x22, 0x2b, 0x0a, 0x13, 0x49, 0x6e, 0x74, 0x65, 0x67, 0x72, 0x61, 0x6c, 0x52,
|
0x61, 0x72, 0x64, 0x22, 0x2b, 0x0a, 0x13, 0x49, 0x6e, 0x74, 0x65, 0x67, 0x72, 0x61, 0x6c, 0x52,
|
||||||
0x61, 0x6e, 0x6b, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x71, 0x12, 0x14, 0x0a, 0x05, 0x6e, 0x61,
|
0x61, 0x6e, 0x6b, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x71, 0x12, 0x14, 0x0a, 0x05, 0x6e, 0x61,
|
||||||
0x6e, 0x64, 0x75, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x6e, 0x61, 0x6e, 0x64, 0x75,
|
0x6e, 0x64, 0x75, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x6e, 0x61, 0x6e, 0x64, 0x75,
|
||||||
0x22, 0x68, 0x0a, 0x14, 0x49, 0x6e, 0x74, 0x65, 0x67, 0x72, 0x61, 0x6c, 0x52, 0x61, 0x6e, 0x6b,
|
0x22, 0x3d, 0x0a, 0x14, 0x49, 0x6e, 0x74, 0x65, 0x67, 0x72, 0x61, 0x6c, 0x52, 0x61, 0x6e, 0x6b,
|
||||||
0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x12, 0x25, 0x0a, 0x05, 0x72, 0x61, 0x6e, 0x6b,
|
0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x12, 0x25, 0x0a, 0x05, 0x72, 0x61, 0x6e, 0x6b,
|
||||||
0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x44, 0x42, 0x49, 0x6e, 0x74, 0x65,
|
0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x44, 0x42, 0x49, 0x6e, 0x74, 0x65,
|
||||||
0x67, 0x72, 0x61, 0x6c, 0x52, 0x61, 0x6e, 0x6b, 0x52, 0x05, 0x72, 0x61, 0x6e, 0x6b, 0x73, 0x12,
|
0x67, 0x72, 0x61, 0x6c, 0x52, 0x61, 0x6e, 0x6b, 0x52, 0x05, 0x72, 0x61, 0x6e, 0x6b, 0x73, 0x22,
|
||||||
0x29, 0x0a, 0x07, 0x66, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b,
|
0x27, 0x0a, 0x15, 0x49, 0x6e, 0x74, 0x65, 0x67, 0x72, 0x61, 0x6c, 0x47, 0x65, 0x74, 0x41, 0x63,
|
||||||
0x32, 0x0f, 0x2e, 0x44, 0x42, 0x49, 0x6e, 0x74, 0x65, 0x67, 0x72, 0x61, 0x6c, 0x52, 0x61, 0x6e,
|
0x68, 0x69, 0x65, 0x76, 0x65, 0x52, 0x65, 0x71, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01,
|
||||||
0x6b, 0x52, 0x07, 0x66, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x73, 0x22, 0x27, 0x0a, 0x15, 0x49, 0x6e,
|
0x20, 0x01, 0x28, 0x05, 0x52, 0x02, 0x69, 0x64, 0x22, 0x49, 0x0a, 0x16, 0x49, 0x6e, 0x74, 0x65,
|
||||||
0x74, 0x65, 0x67, 0x72, 0x61, 0x6c, 0x47, 0x65, 0x74, 0x41, 0x63, 0x68, 0x69, 0x65, 0x76, 0x65,
|
0x67, 0x72, 0x61, 0x6c, 0x47, 0x65, 0x74, 0x41, 0x63, 0x68, 0x69, 0x65, 0x76, 0x65, 0x52, 0x65,
|
||||||
0x52, 0x65, 0x71, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52,
|
0x73, 0x70, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x02,
|
||||||
0x02, 0x69, 0x64, 0x22, 0x49, 0x0a, 0x16, 0x49, 0x6e, 0x74, 0x65, 0x67, 0x72, 0x61, 0x6c, 0x47,
|
0x69, 0x64, 0x12, 0x1f, 0x0a, 0x05, 0x61, 0x77, 0x61, 0x72, 0x64, 0x18, 0x02, 0x20, 0x03, 0x28,
|
||||||
0x65, 0x74, 0x41, 0x63, 0x68, 0x69, 0x65, 0x76, 0x65, 0x52, 0x65, 0x73, 0x70, 0x12, 0x0e, 0x0a,
|
0x0b, 0x32, 0x09, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x41, 0x74, 0x6e, 0x6f, 0x52, 0x05, 0x61, 0x77,
|
||||||
0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x02, 0x69, 0x64, 0x12, 0x1f, 0x0a,
|
0x61, 0x72, 0x64, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f,
|
||||||
0x05, 0x61, 0x77, 0x61, 0x72, 0x64, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x09, 0x2e, 0x55,
|
0x74, 0x6f, 0x33,
|
||||||
0x73, 0x65, 0x72, 0x41, 0x74, 0x6e, 0x6f, 0x52, 0x05, 0x61, 0x77, 0x61, 0x72, 0x64, 0x42, 0x06,
|
|
||||||
0x5a, 0x04, 0x2e, 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
|
||||||
}
|
}
|
||||||
|
|
||||||
var (
|
var (
|
||||||
@ -771,13 +761,12 @@ var file_integral_integral_msg_proto_depIdxs = []int32{
|
|||||||
13, // 7: IntegralGetRewardResp.data:type_name -> DBIntegralBoss
|
13, // 7: IntegralGetRewardResp.data:type_name -> DBIntegralBoss
|
||||||
17, // 8: IntegralGetRewardResp.award:type_name -> UserAtno
|
17, // 8: IntegralGetRewardResp.award:type_name -> UserAtno
|
||||||
18, // 9: IntegralRankListResp.ranks:type_name -> DBIntegralRank
|
18, // 9: IntegralRankListResp.ranks:type_name -> DBIntegralRank
|
||||||
18, // 10: IntegralRankListResp.friends:type_name -> DBIntegralRank
|
17, // 10: IntegralGetAchieveResp.award:type_name -> UserAtno
|
||||||
17, // 11: IntegralGetAchieveResp.award:type_name -> UserAtno
|
11, // [11:11] is the sub-list for method output_type
|
||||||
12, // [12:12] is the sub-list for method output_type
|
11, // [11:11] is the sub-list for method input_type
|
||||||
12, // [12:12] is the sub-list for method input_type
|
11, // [11:11] is the sub-list for extension type_name
|
||||||
12, // [12:12] is the sub-list for extension type_name
|
11, // [11:11] is the sub-list for extension extendee
|
||||||
12, // [12:12] is the sub-list for extension extendee
|
0, // [0:11] is the sub-list for field type_name
|
||||||
0, // [0:12] is the sub-list for field type_name
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func init() { file_integral_integral_msg_proto_init() }
|
func init() { file_integral_integral_msg_proto_init() }
|
||||||
|
Loading…
Reference in New Issue
Block a user