Tidal Loop not being included in Calculation

Addon that shows the maximum statistics possible

Moderator: Exerladan

Tidal Loop not being included in Calculation

Postby scottelsdon » Mon Oct 30, 2006 4:59 pm

Since upgrading to 1.7.1 I've upgraded all addons I can find with newer versions, including max.resists to 3.11

Guild members were complaining that their resists weren't being aggregated correctly.

take a look at this for an example.

http://www.portsmouthshotokan.com/wowro ... Resistance

any fixes for this ?

Excellent work btw thanks
scottelsdon
WR.net Apprentice
WR.net Apprentice
 
Posts: 14
Joined: Tue Aug 01, 2006 4:14 pm

Tidal Loop not being included in Calculation

Postby Medar » Mon Nov 20, 2006 11:58 pm

Same issue with Ocean's Breeze...but I see this is a month old with no repsonse.
Medar
WR.net Apprentice
WR.net Apprentice
 
Posts: 4
Joined: Fri Jul 07, 2006 9:02 pm

Tidal Loop not being included in Calculation

Postby sturmy » Tue Nov 21, 2006 12:37 am

Look for the post about druid spalders. Exer did some nice changes to be more accurate although we're not finished yet.
sturmy
WR.net Expert
WR.net Expert
 
Posts: 160
Joined: Wed Aug 16, 2006 9:07 pm

Tidal Loop not being included in Calculation

Postby scottelsdon » Tue Nov 21, 2006 3:51 am

thanks for that :-)
scottelsdon
WR.net Apprentice
WR.net Apprentice
 
Posts: 14
Joined: Tue Aug 01, 2006 4:14 pm

Tidal Loop not being included in Calculation

Postby Exerladan » Tue Nov 21, 2006 2:57 pm

You're welcome :D
Exerladan
Roster AddOn Dev
Roster AddOn Dev
 
Posts: 101
Joined: Tue Jul 25, 2006 2:47 pm

Re: Tidal Loop not being included in Calculation

Postby bollweevil » Sun Dec 03, 2006 5:23 am

I had a slightly different problem with Tidal Loop and some other items. I think it's the same problem that Silvereye had in his post
http://www.wowroster.net/Forums/viewtopic/t=1722.html

The Tidal Loop showed up in the graphical character inventory slots, but did not show up under the "Gear Used" table, and it's FR value was not summed into the character's FR total.

Debugging the SQL, it appears that the Tidal Loop was returned with the SQL query, but had FR1,FR2,FR3 values of 0.

Finally, I found that there were line feed characters ('\n') in the SQL statement where it was searching for the string LOCATE('".$Fire_Resistance."\n'. The extra line feed character was causing the SQL to fail when searching for the string "Fire Resistance\n", and thus the FR1 and FR2 defaulted to 0. I imaging the author put these line feed characters in to make the debug output look readable, but on my server, it caused the query fail.

The fix was to remove the '\n' character in both SQL statements in maxres.php (a total of 8 occurrances).

Original
Code: Select all
     "CONVERT(replace(SUBSTRING(item_tooltip,LOCATE('".$Fire_Resistance."\n', item_tooltip,LOCATE('".$tooltip_soulbound."', item_tooltip))-3,2),'+','') ,SIGNED INTEGER) as FR1, ".
     "CONVERT(Ifnull(replace(SUBSTRING(item_tooltip,Nullif(LOCATE('".$Fire_Resistance."\n', item_tooltip,LOCATE('".$Fire_Resistance."\n', item_tooltip, LOCATE('".$tooltip_soulbound."', item_tooltip))+1),0)-3,2),'+',''),0),SIGNED INTEGER) + CONVERT(Ifnull(replace(SUBSTRING(item_tooltip,Nullif(LOCATE('".$Fire_Resistance." +', item_tooltip,LOCATE('".$Fire_Resistance." +', item_tooltip, LOCATE('".$tooltip_soulbound."', item_tooltip))-1),0)+LENGTH('".$Fire_Resistance." +'),2),'+',''),0),SIGNED INTEGER) as FR2, ".
     "CONVERT(replace(SUBSTRING(item_tooltip,LOCATE('".$Fire_Resistance."\n', item_tooltip,LOCATE('".$tooltip_soulbound."', item_tooltip))-3,2),'+','') ,SIGNED INTEGER) + ".
     "CONVERT(Ifnull(replace(SUBSTRING(item_tooltip,Nullif(LOCATE('".$Fire_Resistance."\n', item_tooltip,LOCATE('".$Fire_Resistance."\n', item_tooltip, LOCATE('".$tooltip_soulbound."', item_tooltip))+1) ,0)-3,2),'+',''),0) ,SIGNED INTEGER) + CONVERT(Ifnull(replace(SUBSTRING(item_tooltip,Nullif(LOCATE('".$Fire_Resistance." +', item_tooltip,LOCATE('".$Fire_Resistance." +', item_tooltip, LOCATE('".$tooltip_soulbound."', item_tooltip))-1),0)+LENGTH('".$Fire_Resistance." +'),2),'+',''),0),SIGNED INTEGER) as FR3 ".


Patched
Code: Select all
     "CONVERT(replace(SUBSTRING(item_tooltip,LOCATE('".$Fire_Resistance."', item_tooltip,LOCATE('".$tooltip_soulbound."', item_tooltip))-3,2),'+','') ,SIGNED INTEGER) as FR1, ".
     "CONVERT(Ifnull(replace(SUBSTRING(item_tooltip,Nullif(LOCATE('".$Fire_Resistance."', item_tooltip,LOCATE('".$Fire_Resistance."', item_tooltip, LOCATE('".$tooltip_soulbound."', item_tooltip))+1),0)-3,2),'+',''),0),SIGNED INTEGER) + CONVERT(Ifnull(replace(SUBSTRING(item_tooltip,Nullif(LOCATE('".$Fire_Resistance." +', item_tooltip,LOCATE('".$Fire_Resistance." +', item_tooltip, LOCATE('".$tooltip_soulbound."', item_tooltip))-1),0)+LENGTH('".$Fire_Resistance." +'),2),'+',''),0),SIGNED INTEGER) as FR2, ".
     "CONVERT(replace(SUBSTRING(item_tooltip,LOCATE('".$Fire_Resistance."', item_tooltip,LOCATE('".$tooltip_soulbound."', item_tooltip))-3,2),'+','') ,SIGNED INTEGER) + ".
     "CONVERT(Ifnull(replace(SUBSTRING(item_tooltip,Nullif(LOCATE('".$Fire_Resistance."', item_tooltip,LOCATE('".$Fire_Resistance."', item_tooltip, LOCATE('".$tooltip_soulbound."', item_tooltip))+1) ,0)-3,2),'+',''),0) ,SIGNED INTEGER) + CONVERT(Ifnull(replace(SUBSTRING(item_tooltip,Nullif(LOCATE('".$Fire_Resistance." +', item_tooltip,LOCATE('".$Fire_Resistance." +', item_tooltip, LOCATE('".$tooltip_soulbound."', item_tooltip))-1),0)+LENGTH('".$Fire_Resistance." +'),2),'+',''),0),SIGNED INTEGER) as FR3 ".


Edit: After creating a forums account to make this post, I was then able to see Exerladan's attachment in the other thread, which apparently already addresses the issue. Sorry for the repost.
Last edited by bollweevil on Sun Dec 03, 2006 5:32 am, edited 1 time in total.
bollweevil
WR.net Apprentice
WR.net Apprentice
 
Posts: 1
Joined: Sun Dec 03, 2006 5:05 am


Return to Max Stats

Who is online

Users browsing this forum: No registered users and 0 guests

cron