Class SpawnPoint
java.lang.Object
server.life.Spawns
server.life.SpawnPoint
一般怪物出怪點,持有位置、重生計時與嘉年華設定,並負責實際生成
MapleMonster。
繼承 Spawns,封裝從地圖資料讀取的固定出怪位置、mobTime(重生間隔毫秒)、
嘉年華隊伍設定,以及 AtomicInteger 計數器,
確保地圖上同一出怪點最多同時存在兩隻(固定點或帶 mobTime 者限一隻)怪物。
spawnMonster(MapleMap) 建立 MapleMonster、設定座標與陣營,
透過匿名 MonsterListener 在怪物死亡時更新 nextPossibleSpawn 並遞減計數器;
若為嘉年華地圖,亦套用守衛技能(MapleCarnivalFactory.MCSkill)。
由 MapleMonsterSpawnManager 管理並在地圖計時器觸發時呼叫
shouldSpawn(long) 判斷是否到達下次可出怪時間。
-
Constructor Summary
ConstructorsConstructorDescriptionSpawnPoint(MapleMonster monster, Point pos, int mobTime, byte carnivalTeam, String msg) -
Method Summary
Modifier and TypeMethodDescriptionfinal intfinal bytefinal intgetF()final intgetFh()final intfinal MapleMonsterStatsfinal Pointfinal voidsetCarnival(int c) final voidsetLevel(int c) final booleanshouldSpawn(long time) final MapleMonsterspawnMonster(MapleMap map)
-
Constructor Details
-
SpawnPoint
-
-
Method Details
-
setCarnival
public final void setCarnival(int c) -
setLevel
public final void setLevel(int c) -
getF
-
getFh
-
getPosition
- Specified by:
getPositionin classSpawns
-
getMonster
- Specified by:
getMonsterin classSpawns
-
getCarnivalTeam
public final byte getCarnivalTeam()- Specified by:
getCarnivalTeamin classSpawns
-
getCarnivalId
public final int getCarnivalId()- Specified by:
getCarnivalIdin classSpawns
-
shouldSpawn
public final boolean shouldSpawn(long time) - Specified by:
shouldSpawnin classSpawns
-
spawnMonster
- Specified by:
spawnMonsterin classSpawns
-
getMobTime
public final int getMobTime()- Specified by:
getMobTimein classSpawns
-