Class World.Respawn

java.lang.Object
handling.world.World.Respawn
All Implemented Interfaces:
Runnable
Enclosing class:
World

public static class World.Respawn extends Object implements Runnable
負責一組頻道之定時重生/維護的 Runnable 任務。

World.registerRespawn() 建立並交給 Timer.WorldTimer 週期執行;每次 run() 遍歷所屬頻道的所有地圖, 處理怪物重生、地上物到期、玩家冷卻與狀態回復等(透過 World.handleMap(MapleMap, int, int, long)World.handleCooldowns(MapleCharacter, int, boolean, long))。 每執行緒固定負責至多 CHANNELS_PER_THREAD 個頻道。

  • Constructor Summary

    Constructors
    Constructor
    Description
    Respawn(Integer[] chs, int c)
    建立一個重生任務,綁定從偏移處起算的最多 CHANNELS_PER_THREAD 個頻道。
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    run()
    對所屬各頻道的全部地圖執行一輪重生/維護處理。

    Methods inherited from class Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • Respawn

      public Respawn(Integer[] chs, int c)
      建立一個重生任務,綁定從偏移處起算的最多 CHANNELS_PER_THREAD 個頻道。

      chs 中第 c+1 個頻道起,連續取至多 3 個 ChannelServer 納入此任務,並記錄一行已註冊頻道的中文日誌。

      Parameters:
      chs - 全頻道編號陣列
      c - 起始偏移(此任務負責 c+1 起算的頻道)
  • Method Details