mirror of
https://gitlab.com/2009scape/2009scape.git
synced 2026-08-24 20:05:13 -06:00
detekt failure fix
forceDoorsOpen() now uses Pair of IntRange instead of arrayOf(...)
This commit is contained in:
parent
0d7d12a331
commit
aa5c3c1103
1 changed files with 5 additions and 6 deletions
|
|
@ -1171,12 +1171,12 @@ object CastleWarsGameState {
|
|||
* Searches the Castle Wars castle area for doors with matching IDs and replaces them.
|
||||
*/
|
||||
private fun forceDoorsOpen(team: CastleWarsTeam) {
|
||||
val (minX, maxX, minY, maxY) = when (team) {
|
||||
CastleWarsTeam.SARADOMIN -> arrayOf(2418, 2432, 3070, 3085)
|
||||
CastleWarsTeam.ZAMORAK -> arrayOf(2368, 2382, 3125, 3140)
|
||||
val (xRange, yRange) = when (team) {
|
||||
CastleWarsTeam.SARADOMIN -> (2418..2432) to (3070..3085)
|
||||
CastleWarsTeam.ZAMORAK -> (2368..2382) to (3125..3140)
|
||||
}
|
||||
for (x in minX..maxX) {
|
||||
for (y in minY..maxY) {
|
||||
for (x in xRange) {
|
||||
for (y in yRange) {
|
||||
val loc = Location.create(x, y, 0)
|
||||
val obj = RegionManager.getObject(loc) ?: continue
|
||||
val openId = getOpenDoorId(obj.id)
|
||||
|
|
@ -1691,4 +1691,3 @@ fun Player.depleteCastleWarsBracelet() {
|
|||
equipment.replace(Item(nextId), EquipmentContainer.SLOT_HANDS)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue