30 lines
1.4 KiB
Go
30 lines
1.4 KiB
Go
package logic
|
|
|
|
//func rigAttrsCapacity(attrs proto.Attrs, attributeConfigTables []*data.AttributeConfig) uint64 {
|
|
//
|
|
// attrs[proto.AttrTypeEnergy] = attrs[proto.AttrTypeEnergy] * (1.0 + attrs[proto.AttrTypeEnergyRate]*proto.AttrRateIn)
|
|
// attrs[proto.AttrTypeMoveSpeed] = attrs[proto.AttrTypeMoveSpeed] * (1.0 + attrs[proto.AttrTypeMoveSpeedRate]*proto.AttrRateIn)
|
|
// attrs[proto.AttrTypeAttackSpeed] = attrs[proto.AttrTypeAttackSpeed] * (1.0 + attrs[proto.AttrTypeAttackSpeedRate]*proto.AttrRateIn)
|
|
// attrs[proto.AttrTypeAttack] = attrs[proto.AttrTypeAttack] * (1.0 + attrs[proto.AttrTypeAttackRate]*proto.AttrRateIn)
|
|
// attrs[proto.AttrTypeAccelerateEnergy] = attrs[proto.AttrTypeAccelerateEnergy] * (1.0 + attrs[proto.AttrTypeAccelerateEnergyRate]*proto.AttrRateIn)
|
|
//
|
|
// attrs[proto.AttrTypeEnergyRate] = 0
|
|
// attrs[proto.AttrTypeMoveSpeedRate] = 0
|
|
// attrs[proto.AttrTypeAttackSpeedRate] = 0
|
|
// attrs[proto.AttrTypeAttackRate] = 0
|
|
// attrs[proto.AttrTypeAccelerateEnergyRate] = 0
|
|
//
|
|
// var capacity float64
|
|
// for _, attributeConfigTable := range attributeConfigTables {
|
|
// if attributeConfigTable.Id > 0 && attributeConfigTable.Id <= proto.AttrNum {
|
|
// var attrType = attributeConfigTable.Id - 1
|
|
// if attributeConfigTable.Combat <= 0 || attrs[attrType] <= 0 {
|
|
// continue
|
|
// }
|
|
// capacity += attrs[attrType] * float64(attributeConfigTable.Combat)
|
|
// }
|
|
// }
|
|
//
|
|
// return uint64(util.Round(capacity, 0))
|
|
//}
|