Fixed bug involving kitten/cat deletion
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user