Class SpawnPointAreaBoss
java.lang.Object
server.life.Spawns
server.life.SpawnPointAreaBoss
區域 Boss 的出怪點,在三個候選位置之一隨機生成 Boss,並以
AtomicBoolean 確保同時只有一隻存活。
繼承 Spawns,與 SpawnPoint 的主要差異在於:
- 持有
pos1/pos2/pos3三個候選座標,getPosition()以Randomizer隨機選取其一。 - 以
AtomicBoolean spawned取代計數器,Boss 死亡前不允許重生。 - 建構時可透過
shouldSpawn旗標決定是否立即安排出怪或先等待一個完整間隔。
Boss 死亡後透過匿名 MonsterListener 重設 nextPossibleSpawn 並清除
spawned 旗標;地圖廣播訊息由 CWvsContext.serverNotice(int, String) 組裝。
由 MapleMonsterSpawnManager 管理。
-
Constructor Summary
ConstructorsConstructorDescriptionSpawnPointAreaBoss(MapleMonster monster, Point pos1, Point pos2, Point pos3, int mobTime, String msg, boolean shouldSpawn) -
Method Summary
Modifier and TypeMethodDescriptionfinal intfinal bytefinal intgetF()final intgetFh()final intfinal MapleMonsterStatsfinal Pointfinal booleanshouldSpawn(long time) final MapleMonsterspawnMonster(MapleMap map)
-
Constructor Details
-
SpawnPointAreaBoss
public SpawnPointAreaBoss(MapleMonster monster, Point pos1, Point pos2, Point pos3, int mobTime, String msg, boolean shouldSpawn)
-
-
Method Details
-
getF
-
getFh
-
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
-
getPosition
- Specified by:
getPositionin classSpawns
-
spawnMonster
- Specified by:
spawnMonsterin classSpawns
-
getMobTime
public final int getMobTime()- Specified by:
getMobTimein classSpawns
-