PetBattle Teams

65 - Could not add pet teams anymore

What steps will reproduce the problem?
1. Not sure how, it seems that somehow my Selected team index was higher than my total number of pet teams. I had only 1 battle pet team.
2. I tried to add a new team, it would add it to pet team 2 but not display in the pet frames as pet team 2 was missing.

What is the expected output? What do you see instead?
Only the first team was shown.

What version of the product are you using?
3.2.5

Do you have an error log of what happened?
No

Please provide any additional information below.

I could fix this issue by adding this to the GetSelected function in TeamManager:

function TeamManager:GetSelected()
    if self.db.global.selected > self:GetNumTeams() then self.db.global.selected = self:GetNumTeams() end
    return self.db.global.selected
end

User When Change
gust4ve Oct 26, 2013 at 18:00 UTC Create

You must login to post a comment. Don't have an account? Register to get one!

  • 1 comment
  • Avatar of Phanx Phanx Jan 21, 2014 at 01:50 UTC - 1 like

    Your fix resolved the similar issue I was having, which was that neither the team roster buttons nor the "add team" button responded in any way to clicks, only one row of team roster buttons was displayed, and all of the team roster buttons were displayed with the "question mark" icon.

    Nullberri, if you're going to go AFK for months, please put your code in an open repository so the community can commit fixes!

  • 1 comment

Facts

Last updated
Sep 08, 2014
Reported
Oct 26, 2013
Status
New - Issue has not had initial review yet.
Type
Defect - A shortcoming, fault, or imperfection
Priority
Medium - Normal priority.
Votes
1

Reported by

Possible assignees