43 lines
1.2 KiB
Go
43 lines
1.2 KiB
Go
package logic
|
|
|
|
//func (this *Player) CheckFunctionOpen1(gridType, gridId uint32) error {
|
|
// var open1Tables = this.manager.tables.FunctionOpen1Extend.List(int(gridType), int(gridId))
|
|
// if open1Tables == nil {
|
|
// return nil
|
|
// }
|
|
//
|
|
// for _, open1Table := range open1Tables {
|
|
// switch open1Table.LockType {
|
|
// case 0:
|
|
// return nil
|
|
// case 1:
|
|
// var copyStatus = this.GetCopyStatus(proto.CopyTypeMainline, 0, 0, 0)
|
|
// if copyStatus != nil && copyStatus.IndexId >= uint32(open1Table.LockArg1) {
|
|
// return nil
|
|
// }
|
|
// case 2:
|
|
// if this.GetCounterTotal(proto.CounterTypeCharge, uint32(open1Table.LockArg1)) > 0 {
|
|
// return nil
|
|
// }
|
|
// case 3:
|
|
// var task = this.Task[uint32(open1Table.LockArg1)]
|
|
// if task == nil {
|
|
// if this.GetCounterTotal(proto.CounterTypeTaskCompleted, uint32(open1Table.LockArg1)) > 0 {
|
|
// return nil
|
|
// }
|
|
// } else {
|
|
// if proto.TaskStatus(task.Status) >= proto.TaskStatusCompleted {
|
|
// return nil
|
|
// }
|
|
// }
|
|
// case 4:
|
|
// if this.GetCounterTotal(proto.CounterTypeFunctionOpen1, util.Compose2uint16(uint16(gridType), uint16(gridId))) > 0 {
|
|
// return nil
|
|
// }
|
|
// default:
|
|
// return proto.ErrDataTablesError
|
|
// }
|
|
// }
|
|
// return proto.ErrFunctionNotUnlocked
|
|
//}
|