Compare commits
6 Commits
main
...
2PlayerQue
Author | SHA1 | Date | |
---|---|---|---|
![]() |
22269f32f9 | ||
![]() |
5895b1e90a | ||
![]() |
d6add6cc4e | ||
![]() |
504a49eaae | ||
![]() |
709d259b77 | ||
![]() |
ade60a1e45 |
@ -43,5 +43,5 @@ I would strongly recommend contributing code to the [2009Scape project](https://
|
||||
|
||||
## License
|
||||
|
||||
Like 2009Scape, this is AGPLv3. This is, in my opinion, the only proper license for an open source RSPS. The key term of the license being if you wish to use this code to host your own server, you must also offer the source code for people to inspect and use, and allow them to make modifications to it as I did with 2009Scape's code.
|
||||
Like 2009Scape, this is AGPLv3. This is, in my opinion, the only proper license for an open source RSPS. The key term of the license being if you wish to use this code, you must also offer the source code for people to inspect and use! (eg no private, for profit RSPS).
|
||||
|
||||
|
@ -46,23 +46,23 @@ enum class RandomEvents(val npc: RandomEventNPC, val loot: WeightBasedTable? = n
|
||||
WeightedItem(Items.TOOTH_HALF_OF_A_KEY_985,1,1,0.1),
|
||||
WeightedItem(Items.LOOP_HALF_OF_A_KEY_987,1,1,0.1)
|
||||
)),
|
||||
// MAZE(npc = MazeNPC()),
|
||||
MAZE(npc = MazeNPC()),
|
||||
DRILL_DEMON(npc = SergeantDamienNPC()),
|
||||
EVIL_CHICKEN(npc = EvilChickenNPC()),
|
||||
// STRANGE_PLANT(npc = StrangePlantNPC()),
|
||||
// SWARM(npc = SwarmNPC()),
|
||||
// EVIL_BOB(npc = EvilBobNPC(), skillIds = intArrayOf(Skills.FISHING, Skills.MAGIC)),
|
||||
STRANGE_PLANT(npc = StrangePlantNPC()),
|
||||
SWARM(npc = SwarmNPC()),
|
||||
EVIL_BOB(npc = EvilBobNPC(), skillIds = intArrayOf(Skills.FISHING, Skills.MAGIC)),
|
||||
DRUNKEN_DWARF(npc = DrunkenDwarfNPC()),
|
||||
RICK_TURPENTINE(npc = RickTurpentineNPC(), loot = CERTER.loot),
|
||||
SURPRISE_EXAM(npc = MysteriousOldManNPC(), type = "sexam"),
|
||||
FREAKY_FORESTER(npc = FreakyForesterNPC(), skillIds = intArrayOf(Skills.WOODCUTTING)),
|
||||
// PILLORY(npc = PilloryNPC(), skillIds = intArrayOf(Skills.THIEVING)),
|
||||
PILLORY(npc = PilloryNPC(), skillIds = intArrayOf(Skills.THIEVING)),
|
||||
TREE_SPIRIT(npc = TreeSpiritRENPC(), skillIds = intArrayOf(Skills.WOODCUTTING)),
|
||||
QUIZ_MASTER(npc = QuizMasterNPC()),
|
||||
RIVER_TROLL(RiverTrollRENPC(), skillIds = intArrayOf(Skills.FISHING)),
|
||||
// ROCK_GOLEM(RockGolemRENPC(), skillIds = intArrayOf(Skills.MINING)),
|
||||
SHADE(ShadeRENPC(), skillIds = intArrayOf(Skills.PRAYER));
|
||||
// ZOMBIE(ZombieRENPC(), skillIds = intArrayOf(Skills.PRAYER));
|
||||
ROCK_GOLEM(RockGolemRENPC(), skillIds = intArrayOf(Skills.MINING)),
|
||||
SHADE(ShadeRENPC(), skillIds = intArrayOf(Skills.PRAYER)),
|
||||
ZOMBIE(ZombieRENPC(), skillIds = intArrayOf(Skills.PRAYER));
|
||||
|
||||
companion object {
|
||||
@JvmField
|
||||
|
@ -128,12 +128,7 @@ public final class FamiliarManager {
|
||||
}
|
||||
if (currentPet != -1) {
|
||||
int last = this.petDetails.get(currentPet).size() - 1;
|
||||
PetDetails details;
|
||||
if (last < 0) { //missing data in save due to historical bug (see GL !2077)
|
||||
details = new PetDetails(0);
|
||||
} else {
|
||||
details = this.petDetails.get(currentPet).get(last);
|
||||
}
|
||||
PetDetails details = this.petDetails.get(currentPet).get(last);
|
||||
Pets pets = Pets.forId(currentPet);
|
||||
familiar = new Pet(player, details, currentPet, pets.getNpcId(currentPet));
|
||||
} else if (familiarData.containsKey("familiar")) {
|
||||
@ -419,9 +414,6 @@ public final class FamiliarManager {
|
||||
* @param details The new pet details.
|
||||
*/
|
||||
public void addDetails(int itemId, PetDetails details) {
|
||||
if (petDetails.get(itemId) == null) {
|
||||
petDetails.put(itemId, new ArrayList<>());
|
||||
}
|
||||
petDetails.get(itemId).add(details);
|
||||
}
|
||||
|
||||
|
@ -129,8 +129,8 @@ public final class Pet extends Familiar {
|
||||
if (pet.isKitten(itemId)) {
|
||||
owner.incrementAttribute("/save:stats_manager:cats_raised");
|
||||
}
|
||||
owner.getFamiliarManager().addDetails(newItemId, details);
|
||||
owner.getFamiliarManager().removeDetails(getItemId());
|
||||
owner.getFamiliarManager().addDetails(newItemId, details);
|
||||
owner.getFamiliarManager().morphPet(new Item(newItemId), false, location, details.getHunger(), 0);
|
||||
owner.getPacketDispatch().sendMessage("<col=ff0000>Your pet has grown larger.</col>");
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user