Merge branch 'dev' of http://git.legu.cc/liwei_3d/go_dreamfactory into dev
This commit is contained in:
commit
d80f4178fe
@ -1268,9 +1268,6 @@ func (this *modelBattleComp) createAddDebuffPve(session comm.IUserSession, stag
|
||||
if record.Redflist[0].Team[i], errdata = this.createBattleRole(heros[i], user.Passonlv, tid, i); errdata != nil {
|
||||
return
|
||||
}
|
||||
} else {
|
||||
record.Redflist[0].Team[i] = nil
|
||||
}
|
||||
sz := make([]*pb.DySkillData, 0)
|
||||
for _, key := range webuff {
|
||||
sz = append(sz, &pb.DySkillData{
|
||||
@ -1280,6 +1277,10 @@ func (this *modelBattleComp) createAddDebuffPve(session comm.IUserSession, stag
|
||||
})
|
||||
}
|
||||
record.Redflist[0].Team[i].BattleBeforeSkill = append(record.Redflist[0].Team[i].BattleBeforeSkill, sz...)
|
||||
} else {
|
||||
record.Redflist[0].Team[i] = nil
|
||||
}
|
||||
|
||||
}
|
||||
//好友的英雄阵营
|
||||
for i, v := range req.Format.Friendformat {
|
||||
|
@ -153,6 +153,17 @@ func (this *apiComp) ChallengeOver(session comm.IUserSession, req *pb.IntegralCh
|
||||
Buff: req.Report.Info.Buffer,
|
||||
}
|
||||
update["carrybuff"] = list.Carrybuff
|
||||
var user *pb.DBUser
|
||||
if user, err = this.module.GetUserForSession(session); err != nil {
|
||||
errdata = &pb.ErrorData{
|
||||
Code: pb.ErrorCode_DBError,
|
||||
Message: err.Error(),
|
||||
}
|
||||
return
|
||||
}
|
||||
list.Uinfo = comm.GetUserBaseInfo(user)
|
||||
update["uinfo"] = list.Uinfo
|
||||
// 更新base
|
||||
if err = this.module.modelIntegral.modifyIntegralData(session.GetUserId(), update); err != nil {
|
||||
errdata = &pb.ErrorData{
|
||||
Code: pb.ErrorCode_DBError,
|
||||
|
@ -18,9 +18,7 @@ func (this *apiComp) RankList(session comm.IUserSession, req *pb.IntegralRankLis
|
||||
ranks []*pb.DBIntegralBoss
|
||||
// franks []*pb.DBIntegralBoss
|
||||
players []*pb.DBIntegralRank
|
||||
myself *pb.DBIntegralRank
|
||||
err error
|
||||
bInRank bool // 自己是否入榜
|
||||
)
|
||||
|
||||
if errdata = this.RankListCheck(session, req); errdata != nil {
|
||||
@ -35,15 +33,6 @@ func (this *apiComp) RankList(session comm.IUserSession, req *pb.IntegralRankLis
|
||||
}
|
||||
return
|
||||
}
|
||||
for _, v := range uids {
|
||||
if v == session.GetUserId() {
|
||||
bInRank = true
|
||||
break
|
||||
}
|
||||
}
|
||||
if !bInRank {
|
||||
uids = append(uids, session.GetUserId())
|
||||
}
|
||||
|
||||
if ranks, err = this.module.modelIntegral.queryPlayers(uids); err != nil {
|
||||
errdata = &pb.ErrorData{
|
||||
@ -55,10 +44,6 @@ func (this *apiComp) RankList(session comm.IUserSession, req *pb.IntegralRankLis
|
||||
}
|
||||
players = make([]*pb.DBIntegralRank, len(ranks))
|
||||
for i, v := range ranks {
|
||||
if !bInRank { // 没入榜
|
||||
if v.Uid == session.GetUserId() {
|
||||
myself = players[i]
|
||||
} else {
|
||||
players[i] = &pb.DBIntegralRank{
|
||||
Id: v.Uid,
|
||||
Uinfo: v.Uinfo,
|
||||
@ -68,20 +53,6 @@ func (this *apiComp) RankList(session comm.IUserSession, req *pb.IntegralRankLis
|
||||
Buff: v.Carrybuff[req.Nandu].Buff,
|
||||
}
|
||||
}
|
||||
} else { // 入榜了
|
||||
if v.Uid == session.GetUserId() {
|
||||
myself = players[i]
|
||||
}
|
||||
players[i] = &pb.DBIntegralRank{
|
||||
Id: v.Uid,
|
||||
Uinfo: v.Uinfo,
|
||||
Nandu: v.Nandu,
|
||||
Score: v.Score[req.Nandu],
|
||||
Line: v.Line[req.Nandu],
|
||||
Buff: v.Carrybuff[req.Nandu].Buff,
|
||||
}
|
||||
}
|
||||
}
|
||||
// // 获取好友
|
||||
// fids := this.module.ModuleFriend.GetFriendList(session.GetUserId())
|
||||
// if franks, err = this.module.modelIntegral.queryPlayers(fids); err != nil {
|
||||
@ -104,7 +75,6 @@ func (this *apiComp) RankList(session comm.IUserSession, req *pb.IntegralRankLis
|
||||
// }
|
||||
session.SendMsg(string(this.module.GetType()), "ranklist", &pb.IntegralRankListResp{
|
||||
Ranks: players,
|
||||
Myself: myself,
|
||||
})
|
||||
return
|
||||
}
|
||||
|
@ -56,6 +56,11 @@ func (this *modelIntegral) getIntegralList(session comm.IUserSession) (result *p
|
||||
Carrybuff: map[int32]*pb.FreightBuff{},
|
||||
}
|
||||
if err = this.Get(uid, result); mgo.MongodbNil == err {
|
||||
var user *pb.DBUser
|
||||
user, err = this.module.GetUserForSession(session)
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
result.Id = primitive.NewObjectID().Hex()
|
||||
result.Uid = uid
|
||||
result.Buff = make(map[int32]int32)
|
||||
@ -63,6 +68,7 @@ func (this *modelIntegral) getIntegralList(session comm.IUserSession) (result *p
|
||||
result.Line = make(map[int32]*pb.LineData, 0)
|
||||
result.Achieve = make(map[int32]int32) // 初始化成就
|
||||
result.Carrybuff = make(map[int32]*pb.FreightBuff) // 初始化成就
|
||||
result.Uinfo = comm.GetUserBaseInfo(user)
|
||||
// 获取当前的hid
|
||||
curTime := configure.Now().Unix()
|
||||
szConf := this.module.configure.GetIntegralITime()
|
||||
|
@ -208,7 +208,7 @@ type FreightBuff struct {
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
Buff []int32 `protobuf:"varint,6,rep,packed,name=buff,proto3" json:"buff"`
|
||||
Buff []int32 `protobuf:"varint,1,rep,packed,name=buff,proto3" json:"buff"`
|
||||
}
|
||||
|
||||
func (x *FreightBuff) Reset() {
|
||||
@ -403,7 +403,7 @@ var file_integral_integral_db_proto_rawDesc = []byte{
|
||||
0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0c, 0x2e, 0x46, 0x72, 0x65, 0x69, 0x67, 0x68,
|
||||
0x74, 0x42, 0x75, 0x66, 0x66, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01,
|
||||
0x22, 0x21, 0x0a, 0x0b, 0x46, 0x72, 0x65, 0x69, 0x67, 0x68, 0x74, 0x42, 0x75, 0x66, 0x66, 0x12,
|
||||
0x12, 0x0a, 0x04, 0x62, 0x75, 0x66, 0x66, 0x18, 0x06, 0x20, 0x03, 0x28, 0x05, 0x52, 0x04, 0x62,
|
||||
0x12, 0x0a, 0x04, 0x62, 0x75, 0x66, 0x66, 0x18, 0x01, 0x20, 0x03, 0x28, 0x05, 0x52, 0x04, 0x62,
|
||||
0x75, 0x66, 0x66, 0x22, 0xa4, 0x01, 0x0a, 0x0e, 0x44, 0x42, 0x49, 0x6e, 0x74, 0x65, 0x67, 0x72,
|
||||
0x61, 0x6c, 0x52, 0x61, 0x6e, 0x6b, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01,
|
||||
0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x23, 0x0a, 0x05, 0x75, 0x69, 0x6e, 0x66, 0x6f, 0x18,
|
||||
|
@ -499,9 +499,7 @@ type IntegralRankListResp struct {
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
Ranks []*DBIntegralRank `protobuf:"bytes,1,rep,name=ranks,proto3" json:"ranks"`
|
||||
// repeated DBIntegralRank friends = 2;
|
||||
Myself *DBIntegralRank `protobuf:"bytes,2,opt,name=myself,proto3" json:"myself"` // 我自己的数据
|
||||
Ranks []*DBIntegralRank `protobuf:"bytes,1,rep,name=ranks,proto3" json:"ranks"` // repeated DBIntegralRank friends = 2;
|
||||
}
|
||||
|
||||
func (x *IntegralRankListResp) Reset() {
|
||||
@ -543,13 +541,6 @@ func (x *IntegralRankListResp) GetRanks() []*DBIntegralRank {
|
||||
return nil
|
||||
}
|
||||
|
||||
func (x *IntegralRankListResp) GetMyself() *DBIntegralRank {
|
||||
if x != nil {
|
||||
return x.Myself
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
// 领取成就
|
||||
type IntegralGetAchieveReq struct {
|
||||
state protoimpl.MessageState
|
||||
@ -710,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, 0x66, 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,
|
||||
0x27, 0x0a, 0x06, 0x6d, 0x79, 0x73, 0x65, 0x6c, 0x66, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32,
|
||||
0x0f, 0x2e, 0x44, 0x42, 0x49, 0x6e, 0x74, 0x65, 0x67, 0x72, 0x61, 0x6c, 0x52, 0x61, 0x6e, 0x6b,
|
||||
0x52, 0x06, 0x6d, 0x79, 0x73, 0x65, 0x6c, 0x66, 0x22, 0x27, 0x0a, 0x15, 0x49, 0x6e, 0x74, 0x65,
|
||||
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,
|
||||
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,
|
||||
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 (
|
||||
@ -772,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.myself: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() }
|
||||
|
Loading…
Reference in New Issue
Block a user