mirror of
https://gitlab.com/2009scape/2009scape.git
synced 2026-09-10 18:46:39 -06:00
ryan fixes
This commit is contained in:
parent
d7796c230d
commit
461cd79dfa
2 changed files with 23 additions and 25 deletions
|
|
@ -4,10 +4,13 @@ import content.global.handlers.item.equipment.BarrowsEquipment;
|
||||||
import content.global.handlers.item.equipment.special.SalamanderSwingHandler;
|
import content.global.handlers.item.equipment.special.SalamanderSwingHandler;
|
||||||
import content.global.skill.construction.decoration.pohstorage.POHStorageProxyContainer;
|
import content.global.skill.construction.decoration.pohstorage.POHStorageProxyContainer;
|
||||||
import content.global.skill.construction.decoration.pohstorage.StorageState;
|
import content.global.skill.construction.decoration.pohstorage.StorageState;
|
||||||
|
import content.global.skill.construction.decoration.pohstorage.StorageState;
|
||||||
import content.global.skill.runecrafting.PouchManager;
|
import content.global.skill.runecrafting.PouchManager;
|
||||||
import content.global.skill.slayer.SlayerEquipmentFlags;
|
import content.global.skill.slayer.SlayerEquipmentFlags;
|
||||||
|
import content.global.skill.slayer.SlayerEquipmentFlags;
|
||||||
import core.api.ContentAPIKt;
|
import core.api.ContentAPIKt;
|
||||||
import core.game.activity.ActivityManager;
|
import core.game.activity.ActivityManager;
|
||||||
|
import core.game.activity.ActivityManager;
|
||||||
import core.game.component.Component;
|
import core.game.component.Component;
|
||||||
import core.game.container.Container;
|
import core.game.container.Container;
|
||||||
import core.game.container.impl.BankContainer;
|
import core.game.container.impl.BankContainer;
|
||||||
|
|
|
||||||
|
|
@ -33,33 +33,28 @@ class LoginParser(val details: PlayerDetails) {
|
||||||
Repository.removePlayer(player)
|
Repository.removePlayer(player)
|
||||||
flag(AuthResponse.ErrorLoadingProfile)
|
flag(AuthResponse.ErrorLoadingProfile)
|
||||||
}
|
}
|
||||||
GameWorld.Pulser.submit(object : Pulse(1) {
|
try {
|
||||||
override fun pulse(): Boolean {
|
if (details.session.isActive) {
|
||||||
try {
|
player.properties.spawnLocation = getAttribute(player, "/save:spawnLocation", ServerConstants.HOME_LOCATION)
|
||||||
if (details.session.isActive) {
|
loginListeners.forEach(Consumer { listener: LoginListener -> listener.login(player) }) //Run our login hooks
|
||||||
player.properties.spawnLocation = getAttribute(player, "/save:spawnLocation", ServerConstants.HOME_LOCATION)
|
parser.runContentHooks() //Run our saved-content-parsing hooks
|
||||||
loginListeners.forEach(Consumer { listener: LoginListener -> listener.login(player) }) //Run our login hooks
|
player.details.session.setObject(player)
|
||||||
parser.runContentHooks() //Run our saved-content-parsing hooks
|
player.details.accountInfo.lastUsedIp = player.details.ipAddress
|
||||||
player.details.session.setObject(player)
|
if (reconnect) {
|
||||||
player.getDetails().accountInfo.lastUsedIp = player.getDetails().getIpAddress()
|
reconnect(player)
|
||||||
if (reconnect) {
|
} else {
|
||||||
reconnect(player)
|
flag(AuthResponse.Success)
|
||||||
} else {
|
player.init()
|
||||||
flag(AuthResponse.Success)
|
reinitVarps(player)
|
||||||
player.init()
|
|
||||||
reinitVarps(player)
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
Repository.removePlayer(player)
|
|
||||||
}
|
|
||||||
} catch (t: Throwable) {
|
|
||||||
t.printStackTrace()
|
|
||||||
Repository.removePlayer(player)
|
|
||||||
flag(AuthResponse.ErrorLoadingProfile)
|
|
||||||
}
|
}
|
||||||
return true
|
} else {
|
||||||
|
Repository.removePlayer(player)
|
||||||
}
|
}
|
||||||
})
|
} catch (t: Throwable) {
|
||||||
|
t.printStackTrace()
|
||||||
|
Repository.removePlayer(player)
|
||||||
|
flag(AuthResponse.ErrorLoadingProfile)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue