战斗记录
This commit is contained in:
parent
d60039220d
commit
22bcc92e0d
@ -238,7 +238,7 @@ func (this *apiComp) ChallengeOver(session comm.IUserSession, req *pb.PlunderCha
|
|||||||
Cid: list.Source[req.Index],
|
Cid: list.Source[req.Index],
|
||||||
Ctime: configure.Now().Unix() + int64(conf.Extime),
|
Ctime: configure.Now().Unix() + int64(conf.Extime),
|
||||||
})
|
})
|
||||||
err = this.module.modelRecord.AddRecordData(session.GetUserId(), info)
|
err = this.module.modelRecord.AddRecordData(land.Id, info)
|
||||||
go this.module.AsynHandleSession(session.Clone(), func(session comm.IUserSession) {
|
go this.module.AsynHandleSession(session.Clone(), func(session comm.IUserSession) {
|
||||||
this.module.WriteUserLog(session.GetUserId(), req, comm.GMResAddType, "PlunderChallengeOverReq", atno)
|
this.module.WriteUserLog(session.GetUserId(), req, comm.GMResAddType, "PlunderChallengeOverReq", atno)
|
||||||
})
|
})
|
||||||
|
@ -107,7 +107,7 @@ func (this *apiComp) PvpChallengeOver(session comm.IUserSession, req *pb.Plunder
|
|||||||
Cid: land.Ship[req.Oid].Line.Cid,
|
Cid: land.Ship[req.Oid].Line.Cid,
|
||||||
Ctime: configure.Now().Unix(),
|
Ctime: configure.Now().Unix(),
|
||||||
})
|
})
|
||||||
err = this.module.modelRecord.AddRecordData(session.GetUserId(), info)
|
err = this.module.modelRecord.AddRecordData(land.Id, info)
|
||||||
|
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
@ -146,6 +146,6 @@ func (this *apiComp) PvpChallengeOver(session comm.IUserSession, req *pb.Plunder
|
|||||||
Cid: land.Ship[req.Oid].Line.Cid,
|
Cid: land.Ship[req.Oid].Line.Cid,
|
||||||
Ctime: configure.Now().Unix(),
|
Ctime: configure.Now().Unix(),
|
||||||
})
|
})
|
||||||
err = this.module.modelRecord.AddRecordData(session.GetUserId(), info)
|
err = this.module.modelRecord.AddRecordData(land.Id, info)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
@ -37,7 +37,7 @@ func (this *modelRecord) changePlunderRecordData(id string, update map[string]in
|
|||||||
|
|
||||||
// 新增一条记录
|
// 新增一条记录
|
||||||
func (this *modelRecord) AddRecordData(id string, info []*pb.PlunderRecordData) (err error) {
|
func (this *modelRecord) AddRecordData(id string, info []*pb.PlunderRecordData) (err error) {
|
||||||
if record, err := this.getPlunderRecordData(id); err != nil {
|
if record, err := this.getPlunderRecordData(id); err == nil {
|
||||||
record.Data = append(record.Data, info...)
|
record.Data = append(record.Data, info...)
|
||||||
err = this.changePlunderRecordData(id, map[string]interface{}{"data": record.Data})
|
err = this.changePlunderRecordData(id, map[string]interface{}{"data": record.Data})
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user