diff --git a/modules/arena/api_challenge.go b/modules/arena/api_challenge.go index 00cfdd936..10fb27c5e 100644 --- a/modules/arena/api_challenge.go +++ b/modules/arena/api_challenge.go @@ -133,7 +133,7 @@ func (this *apiComp) Challenge(session comm.IUserSession, req *pb.ArenaChallenge } return } - bule.Integral = red.Integral + bule.Integral = req.Aiintegral bule.Dan = red.Dan } redplay := &pb.ArenaPlayer{ diff --git a/modules/arena/configure.go b/modules/arena/configure.go index a23366046..ff7a217f2 100644 --- a/modules/arena/configure.go +++ b/modules/arena/configure.go @@ -21,6 +21,8 @@ const ( game_monster = "game_monster.json" //怪物表 game_arenaactiveking = "game_arenaactiveking.json" //王者之上奖励 game_arenaweeklytask = "game_arenaweeklytask.json" //奖励 + + game_arenaactivewin = "game_arenaactivewin.json" //连击奖励 ) ///竞技场配置管理组件 diff --git a/modules/arena/modelarena.go b/modules/arena/modelarena.go index c7debc872..781d10ad3 100644 --- a/modules/arena/modelarena.go +++ b/modules/arena/modelarena.go @@ -186,6 +186,7 @@ func (this *modelArena) updateArenaUserInfo(info *pb.DBArenaUser) (err error) { "danaward": info.Danaward, "maxdan": info.Maxdan, "weekaward": info.Weekaward, + "prededuction": info.Prededuction, }) return } @@ -408,13 +409,13 @@ func (this *modelArena) integralCompute(red, bule *pb.ArenaPlayer, iswin bool) { } if iswin { 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))) + red.Integral = red.Integral + red.Changeintegral bule.Integral = bule.Integral + bule.Changeintegral } else { 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))) + red.Integral = red.Integral + red.Changeintegral bule.Integral = bule.Integral + bule.Changeintegral } } diff --git a/pb/arena_msg.pb.go b/pb/arena_msg.pb.go index a82ca9f4e..daa9eec98 100644 --- a/pb/arena_msg.pb.go +++ b/pb/arena_msg.pb.go @@ -504,10 +504,11 @@ type ArenaChallengeReq struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Playerid string `protobuf:"bytes,1,opt,name=playerid,proto3" json:"playerid"` - Isai bool `protobuf:"varint,2,opt,name=isai,proto3" json:"isai"` //是否是ai - MformatId int32 `protobuf:"varint,3,opt,name=mformatId,proto3" json:"mformatId"` // AIId - Battle *BattleFormation `protobuf:"bytes,4,opt,name=battle,proto3" json:"battle"` //战斗类型 + Playerid string `protobuf:"bytes,1,opt,name=playerid,proto3" json:"playerid"` + Isai bool `protobuf:"varint,2,opt,name=isai,proto3" json:"isai"` //是否是ai + Aiintegral int32 `protobuf:"varint,3,opt,name=aiintegral,proto3" json:"aiintegral"` // ai 积分 + 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() { @@ -556,6 +557,13 @@ func (x *ArenaChallengeReq) GetIsai() bool { return false } +func (x *ArenaChallengeReq) GetAiintegral() int32 { + if x != nil { + return x.Aiintegral + } + return 0 +} + func (x *ArenaChallengeReq) GetMformatId() int32 { if x != nil { 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, 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, - 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, 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, - 0x61, 0x69, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x04, 0x69, 0x73, 0x61, 0x69, 0x12, 0x1c, - 0x0a, 0x09, 0x6d, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x49, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, + 0x61, 0x69, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x04, 0x69, 0x73, 0x61, 0x69, 0x12, 0x1e, + 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, - 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, 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, diff --git a/pb/integral_msg.pb.go b/pb/integral_msg.pb.go index 4a78144e9..b919a53b8 100644 --- a/pb/integral_msg.pb.go +++ b/pb/integral_msg.pb.go @@ -499,8 +499,7 @@ type IntegralRankListResp struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Ranks []*DBIntegralRank `protobuf:"bytes,1,rep,name=ranks,proto3" json:"ranks"` - Friends []*DBIntegralRank `protobuf:"bytes,2,rep,name=friends,proto3" json:"friends"` + Ranks []*DBIntegralRank `protobuf:"bytes,1,rep,name=ranks,proto3" json:"ranks"` // repeated DBIntegralRank friends = 2; } func (x *IntegralRankListResp) Reset() { @@ -542,13 +541,6 @@ func (x *IntegralRankListResp) GetRanks() []*DBIntegralRank { return nil } -func (x *IntegralRankListResp) GetFriends() []*DBIntegralRank { - if x != nil { - return x.Friends - } - return nil -} - // 领取成就 type IntegralGetAchieveReq struct { 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, 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, - 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, 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, - 0x29, 0x0a, 0x07, 0x66, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, - 0x32, 0x0f, 0x2e, 0x44, 0x42, 0x49, 0x6e, 0x74, 0x65, 0x67, 0x72, 0x61, 0x6c, 0x52, 0x61, 0x6e, - 0x6b, 0x52, 0x07, 0x66, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x73, 0x22, 0x27, 0x0a, 0x15, 0x49, 0x6e, - 0x74, 0x65, 0x67, 0x72, 0x61, 0x6c, 0x47, 0x65, 0x74, 0x41, 0x63, 0x68, 0x69, 0x65, 0x76, 0x65, - 0x52, 0x65, 0x71, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, - 0x02, 0x69, 0x64, 0x22, 0x49, 0x0a, 0x16, 0x49, 0x6e, 0x74, 0x65, 0x67, 0x72, 0x61, 0x6c, 0x47, - 0x65, 0x74, 0x41, 0x63, 0x68, 0x69, 0x65, 0x76, 0x65, 0x52, 0x65, 0x73, 0x70, 0x12, 0x0e, 0x0a, - 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x02, 0x69, 0x64, 0x12, 0x1f, 0x0a, - 0x05, 0x61, 0x77, 0x61, 0x72, 0x64, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x09, 0x2e, 0x55, - 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, + 0x67, 0x72, 0x61, 0x6c, 0x52, 0x61, 0x6e, 0x6b, 0x52, 0x05, 0x72, 0x61, 0x6e, 0x6b, 0x73, 0x22, + 0x27, 0x0a, 0x15, 0x49, 0x6e, 0x74, 0x65, 0x67, 0x72, 0x61, 0x6c, 0x47, 0x65, 0x74, 0x41, 0x63, + 0x68, 0x69, 0x65, 0x76, 0x65, 0x52, 0x65, 0x71, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x05, 0x52, 0x02, 0x69, 0x64, 0x22, 0x49, 0x0a, 0x16, 0x49, 0x6e, 0x74, 0x65, + 0x67, 0x72, 0x61, 0x6c, 0x47, 0x65, 0x74, 0x41, 0x63, 0x68, 0x69, 0x65, 0x76, 0x65, 0x52, 0x65, + 0x73, 0x70, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x02, + 0x69, 0x64, 0x12, 0x1f, 0x0a, 0x05, 0x61, 0x77, 0x61, 0x72, 0x64, 0x18, 0x02, 0x20, 0x03, 0x28, + 0x0b, 0x32, 0x09, 0x2e, 0x55, 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 ( @@ -771,13 +761,12 @@ var file_integral_integral_msg_proto_depIdxs = []int32{ 13, // 7: IntegralGetRewardResp.data:type_name -> DBIntegralBoss 17, // 8: IntegralGetRewardResp.award:type_name -> UserAtno 18, // 9: IntegralRankListResp.ranks:type_name -> DBIntegralRank - 18, // 10: IntegralRankListResp.friends:type_name -> DBIntegralRank - 17, // 11: IntegralGetAchieveResp.award:type_name -> UserAtno - 12, // [12:12] is the sub-list for method output_type - 12, // [12:12] is the sub-list for method input_type - 12, // [12:12] is the sub-list for extension type_name - 12, // [12:12] is the sub-list for extension extendee - 0, // [0:12] is the sub-list for field type_name + 17, // 10: IntegralGetAchieveResp.award:type_name -> UserAtno + 11, // [11:11] is the sub-list for method output_type + 11, // [11:11] is the sub-list for method input_type + 11, // [11:11] is the sub-list for extension type_name + 11, // [11:11] is the sub-list for extension extendee + 0, // [0:11] is the sub-list for field type_name } func init() { file_integral_integral_msg_proto_init() }