hxp
2024-08-31 350137e48a88e5a19588434edd8e78860d90647f
10130 【后端】福地争夺资源功能(剩余时间为0报错防范;)
1个文件已修改
3 ■■■■■ 已修改文件
ServerPython/CoreServerGroup/GameServer/Script/GameWorldLogic/GameWorldMineArea.py 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ServerPython/CoreServerGroup/GameServer/Script/GameWorldLogic/GameWorldMineArea.py
@@ -530,6 +530,9 @@
        battleRatio = workerBattleRatioList[len(workerBattleRatioList) - 1] if batWorkerCount > len(workerBattleRatioList) else workerBattleRatioList[batWorkerCount - 1]
        
    needSeconds = int(dist * itemWeight * baseTime * workRatio * battleRatio) # 还需工作时长,秒
    if needSeconds <= 0:
        return 0, 0
    moveSpeed = dist / float(needSeconds) # 移动速度  x格/秒
    needHms = "%02d:%02d:%02d" % (needSeconds / 3600, needSeconds % 3600 / 60, needSeconds % 60)