Profile page limited to 4 pets

Requests, feedback, and general discussion about WoWRoster
DO NOT post topics about WoWRoster AddOns here!

Profile page limited to 4 pets

Postby Marcellus » Wed Jan 03, 2007 3:04 pm

Warlocks that are speced for the Felguard in the demonology tree have 5 permanent pets, yet profiles seem to limit this to 4. It will display the Felguard on the pet page, but it removes one pet from this page and seems to be random as to which one.

Sample page:
http://www.darkhandofchaos.com/roster/c ... er=Gilneas

During one update, it removed the voidwalker. The current one has the imp removed.
Marcellus
WR.net Apprentice
WR.net Apprentice
 
Posts: 7
Joined: Tue Aug 15, 2006 2:12 am

Profile page limited to 4 pets

Postby zanix » Wed Jan 03, 2007 6:39 pm

Can you look at the database and sort it by member_id
Then see if there are the correct number of pets for that member_id
Read the Forum Rules, the WiKi, and Search before posting!
WoWRoster v2.1 - SigGen v0.3.3.523 - WoWRosterDF
User avatar
zanix
Admin
Admin
WoWRoster.net Dev Team
WoWRoster.net Dev Team
UA/UU Developer
UA/UU Developer
 
Posts: 5546
Joined: Mon Jul 03, 2006 8:29 am
Location: Idaho Falls, Idaho
Realm: Doomhammer (PvE) - US

Re: Profile page limited to 4 pets

Postby LLGames » Wed Jan 03, 2007 9:00 pm

This is due to a display error in roster/lib/char.php in the printPet function. There is a switch statement which only accounts for a maximum of 4 pets. The last two pets in the list both trigger the default case and one of the two icons completely obscures the other.

The offending switch statement:

Code: Select all
         switch ($petNum)
         {
            case 1:
               $left = 35;
               $top = 285;
               break;
            case 2:
               $left = 85;
               $top = 285;
               break;
            case 3:
               $left = 135;
               $top = 285;
               break;
            default:
               $left = 185;
               $top = 285;
               break;
         }


This is verified by looking at the display HTML (The area where the errors occur have been bolded):

<img src="img/Interface/Icons/Spell_Shadow_SummonSuccubus.jpg" onclick="showPet('1')" style="cursor:pointer;position:absolute;left:35px;top:285px;height:40px;width:40px;" alt="" onmouseover="return overlib(overlib_38,CAPTION,'Succubus',WRAP);" onmouseout="return nd();" /><img src="img/Interface/Icons/Spell_Shadow_SummonImp.jpg" onclick="showPet('2')" style="cursor:pointer;position:absolute;left:85px;top:285px;height:40px;width:40px;" alt="" onmouseover="return overlib(overlib_39,CAPTION,'Imp',WRAP);" onmouseout="return nd();" /><img src="img/Interface/Icons/Spell_Shadow_SummonVoidWalker.jpg" onclick="showPet('3')" style="cursor:pointer;position:absolute;left:135px;top:285px;height:40px;width:40px;" alt="" onmouseover="return overlib(overlib_40,CAPTION,'Voidwalker',WRAP);" onmouseout="return nd();" /><img src="img/Interface/Icons/Spell_Shadow_SummonFelGuard.jpg" onclick="showPet('4')" style="cursor:pointer;position:absolute;left:185px;top:285px;height:40px;width:40px;" alt="" onmouseover="return overlib(overlib_41,CAPTION,'Felguard',WRAP);" onmouseout="return nd();" /><img src="img/Interface/Icons/Spell_Shadow_SummonFelHunter.jpg" onclick="showPet('5')" style="cursor:pointer;position:absolute;left:185px;top:285px;height:40px;width:40px;" alt="" onmouseover="return overlib(overlib_42,CAPTION,'Felhunter',WRAP);" onmouseout="return nd();" />

Note how the last two icons both have the same left parameter so one icon obscures the other. This is a minor fix as the switch statement just needs to be adjusted to account for the added pet.

The revised switch statement:
Code: Select all
         switch ($petNum)
         {
            case 1:
               $left = 35;
               $top = 285;
               break;
            case 2:
               $left = 85;
               $top = 285;
               break;
            case 3:
               $left = 135;
               $top = 285;
               break;
            case 4:
               $left = 185;
               $top = 285;
               break;
            default:
               $left = 235;
               $top = 285;
               break;
         }


Hope this helps some.
User avatar
LLGames
WR.net Apprentice
WR.net Apprentice
 
Posts: 1
Joined: Wed Jan 03, 2007 8:10 pm

Profile page limited to 4 pets

Postby Marcellus » Mon Jan 08, 2007 3:02 pm

Sorry it too so long to get back on this.

Anyhow, that did the trick. Thank you LLGames!
Marcellus
WR.net Apprentice
WR.net Apprentice
 
Posts: 7
Joined: Tue Aug 15, 2006 2:12 am


Return to General Support & Feedback

Who is online

Users browsing this forum: No registered users and 1 guest

cron