
Originally Posted by
bracket
Code:
c.playerSkillProp[10][0] = data[i][6]; // ANIM
c.playerSkillProp[10][1] = data[i][4]; // First FISH
c.playerSkillProp[10][2] = data[i][5]; // First XP Rate
c.playerSkillProp[10][3] = data[i][3]; // BAIT
c.playerSkillProp[10][4] = data[i][2]; // First Equipment
c.playerSkillProp[10][5] = data[i][7]; // Second FISH
c.playerSkillProp[10][6] = data[i][8]; // Second Level
c.playerSkillProp[10][8] = data[i][9]; // Second XP Rate
c.playerSkillProp[10][9] = Misc.random(1) == 0 ? 7 : 5;
c.playerSkillProp[10][10] = data[i][0]; // INDEX
Code:
c.playerSkillProp[10][1] = c.playerSkillProp[10][Misc.random(1) == 0 ? 7 : 5];
So you're assigning the playerSkillProp[10][1] here by rolling playerSkillProp[10][random(1)]. If it rolls 0 it will assign index 7, any other roll will assign index 5 (red). As you can see it will only be able to catch the second fish, not the first.
You should probably get rid of this lol.
Thank you for explaining I was working on an enum based fishing still new to it but this is what i have right now.
Code:
public class FishingUpdate {
public enum fishingData {
// animation, fish, xp rate, bait, equipment
SHRIMP_ANCHOVIE(621, new int[] {317, 321}, new int[] {5, 10}, -1, 303);
private int animId, bait, equipment;
private int[] fish, xp;
fishingData(int anim, int[] fishId, int[] xp, int bait, int equipment) {
this.animId = anim;
this.fish = fishId;
this.xp = xp;
this.bait = bait;
this.equipment = equipment;
}
public int getAnimId() {
return animId;
}
public int getBait() {
return bait;
}
public int getEquipment() {
return equipment;
}
public int[] getFish() {
return fish;
}
public int[] getXp() {
return xp;
}
public static void attemptFishing(int fishId) {
}
}
}