forked from 2009Scape/Server
Slight bugfix with random event manager
This commit is contained in:
parent
46a300a900
commit
1ddf01c098
1 changed files with 5 additions and 0 deletions
|
|
@ -17,10 +17,15 @@ class RandomEventManager(val player: Player) {
|
|||
|
||||
fun fireEvent(){
|
||||
if(player.zoneMonitor.isRestricted(ZoneRestriction.RANDOM_EVENTS)){
|
||||
nextSpawn = GameWorld.ticks + 3000
|
||||
return
|
||||
}
|
||||
val ame = RandomEvents.values().random()
|
||||
event = ame.npc.create(player,ame.loot,ame.type)
|
||||
if(event!!.spawnLocation == null){
|
||||
nextSpawn = GameWorld.ticks + 3000
|
||||
return
|
||||
}
|
||||
event!!.init()
|
||||
nextSpawn = GameWorld.ticks + DELAY_TICKS
|
||||
SystemLogger.logRE("Fired ${event!!.name} for ${player.username}")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue