Merge remote-tracking branch 'upstream/master'

This commit is contained in:
skelsoft
2021-07-06 10:57:55 +10:00
9 changed files with 249 additions and 280 deletions
+235 -265
View File
@@ -2649,13 +2649,13 @@
},
{
"minAmount": "1",
"weight": "5.0",
"weight": "6.0",
"id": "1303",
"maxAmount": "1"
},
{
"minAmount": "1",
"weight": "5.0",
"weight": "6.0",
"id": "1113",
"maxAmount": "1"
},
@@ -2679,31 +2679,31 @@
},
{
"minAmount": "75",
"weight": "5.0",
"weight": "8.0",
"id": "556",
"maxAmount": "75"
},
{
"minAmount": "15",
"weight": "5.0",
"weight": "8.0",
"id": "565",
"maxAmount": "15"
},
{
"minAmount": "50",
"weight": "5.0",
"weight": "8.0",
"id": "554",
"maxAmount": "50"
},
{
"minAmount": "10",
"weight": "5.0",
"weight": "4.0",
"id": "563",
"maxAmount": "10"
},
{
"minAmount": "10",
"weight": "5.0",
"weight": "8.0",
"id": "562",
"maxAmount": "10"
},
@@ -2714,52 +2714,52 @@
"maxAmount": "2"
},
{
"minAmount": "176",
"minAmount": "170",
"weight": "50.0",
"id": "995",
"maxAmount": "176"
},
{
"minAmount": "330",
"weight": "50.0",
"id": "995",
"maxAmount": "330"
"maxAmount": "690"
},
{
"minAmount": "1",
"weight": "5.0",
"weight": "6.0",
"id": "1897",
"maxAmount": "1"
},
{
"minAmount": "1",
"weight": "5.0",
"id": "2739",
"weight": "4.0",
"id": "12070",
"maxAmount": "1"
},
{
"minAmount": "1",
"weight": "5.0",
"weight": "4.0",
"id": "12480",
"maxAmount": "1"
},
{
"minAmount": "1",
"weight": "15.5",
"weight": "12.6",
"id": "31",
"maxAmount": "1"
},
{
"minAmount": "1",
"weight": "0.126",
"weight": "0.12",
"id": "11286",
"maxAmount": "1"
},
{
"minAmount": "1",
"weight": "150.0",
"weight": "75.0",
"id": "0",
"maxAmount": "1"
},
{
"minAmount": "3",
"weight": "4.0",
"id": "563",
"maxAmount": "3"
}
]
},
@@ -2815,7 +2815,7 @@
},
{
"minAmount": "1",
"weight": "25.0",
"weight": "50.0",
"id": "1069",
"maxAmount": "1"
},
@@ -2851,19 +2851,13 @@
},
{
"minAmount": "1",
"weight": "5.0",
"weight": "8.0",
"id": "1213",
"maxAmount": "1"
},
{
"minAmount": "1",
"weight": "5.0",
"id": "1247",
"maxAmount": "1"
},
{
"minAmount": "75",
"weight": "25.0",
"weight": "50.0",
"id": "555",
"maxAmount": "75"
},
@@ -2958,14 +2952,8 @@
"maxAmount": "1"
},
{
"minAmount": "320",
"weight": "50.0",
"id": "995",
"maxAmount": "320"
},
{
"minAmount": "440",
"weight": "50.0",
"minAmount": "10",
"weight": "100.0",
"id": "995",
"maxAmount": "440"
},
@@ -2984,7 +2972,7 @@
{
"minAmount": "1",
"weight": "5.0",
"id": "2735",
"id": "12070",
"maxAmount": "1"
},
{
@@ -2995,7 +2983,7 @@
},
{
"minAmount": "1",
"weight": "150.0",
"weight": "125.0",
"id": "0",
"maxAmount": "1"
}
@@ -24309,13 +24297,13 @@
"main": [
{
"minAmount": "1",
"weight": "25.0",
"weight": "50.0",
"id": "1317",
"maxAmount": "1"
},
{
"minAmount": "1",
"weight": "25.0",
"weight": "50.0",
"id": "1371",
"maxAmount": "1"
},
@@ -24339,31 +24327,31 @@
},
{
"minAmount": "1",
"weight": "5.0",
"weight": "8.0",
"id": "1432",
"maxAmount": "1"
},
{
"minAmount": "1",
"weight": "5.0",
"weight": "8.0",
"id": "1147",
"maxAmount": "1"
},
{
"minAmount": "1",
"weight": "5.0",
"weight": "8.0",
"id": "1163",
"maxAmount": "1"
},
{
"minAmount": "1",
"weight": "0.7",
"weight": "0.75",
"id": "4585",
"maxAmount": "1"
},
{
"minAmount": "1",
"weight": "0.7",
"weight": "0.75",
"id": "4087",
"maxAmount": "1"
},
@@ -24375,7 +24363,7 @@
},
{
"minAmount": "2",
"weight": "25.0",
"weight": "8.0",
"id": "9144",
"maxAmount": "12"
},
@@ -24417,19 +24405,19 @@
},
{
"minAmount": "1",
"weight": "25.0",
"weight": "50.0",
"id": "161",
"maxAmount": "1"
},
{
"minAmount": "1",
"weight": "5.0",
"weight": "8.0",
"id": "145",
"maxAmount": "1"
},
{
"minAmount": "1",
"weight": "5.0",
"weight": "8.0",
"id": "165",
"maxAmount": "1"
},
@@ -24465,21 +24453,27 @@
},
{
"minAmount": "1",
"weight": "17.5",
"weight": "19.35",
"id": "31",
"maxAmount": "1"
},
{
"minAmount": "1",
"weight": "0.14",
"weight": "0.145",
"id": "11286",
"maxAmount": "1"
},
{
"minAmount": "1",
"weight": "150.0",
"weight": "100.0",
"id": "0",
"maxAmount": "1"
},
{
"minAmount": "4",
"weight": "50.0",
"id": "830",
"maxAmount": "4"
}
]
},
@@ -24529,13 +24523,13 @@
"main": [
{
"minAmount": "1",
"weight": "25.0",
"weight": "50.0",
"id": "1317",
"maxAmount": "1"
},
{
"minAmount": "1",
"weight": "25.0",
"weight": "50.0",
"id": "1371",
"maxAmount": "1"
},
@@ -24559,37 +24553,37 @@
},
{
"minAmount": "1",
"weight": "25.0",
"weight": "8.0",
"id": "1359",
"maxAmount": "1"
},
{
"minAmount": "1",
"weight": "5.0",
"weight": "8.0",
"id": "1432",
"maxAmount": "1"
},
{
"minAmount": "1",
"weight": "5.0",
"weight": "8.0",
"id": "1147",
"maxAmount": "1"
},
{
"minAmount": "1",
"weight": "5.0",
"weight": "8.0",
"id": "1163",
"maxAmount": "1"
},
{
"minAmount": "1",
"weight": "1.41",
"weight": "1.4",
"id": "4585",
"maxAmount": "1"
},
{
"minAmount": "1",
"weight": "1.41",
"weight": "1.4",
"id": "4087",
"maxAmount": "1"
},
@@ -24601,7 +24595,7 @@
},
{
"minAmount": "2",
"weight": "25.0",
"weight": "8.0",
"id": "9144",
"maxAmount": "12"
},
@@ -24613,7 +24607,7 @@
},
{
"minAmount": "7",
"weight": "25.0",
"weight": "8.0",
"id": "868",
"maxAmount": "7"
},
@@ -24625,7 +24619,7 @@
},
{
"minAmount": "5",
"weight": "25.0",
"weight": "8.0",
"id": "566",
"maxAmount": "5"
},
@@ -24637,19 +24631,19 @@
},
{
"minAmount": "1",
"weight": "25.0",
"weight": "50.0",
"id": "161",
"maxAmount": "1"
},
{
"minAmount": "1",
"weight": "5.0",
"weight": "12.0",
"id": "145",
"maxAmount": "1"
},
{
"minAmount": "1",
"weight": "5.0",
"weight": "12.0",
"id": "165",
"maxAmount": "1"
},
@@ -24673,31 +24667,31 @@
},
{
"minAmount": "1",
"weight": "25.0",
"weight": "50.0",
"id": "9431",
"maxAmount": "1"
},
{
"minAmount": "1",
"weight": "5.0",
"id": "2729",
"id": "12070",
"maxAmount": "1"
},
{
"minAmount": "1",
"weight": "21.1",
"weight": "21.3",
"id": "31",
"maxAmount": "1"
},
{
"minAmount": "1",
"weight": "0.141",
"weight": "0.14",
"id": "11286",
"maxAmount": "1"
},
{
"minAmount": "1",
"weight": "150.0",
"weight": "100.0",
"id": "0",
"maxAmount": "1"
}
@@ -45626,19 +45620,19 @@
"main": [
{
"minAmount": "20",
"weight": "25.0",
"weight": "8.0",
"id": "810",
"maxAmount": "20"
},
{
"minAmount": "1",
"weight": "25.0",
"weight": "50.0",
"id": "1373",
"maxAmount": "1"
},
{
"minAmount": "1",
"weight": "25.0",
"weight": "50.0",
"id": "1432",
"maxAmount": "1"
},
@@ -45656,13 +45650,13 @@
},
{
"minAmount": "14",
"weight": "25.0",
"weight": "50.0",
"id": "811",
"maxAmount": "14"
},
{
"minAmount": "8",
"weight": "25.0",
"weight": "50.0",
"id": "830",
"maxAmount": "12"
},
@@ -45692,7 +45686,7 @@
},
{
"minAmount": "10",
"weight": "25.0",
"weight": "8.0",
"id": "566",
"maxAmount": "10"
},
@@ -45722,7 +45716,7 @@
},
{
"minAmount": "600",
"weight": "50.0",
"weight": "75.0",
"id": "995",
"maxAmount": "3000"
},
@@ -45741,7 +45735,7 @@
{
"minAmount": "1",
"weight": "25.0",
"id": "2743",
"id": "12070",
"maxAmount": "1"
},
{
@@ -45751,8 +45745,8 @@
"maxAmount": "1"
},
{
"minAmount": "1",
"weight": "25.0",
"minAmount": "2",
"weight": "8.0",
"id": "2363",
"maxAmount": "2"
},
@@ -45770,13 +45764,13 @@
},
{
"minAmount": "1",
"weight": "0.0235",
"weight": "0.03",
"id": "11335",
"maxAmount": "1"
},
{
"minAmount": "1",
"weight": "150.0",
"weight": "100.0",
"id": "0",
"maxAmount": "1"
}
@@ -50901,195 +50895,171 @@
"main": [
{
"minAmount": "1",
"weight": "500.0",
"id": "9185",
"maxAmount": "1"
},
{
"minAmount": "1",
"weight": "200.0",
"id": "224",
"maxAmount": "36"
},
{
"minAmount": "1",
"weight": "150.0",
"id": "6050",
"maxAmount": "24"
},
{
"minAmount": "1",
"weight": "100.0",
"id": "6052",
"maxAmount": "16"
},
{
"minAmount": "1",
"weight": "200.0",
"id": "244",
"maxAmount": "40"
},
{
"minAmount": "1",
"weight": "150.0",
"id": "246",
"maxAmount": "24"
},
{
"minAmount": "1",
"weight": "150.0",
"id": "3139",
"maxAmount": "40"
},
{
"minAmount": "1",
"weight": "150.0",
"id": "248",
"maxAmount": "32"
},
{
"minAmount": "1",
"weight": "100.0",
"id": "6694",
"maxAmount": "24"
},
{
"minAmount": "1",
"weight": "125.0",
"id": "6019",
"maxAmount": "24"
},
{
"minAmount": "18",
"weight": "500.0",
"id": "9144",
"maxAmount": "25"
},
{
"minAmount": "500",
"weight": "250.0",
"id": "558",
"maxAmount": "601"
},
{
"minAmount": "2",
"weight": "250.0",
"id": "9244",
"maxAmount": "15"
},
{
"minAmount": "1",
"weight": "500.0",
"id": "2503",
"maxAmount": "1"
},
{
"minAmount": "1",
"weight": "16.0",
"id": "11718",
"maxAmount": "1"
},
{
"minAmount": "1",
"weight": "16.0",
"id": "11720",
"maxAmount": "1"
},
{
"minAmount": "1",
"weight": "16.0",
"id": "11722",
"maxAmount": "1"
},
{
"minAmount": "3",
"weight": "250.0",
"id": "163",
"maxAmount": "3"
},
{
"minAmount": "18000",
"weight": "500.0",
"id": "995",
"maxAmount": "21000"
},
{
"minAmount": "5",
"weight": "500.0",
"id": "218",
"maxAmount": "22"
},
{
"minAmount": "3",
"weight": "500.0",
"id": "5303",
"maxAmount": "3"
},
{
"minAmount": "1",
"weight": "250.0",
"id": "10977",
"maxAmount": "1"
},
{
"minAmount": "1",
"weight": "250.0",
"id": "10976",
"maxAmount": "1"
},
{
"minAmount": "1",
"weight": "250.0",
"id": "2743",
"maxAmount": "1"
},
{
"minAmount": "1",
"weight": "100.0",
"id": "5315",
"maxAmount": "1"
},
{
"minAmount": "1",
"weight": "8.0",
"id": "11710",
"maxAmount": "1"
},
{
"minAmount": "1",
"weight": "8.0",
"id": "11712",
"maxAmount": "1"
},
{
"minAmount": "1",
"weight": "8.0",
"id": "11714",
"maxAmount": "1"
},
{
"minAmount": "1",
"weight": "100.0",
"id": "989",
"maxAmount": "1"
},
{
"minAmount": "1",
"weight": "12.0",
"id": "11702",
"weight": "25.0",
"id": "1319",
"maxAmount": "1"
},
{
"minAmount": "1",
"weight": "50.0",
"id": "31",
"id": "9185",
"maxAmount": "1"
},
{
"minAmount": "15",
"weight": "50.0",
"id": "9144",
"maxAmount": "25"
},
{
"minAmount": "80",
"weight": "25.0",
"id": "892",
"maxAmount": "100"
},
{
"minAmount": "1",
"weight": "50.0",
"id": "9244",
"maxAmount": "15"
},
{
"minAmount": "500",
"weight": "25.0",
"id": "558",
"maxAmount": "600"
},
{
"minAmount": "1",
"weight": "50.0",
"id": "2503",
"maxAmount": "1"
},
{
"minAmount": "1",
"weight": "100.0",
"weight": "1.96",
"id": "11718",
"maxAmount": "1"
},
{
"minAmount": "1",
"weight": "1.96",
"id": "11720",
"maxAmount": "1"
},
{
"minAmount": "1",
"weight": "1.96",
"id": "11722",
"maxAmount": "1"
},
{
"minAmount": "3",
"weight": "25.0",
"id": "5302",
"maxAmount": "3"
},
{
"minAmount": "3",
"weight": "25.0",
"id": "5303",
"maxAmount": "3"
},
{
"minAmount": "1",
"weight": "5.0",
"id": "5315",
"maxAmount": "1"
},
{
"minAmount": "1",
"weight": "1.17",
"id": "11702",
"maxAmount": "1"
},
{
"minAmount": "1",
"weight": "0.932",
"id": "11710",
"maxAmount": "1"
},
{
"minAmount": "1",
"weight": "0.932",
"id": "11712",
"maxAmount": "1"
},
{
"minAmount": "1",
"weight": "0.932",
"id": "11714",
"maxAmount": "1"
},
{
"minAmount": "3",
"weight": "25.0",
"id": "169",
"maxAmount": "3"
},
{
"minAmount": "3",
"weight": "25.0",
"id": "163",
"maxAmount": "3"
},
{
"minAmount": "5",
"weight": "5.0",
"id": "218",
"maxAmount": "20"
},
{
"minAmount": "1",
"weight": "5.0",
"id": "989",
"maxAmount": "1"
},
{
"minAmount": "1",
"weight": "5.0",
"id": "10976",
"maxAmount": "1"
},
{
"minAmount": "1",
"weight": "5.0",
"id": "10977",
"maxAmount": "1"
},
{
"minAmount": "1",
"weight": "25.0",
"id": "385",
"maxAmount": "20"
},
{
"minAmount": "18000",
"weight": "50.0",
"id": "617",
"maxAmount": "20000"
},
{
"minAmount": "1",
"weight": "20.0",
"id": "12070",
"maxAmount": "1"
},
{
"minAmount": "1",
"weight": "75.0",
"id": "0",
"maxAmount": "1"
},
{
"minAmount": "1",
"weight": "20.0",
"id": "31",
"maxAmount": "1"
}
]
},
@@ -63943,4 +63913,4 @@
}
]
}
]
]
@@ -171,7 +171,6 @@ public final class ImpactHandler {
if (fam && player.getFamiliarManager().hasFamiliar() && !(player.getFamiliarManager().getFamiliar() instanceof Pet)) {
source.setAttribute("fam-exp", true);
}
style.getSwingHandler().addExperience(source, entity, state);
source.removeAttribute("fam-exp");
}
boolean dead = false;
@@ -267,9 +267,6 @@ public final class HouseManager {
int diffX = player.getLocation().getX() - r.getBaseLocation().getX();
int diffY = player.getLocation().getY() - r.getBaseLocation().getY();
int diffZ = player.getLocation().getZ() - r.getBaseLocation().getZ();
RegionManager.getRegionCache().remove(r);
region.flagInactive();
dungeon.flagInactive();
region = null;
dungeon = null;
enter(player, buildingMode, false);
@@ -381,8 +378,7 @@ public final class HouseManager {
Region.load(from, true);
RegionChunk defaultChunk = from.getPlanes()[style.getPlane()].getRegionChunk(1, 0);
ZoneBorders borders = DynamicRegion.reserveArea(8, 8);
//region = DynamicRegion.create(from.getRegionId());
region = new DynamicRegion(from.getRegionId(), borders.getSouthWestX() >> 6, borders.getSouthWestY() >> 6);
region = new DynamicRegion(-1, borders.getSouthWestX() >> 6, borders.getSouthWestY() >> 6);
region.setBorders(borders);
region.setUpdateAllPlanes(true);
RegionManager.addRegion(region.getId(), region);
@@ -3,7 +3,6 @@ package core.game.node.entity.skill.construction;
import core.game.node.entity.Entity;
import core.game.node.entity.player.Player;
import core.game.world.map.RegionManager;
import core.game.world.map.zone.MapZone;
import core.game.world.map.zone.ZoneRestriction;
@@ -71,11 +70,6 @@ public final class HouseZone extends MapZone {
if (e instanceof Player) {
Player p = (Player) e;
HouseManager.leave(p);
if(house.getRegion() == p.getHouseManager().getRegion()){
house.getRegion().flagActive();
house.getDungeonRegion().flagActive();
RegionManager.getRegionCache().remove(house.getRegion());
}
return true;
}
}
@@ -90,8 +90,5 @@ object JobManager {
player.removeAttribute("jobs:type")
player.incrementAttribute("/save:jobs:dailyAmt",1)
System.out.println("Complete amount: ${player.getAttribute("jobs:dailyAmt",0)}")
if(player.getAttribute("jobs:dailyAmt",0) == 3){
player.setAttribute("/save:jobs:reset_time",System.currentTimeMillis() + TimeUnit.HOURS.toMillis(24))
}
}
}
@@ -8,6 +8,7 @@ import core.game.node.entity.player.link.diary.DiaryType
import core.game.node.item.Item
import org.rs09.consts.Items
import rs09.game.interaction.InteractionListener
import java.util.concurrent.TimeUnit
/**
* Handles the work-for actions for the NPCs
@@ -59,6 +60,7 @@ class WorkForInteractionListener : InteractionListener() {
if(player.getAttribute("jobs:reset_time",Long.MAX_VALUE) < System.currentTimeMillis()){
player.setAttribute("/save:jobs:dailyAmt",0)
player.setAttribute("/save:jobs:reset_time",System.currentTimeMillis() + TimeUnit.HOURS.toMillis(24))
}
if(player.getAttribute("jobs:id",-1) != -1){
@@ -86,6 +86,9 @@ open class MagicSwingHandler
if (spell!!.type === SpellType.BLITZ) {
ticks++
}
if(state.estimatedHit > victim.skills.lifepoints) state.estimatedHit = victim.skills.lifepoints
if(state.estimatedHit + state.secondaryHit > victim.skills.lifepoints) state.secondaryHit -= ((state.estimatedHit + state.secondaryHit) - victim.skills.lifepoints)
addExperience(entity, victim, state)
return ticks
}
@@ -75,6 +75,11 @@ open class MeleeSwingHandler
hit = RandomFunction.random(max)
}
state.estimatedHit = hit
if(victim != null) {
if (state.estimatedHit > victim.skills.lifepoints) state.estimatedHit = victim.skills.lifepoints
if (state.estimatedHit + state.secondaryHit > victim.skills.lifepoints) state.secondaryHit -= ((state.estimatedHit + state.secondaryHit) - victim.skills.lifepoints)
}
addExperience(entity, victim, state)
return 1
}
@@ -93,7 +93,10 @@ open class RangeSwingHandler
if (entity == null || victim!!.location == null) {
return -1
}
if(state.estimatedHit > victim.skills.lifepoints) state.estimatedHit = victim.skills.lifepoints
if(state.estimatedHit + state.secondaryHit > victim.skills.lifepoints) state.secondaryHit -= ((state.estimatedHit + state.secondaryHit) - victim.skills.lifepoints)
useAmmo(entity, state, victim.location)
addExperience(entity, victim, state)
return 1 + ceil(entity.location.getDistance(victim.location) * 0.3).toInt()
}