70 lines
2.5 KiB
Go
70 lines
2.5 KiB
Go
package logic
|
|
|
|
//type PlayerCopyPassed struct {
|
|
// SceneId uint32 `bson:"scene_id" key:"1"`
|
|
// TotalNum uint32 `bson:"total_num"`
|
|
//}
|
|
//
|
|
//func (this *Player) PassedCopy(sceneTable *data.Scene, duration int64, maxDepth uint32, maxScore int32) (uint32, error) {
|
|
// var passed = this.CopyPassed[uint32(sceneTable.Id)]
|
|
// if passed == nil {
|
|
// passed = &PlayerCopyPassed{SceneId: uint32(sceneTable.Id)}
|
|
// this.CopyPassed[passed.SceneId] = passed
|
|
// }
|
|
//
|
|
// var copyRank uint32
|
|
// switch proto.CopyType(sceneTable.CopyType) {
|
|
// case proto.CopyTypeMainline:
|
|
// var copyChapterTable = this.manager.tables.CopyChapterExtend.Get(sceneTable.Id)
|
|
// if copyChapterTable == nil {
|
|
// this.manager.logger.Error("Data error, CopyChapter not found, sceneId: ", sceneTable.Id)
|
|
// return 0, proto.ErrDataTablesError
|
|
// }
|
|
// copyRank = this.PassedCopyMainline(copyChapterTable, duration, maxDepth, maxScore)
|
|
//
|
|
// this.copyStorePoolUnlock(uint32(sceneTable.Id), util.Unix())
|
|
// this.chapterBattlePassLevelUnlock(uint32(sceneTable.Id))
|
|
// case proto.CopyTypeMaterial:
|
|
// var copyMaterialTable = this.manager.tables.CopyMaterialExtend.Get(sceneTable.Id)
|
|
// if copyMaterialTable == nil {
|
|
// this.manager.logger.Error("Data error, CopyMaterial not found, sceneId: ", sceneTable.Id)
|
|
// return 0, proto.ErrDataTablesError
|
|
// }
|
|
//
|
|
// this.AddCounter(proto.CounterTypeCopyMaterial, uint32(copyMaterialTable.MaterialType), 1)
|
|
//
|
|
// copyRank = this.PassedCopyMaterial(copyMaterialTable, duration, maxDepth, maxScore)
|
|
// case proto.CopyTypeReserve:
|
|
// //暂时保留
|
|
// case proto.CopyTypeSpeed:
|
|
// var copySpeedTable = this.manager.tables.CopySpeedExtend.Get(sceneTable.Id)
|
|
// if copySpeedTable == nil {
|
|
// this.manager.logger.Error("Data error, CopySpeed not found, sceneId: ", sceneTable.Id)
|
|
// return 0, proto.ErrDataTablesError
|
|
// }
|
|
//
|
|
// this.AddCounter(proto.CounterTypeCopySpeed, uint32(copySpeedTable.CopyType), 1)
|
|
//
|
|
// copyRank = this.PassedCopySpeed(copySpeedTable, duration, maxDepth, maxScore)
|
|
// }
|
|
//
|
|
// passed.TotalNum += 1
|
|
//
|
|
// this.SaveModel(passed)
|
|
//
|
|
// this.CheckTask(proto.TaskSection1PassSpecificScene, sceneTable.Id, 1)
|
|
// this.CheckTask(proto.TaskSection1PassAnyScene, 0, 1)
|
|
// this.CheckTask(proto.TaskSection1PassedClassifyCopies, sceneTable.CopyType, 1)
|
|
//
|
|
// this.CheckAchievement(proto.AchievementTypePassedCopyTimes, uint32(sceneTable.CopyType), 1)
|
|
// return copyRank, nil
|
|
//}
|
|
//
|
|
//func (this *Player) GetCopyPassedNum(sceneId uint32) uint32 {
|
|
// var passed = this.CopyPassed[sceneId]
|
|
// if passed == nil {
|
|
// return 0
|
|
// }
|
|
// return passed.TotalNum
|
|
//}
|