Fixed bug involving kitten/cat deletion

This commit is contained in:
Player Name
2023-11-05 08:20:06 +00:00
committed by Ryan
parent 978d70ad0c
commit f28076f3a4
4 changed files with 29 additions and 22 deletions
@@ -47,7 +47,7 @@ class CatOnArdougneCivilian: InteractionListener {
override fun defineListeners() {
onUseWith(IntType.NPC,cats,*civilians){ player, used, _ ->
sendItemDialogue(player,Items.DEATH_RUNE_560,"You hand over the cat.<br>You are given 100 Death Runes.")
player.familiarManager.removeDetails(used.id)
player.familiarManager.removeDetails(used.idHash)
removeItem(player,used,Container.INVENTORY)
addItem(player,Items.DEATH_RUNE_560,100)
return@onUseWith true
@@ -418,14 +418,10 @@ public final class FamiliarManager {
/**
* Removes the details for this pet.
* @param itemId The item id of the pet.
* @param itemIdHash The item id hash of the pet.
*/
public void removeDetails(int itemId) {
Pets pets = Pets.forId(itemId);
if (pets == null) {
return;
}
petDetails.remove(pets.getBabyItemId());
public void removeDetails(int itemIdHash) {
petDetails.remove(itemIdHash);
}
/**