Implemented Gaze of Saradomin
Fixed respawn bugs
This commit is contained in:
@@ -326,10 +326,8 @@ public class Player extends Entity {
|
||||
|
||||
@Override
|
||||
public void init() {
|
||||
if(!artificial)
|
||||
log(this.getClass(), Log.INFO, getUsername() + " initialising...");
|
||||
if (!artificial) {
|
||||
getProperties().setSpawnLocation(ServerConstants.HOME_LOCATION);
|
||||
log(this.getClass(), Log.INFO, getUsername() + " initialising...");
|
||||
getDetails().getSession().setObject(this);
|
||||
}
|
||||
super.init();
|
||||
|
||||
@@ -1,11 +1,12 @@
|
||||
package core.game.node.entity.player.info.login
|
||||
|
||||
import core.ServerConstants
|
||||
import core.api.*
|
||||
import core.auth.AuthResponse
|
||||
import core.game.node.entity.player.Player
|
||||
import core.game.node.entity.player.info.PlayerDetails
|
||||
import core.game.system.SystemManager
|
||||
import core.game.system.task.Pulse
|
||||
import core.auth.AuthResponse
|
||||
import core.game.world.GameWorld
|
||||
import core.game.world.GameWorld.loginListeners
|
||||
import core.game.world.repository.Repository
|
||||
@@ -27,8 +28,7 @@ class LoginParser(val details: PlayerDetails) {
|
||||
parser = PlayerParser.parse(player)
|
||||
?: throw IllegalStateException("Failed parsing save for: " + player.username) //Parse core
|
||||
}
|
||||
catch (e: Exception)
|
||||
{
|
||||
catch (e: Exception) {
|
||||
e.printStackTrace()
|
||||
Repository.removePlayer(player)
|
||||
flag(AuthResponse.ErrorLoadingProfile)
|
||||
@@ -37,6 +37,7 @@ class LoginParser(val details: PlayerDetails) {
|
||||
override fun pulse(): Boolean {
|
||||
try {
|
||||
if (details.session.isActive) {
|
||||
player.properties.spawnLocation = getAttribute(player, "/save:spawnLocation", ServerConstants.HOME_LOCATION)
|
||||
loginListeners.forEach(Consumer { listener: LoginListener -> listener.login(player) }) //Run our login hooks
|
||||
parser.runContentHooks() //Run our saved-content-parsing hooks
|
||||
player.details.session.setObject(player)
|
||||
|
||||
@@ -1,7 +1,5 @@
|
||||
package core.game.node.entity.player.info.login
|
||||
|
||||
import content.global.skill.farming.CompostBins
|
||||
import content.global.skill.farming.FarmingPatch
|
||||
import core.JSONUtils
|
||||
import core.api.PersistPlayer
|
||||
import core.game.node.entity.combat.spell.CombatSpell
|
||||
@@ -18,7 +16,6 @@ import core.ServerConstants
|
||||
import core.api.log
|
||||
import core.game.node.entity.combat.graves.GraveController
|
||||
import core.game.node.entity.combat.graves.GraveType
|
||||
import core.tools.SystemLogger
|
||||
import core.game.world.GameWorld
|
||||
import core.tools.Log
|
||||
import java.io.File
|
||||
|
||||
@@ -1,14 +1,12 @@
|
||||
package core.game.system.command.sets
|
||||
|
||||
import content.global.activity.jobs.JobManager
|
||||
import content.global.skill.slayer.Master
|
||||
import core.api.*
|
||||
import core.cache.Cache
|
||||
import core.cache.def.impl.DataMap
|
||||
import core.cache.def.impl.NPCDefinition
|
||||
import core.cache.def.impl.VarbitDefinition
|
||||
import core.cache.def.impl.Struct
|
||||
import core.game.dialogue.DialogueFile
|
||||
import core.game.node.entity.combat.ImpactHandler.HitsplatType
|
||||
import core.game.node.entity.player.Player
|
||||
import core.game.node.entity.player.link.SpellBookManager
|
||||
@@ -20,7 +18,6 @@ import core.plugin.Initializable
|
||||
import kotlinx.coroutines.GlobalScope
|
||||
import kotlinx.coroutines.launch
|
||||
import org.rs09.consts.Items
|
||||
import core.tools.SystemLogger
|
||||
import core.game.system.command.Privilege
|
||||
import java.io.BufferedWriter
|
||||
import java.io.File
|
||||
@@ -28,10 +25,10 @@ import java.io.FileWriter
|
||||
import java.util.Arrays
|
||||
import core.net.packet.PacketWriteQueue
|
||||
import core.tools.Log
|
||||
import core.game.world.update.flag.*
|
||||
import core.game.world.update.flag.context.*
|
||||
import core.game.node.entity.impl.*
|
||||
import core.game.node.entity.player.info.Rights
|
||||
import core.game.node.entity.skill.Skills
|
||||
import core.game.world.map.Location
|
||||
import core.game.world.repository.Repository
|
||||
|
||||
@Initializable
|
||||
class DevelopmentCommandSet : CommandSet(Privilege.ADMIN) {
|
||||
|
||||
Reference in New Issue
Block a user