Graves Rewrite
Rewrote graves from scratch using new systems and abundant unit testing Fixed a race condition bug that would prevent classes implementing PersistWorld from properly... persisting Fixed a bug where graves were (still) too generous Fixed a bug where graves would not persist across server reboots Fixed a bug where graves would not recognize a relogged player Fixed numerous other bugs with graves, see the unit tests for complete coverage Grave system now supports quest requirements
This commit is contained in:
@@ -3,6 +3,7 @@ import core.cache.crypto.ISAACCipher
|
||||
import core.cache.crypto.ISAACPair
|
||||
import core.game.node.entity.player.Player
|
||||
import core.game.node.entity.player.info.PlayerDetails
|
||||
import core.game.node.entity.player.info.Rights
|
||||
import core.game.node.entity.player.link.IronmanMode
|
||||
import core.game.node.item.Item
|
||||
import core.net.IoSession
|
||||
@@ -20,12 +21,16 @@ import rs09.game.world.update.UpdateSequence
|
||||
import java.nio.ByteBuffer
|
||||
|
||||
object TestUtils {
|
||||
fun getMockPlayer(name: String, ironman: IronmanMode = IronmanMode.NONE): Player {
|
||||
var uidCounter = 0
|
||||
|
||||
fun getMockPlayer(name: String, ironman: IronmanMode = IronmanMode.NONE, rights: Rights = Rights.ADMINISTRATOR): Player {
|
||||
val p = MockPlayer(name)
|
||||
p.ironmanManager.mode = ironman
|
||||
p.details.accountInfo.uid = uidCounter++
|
||||
Repository.addPlayer(p)
|
||||
//Update sequence has a separate list of players for some reason...
|
||||
UpdateSequence.renderablePlayers.add(p)
|
||||
p.details.rights = rights
|
||||
return p
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user