Slight bugfix with random event manager
This commit is contained in:
@@ -17,10 +17,15 @@ class RandomEventManager(val player: Player) {
|
|||||||
|
|
||||||
fun fireEvent(){
|
fun fireEvent(){
|
||||||
if(player.zoneMonitor.isRestricted(ZoneRestriction.RANDOM_EVENTS)){
|
if(player.zoneMonitor.isRestricted(ZoneRestriction.RANDOM_EVENTS)){
|
||||||
|
nextSpawn = GameWorld.ticks + 3000
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
val ame = RandomEvents.values().random()
|
val ame = RandomEvents.values().random()
|
||||||
event = ame.npc.create(player,ame.loot,ame.type)
|
event = ame.npc.create(player,ame.loot,ame.type)
|
||||||
|
if(event!!.spawnLocation == null){
|
||||||
|
nextSpawn = GameWorld.ticks + 3000
|
||||||
|
return
|
||||||
|
}
|
||||||
event!!.init()
|
event!!.init()
|
||||||
nextSpawn = GameWorld.ticks + DELAY_TICKS
|
nextSpawn = GameWorld.ticks + DELAY_TICKS
|
||||||
SystemLogger.logRE("Fired ${event!!.name} for ${player.username}")
|
SystemLogger.logRE("Fired ${event!!.name} for ${player.username}")
|
||||||
|
|||||||
Reference in New Issue
Block a user