Hello people,
I have a problem, I've just fixed the lure fishing but there's one problem.
Whenever you fish it does not delete 1 feather but all the feathers you have in your inventory.
Here's the code:
Code:
        public void catchFish2() {
                if (c.getItems().playerHasItem(309,1) && c.getItems().playerHasItem(314,1)) {
                        if (c.playerLevel[c.playerFishing] >= req) {
                                if (c.getItems().freeSlots() > 0) {
                                        if (canFishOther(fishType)) {
                                        if (Misc.random(1)==0){
                                                c.getItems().addItem(otherFishId(fishType),1);
                                                c.getPA().addSkillXP(otherFishXP(fishType),c.playerFishing);
                                        } else if (Misc.random(1)==1){
                                                c.getItems().addItem(fishType,1);
                                                c.getPA().addSkillXP(exp * Config.FISHING_EXPERIENCE,c.playerFishing);
                                        }
                                        } else {
                                                c.getItems().addItem(fishType,1);
                                                c.getPA().addSkillXP(exp * Config.FISHING_EXPERIENCE,c.playerFishing);
                                        }
                                        c.sendMessage("You catch a fish.");
                                        c.getItems().deleteItem(314, 1);
                                        c.fishTimer = 3 + Misc.random(2);
                                        c.startAnimation(622);
                                }
                        } else {
                                c.sendMessage("You need a fishing level of " + req + " to fish here.");
                                resetFishing();
                        }
                } else {
                        c.sendMessage("You do not have the correct equipment to use this fishing spot.");
                        resetFishing();
                }
        }
How would I fix this?