Permalink
Browse files

version 0.7, added mage support and various changes

  • Loading branch information...
1 parent 27a0ee4 commit c9372602117f22c4869fd0f8541b2eb14efa0950 Mathijs Schmittmann committed Sep 4, 2011
Showing with 298 additions and 133 deletions.
  1. +7 −2 admin/crafting.php
  2. +22 −10 calculate.php
  3. +6 −0 changelog.txt
  4. +9 −5 css/riftupgrade.css
  5. +22 −6 faq.html
  6. +10 −1 index.php
  7. +219 −106 settings_magedps.php
  8. +3 −3 settings_roguedps.php
View
@@ -119,6 +119,12 @@
}
}
}
+
+// set source info for world drops (these are hidden from suggestionlist by default)
+$sql = "UPDATE items SET source='other', sourcename='Unknown (Let us know!)' WHERE (name REGEXP 'of the Fortress$' OR name REGEXP 'of the Anointed$' OR name REGEXP 'of the Devout$' OR name REGEXP 'of the Sovereign$' OR name REGEXP 'of the Defender$' OR name REGEXP 'of the Stalwart$' OR name REGEXP 'of Valor$' OR name REGEXP 'of the Mythical$') AND source IS NULL";
+echo $sql."<br />";
+$result = mysql_query($sql);
+echo mysql_errno($link) . ": " . mysql_error($link). "\n";
mysql_close($link);
// END OF MAIN CODE
@@ -608,7 +614,6 @@ function adddouble($augment,$statone,$stattwo,$slot,$type,$itemid){
$valuetwo += $currentvaluetwo;
mysql_query("UPDATE items SET modified='1', source='Crafting', sourcename='".$augment."', ".$statone."='".$valueone."', ".$stattwo."='".$valuetwo."' WHERE itemid='".$itemid."';");
-
-
}
+
?>
View
@@ -84,7 +84,7 @@ function upgrade($slot,$currentitemname,$stats,$statslist,$mainhand,$offhand,$sp
$currentitemname_escaped = mysql_real_escape_string($currentitemname);
// get stats for current equipped item
- $record = mysql_query("SELECT ".$statslist.",uniqgrp,itemid FROM items WHERE name='$currentitemname_escaped' AND itemid IN (SELECT itemid FROM class WHERE ".$spec."='1')") or die(mysql_error());
+ $record = mysql_query("SELECT ".$statslist.",uniqgrp,itemid,slot FROM items WHERE name='$currentitemname_escaped' AND itemid IN (SELECT itemid FROM class WHERE ".$spec."='1')") or die(mysql_error());
$result = mysql_fetch_assoc($record) or die("<p>Item not found, please check spelling.</p>");
// create array with stats of current item
@@ -94,6 +94,7 @@ function upgrade($slot,$currentitemname,$stats,$statslist,$mainhand,$offhand,$sp
}
$currentstats["uniqgrp"] = $result['uniqgrp'];
$currentzamurl = "http://rift.zam.com/en/item/".$result['itemid']."/";
+ $currentslot = $result['slot'];
// remove modifications on base stats to score properly
$stats = modifications_undo($stats);
@@ -170,7 +171,6 @@ function upgrade($slot,$currentitemname,$stats,$statslist,$mainhand,$offhand,$sp
}
}
- // calculate the new score
$newscore = score($stats,$slot);
// arrays used for source filtering
@@ -183,10 +183,25 @@ function upgrade($slot,$currentitemname,$stats,$statslist,$mainhand,$offhand,$sp
$zones = array("World","Stillmoor","Iron Pine Peaks","Shimmersand","Stonefield","Gloamwood","Lake of Solace","Moonshade Highlands","Droughtlands","Silverwood","Freemarch","Scarlet Gorge","Scarwood Reach");
// only display upgrades
- if(floor($newscore) > floor($oldscore)) {
+ if($newscore > $oldscore) {
+
+ // skip twohanders if the filter setting for this has been checked
+ if($_POST['ignoretwohanded'] && $result['slot']=="twohanded") $filtered = true;
+
+ // hide the scrub world drop items "...of the Fortress" etc if the filter setting for this hasn't been enabled
+ elseif(!$_POST['showworlddrop'] && (
+ (strpos($result['name'],"of the Fortress")>0 && $result['source']=="other") ||
+ (strpos($result['name'],"of the Anointed")>0 && $result['source']=="other") ||
+ (strpos($result['name'],"of the Devout")>0 && $result['source']=="other") ||
+ (strpos($result["name"],"of the Sovereign")>0 && $result['source']=="other") ||
+ (strpos($result['name'],"of the Defender")>0 && $result['source']=="other") ||
+ (strpos($result['name'],"of the Stalwart")>0 && $result['source']=="other") ||
+ (strpos($result['name'],"of Valor")>0 && $result['source']=="other") ||
+ (strpos($result['name'],"of the Mythical")>0 && $result['source']=="other")
+ )) $filtered = true;
// skip items which are filtered out by source, note that first character is left out for start-of-string matches, because a position of 0 would be returned which equals false..
- if($_POST['filter_quest'] && $result["source"]=="quest") $filtered = true;
+ elseif($_POST['filter_quest'] && $result["source"]=="quest") $filtered = true;
elseif($_POST['filter_vendor'] && $result["source"]=="vendor") $filtered = true;
elseif($_POST['filter_crafting'] && $result["source"]=="crafting") $filtered = true;
elseif($_POST['filter_unknown'] && ($result["sourcename"]=="Unknown"||$result["sourcename"]=="Unknown (Let us know!)")) $filtered = true;
@@ -244,7 +259,6 @@ function upgrade($slot,$currentitemname,$stats,$statslist,$mainhand,$offhand,$sp
// display a span element that on click will replace the current item
// with the upgrade suggestion in the form. does not work with rings/essences at the moment.
-
if($slot<>"ring"&&$slot<>"lesser"&&$slot<>"greater") {
?><span title="Equip item" onclick="fill('<? echo addslashes($plainitemname); ?>')">&larr;</span> <?
}
@@ -254,16 +268,15 @@ function upgrade($slot,$currentitemname,$stats,$statslist,$mainhand,$offhand,$sp
<td><? echo $source; ?></td><?
foreach($stats as $stat) {
- // if a stat has a threshold and should be displayed in the suggestion list,
- // format the cell in red when the stat value is below the threshold
-
// make sure displayed stats also account for talents/buffs
$stats = talents_calculate($stats);
$stats = buffs_calculate($stats);
$stats = stats_derive($stats);
$stats = talents_calculate_derived($stats);
$stats = buffs_calculate_derived($stats);
+ // if a stat has a threshold and should be displayed in the suggestion list,
+ // format the cell in red when the stat value is below the threshold
if($stat[4]&&$stat[5]) {
$threshold = $_POST[$stat[1].'target'];
if($stats[$stat[1]][0]<$threshold&&$threshold>0) {
@@ -359,13 +372,11 @@ function score($stats,$slot)
}
else // stat is under threshold
{
- //$stats = modifications_undo($stats);
$score += $stats[$stat[1]][0] * $_POST[$stat[1].'weight'];
}
}
else // no threshold was set
{
- //$stats = modifications_undo($stats);
$score += $stats[$stat[1]][0] * $_POST[$stat[1].'weight'];
}
@@ -404,6 +415,7 @@ function addup($name,$stats,$statslist,$spec)
{
$result = mysql_fetch_assoc(mysql_query("SELECT ".$statslist." FROM items WHERE name='$name' AND itemid IN (SELECT itemid FROM class WHERE ".$spec."='1')"));
foreach($stats as $stat) {
+ //echo $stat[1]." = ".$result[$stat[1]]."<br />";
$stats[$stat[1]][0] += $result[$stat[1]];
}
}
View
@@ -1,3 +1,9 @@
+v0.7 3/9/2011 now possible to filter out twohanders from suggestionlist (useful for mage/cleric/warrior)
+ also possible to filter out all the crappy '.. of Valor','.. of the Fortress' etc. items from the suggestions
+ cleaned up some css and php code, minor changes in calculations
+ added more questions to FAQ
+ mage version added!
+
v0.6.2 1/8/2011 gear/runes/options are now stored serverside instead of in cookies, meaning:
- users can create a link and put it in their bookmarks for personal use
- users can set a link to readonly and share it with others
View
@@ -16,7 +16,7 @@
float: left;
text-align: right;
margin-right: 5px;
- margin-top: 3px;
+ margin-top: 5px;
display: block;
font-size:12px;
}
@@ -70,13 +70,17 @@
border: 10px solid black;
padding: 10px;
}
- .settings,.shoutbox p {
+ .settings p,.shoutbox p {
font-size: 9px;
}
- .settings,.shoutbox label {
- font-size: 9px;
+ .settings label,.shoutbox label {
+ width: 100px;
+ font-size: 10px;
+ }
+ .settings input,.shoutbox input {
+ margin-top: 5px;
}
- .settings,.shoutbox input {
+ .settings option {
margin-top: 5px;
}
.output {
View
@@ -1,22 +1,38 @@
<h1>Rift-Upgrades FAQ</h1>
<h4>Something is broken!</h4>
-Since the tool is regularly updated, chances are that you have an outdated version in your browser cache. Make sure you have the very latest version in your browser; clear your cache and any cookies, and/or use Ctrl+F5 to refresh the page. If its still broken, <a href="mailto:riftupgrade@mathijs.info">let me know</a>.
+Since the tool is regularly updated, chances are that you have an outdated version in your browser cache. Make sure you have the very latest version in your browser; clear your cache and any cookies, and/or use Ctrl+F5 to refresh the page. Please keep in mind that the ZAM tooltips are not coded by me, so any errors with them are very likely to be at zam.com. If you think it really is a bug with riftupgrades.com, <a href="mailto:riftupgrade@mathijs.info">mail me</a> or click on the 'Shoutbox' button on a calculator page and let me know there.
-<h4>Only my gear and runes are being saved, I have to enter the settings again every time!</h4>
-This is an issue with a few common browsers unfortunately, having limits to how many form fields can be saved in a cookie. But luckily, Chrome and Firefox don't have this limitation, so use either of those instead!
+<h4>How do I load and save my gear?</h4>
+<p>There are three buttons for this:<br />
+<b>Save New</b>: Use this the first time after entering your gear, runes and settings. An URL will appear which you should bookmark for later use.<br />
+<b>Save Current</b>: After browsing to your bookmarked link and changing some input, you can save it under the same URL by using this button.<br />
+<b>Make Readonly</b>: Because anybody with your personal URL could change your gear/settings/etc, you normally would want to keep this private. However, if you want to share your version of the calculator with others, you can set your save to readonly, after which it's not possible to do 'Save Current' anymore. Simply click 'Save New' if you want a new, private URL.</p>
<h4>My item does not appear in the dropdown lists!</h4>
-<p>If an item does not appear in the dropdown list and you are 100% sure you spelled it correctly, its not in the database. Please <a href="mailto:riftupgrade@mathijs.info">let me know</a> when it should be. Keep in mind though that some items have not been tested (enough) yet to give any meaningful weight, such as greater essences and trinkets with procs that dont directly affect stats.</p>
+<p>If an item does not appear in the dropdown list and you are 100% sure you spelled it correctly, its not in the database. Please <a href="mailto:riftupgrade@mathijs.info">let me know</a> when it should be in the DB. <br />
+Keep in mind though that some items have not been tested (enough) yet to give any meaningful weight, such as greater essences and trinkets with procs that dont directly affect stats. Also, I don't add items that have a required level of 41 or lower, and are of green quality or worse, to keep the dataset manageable.</p>
+
+<h4>What do all the abbreviations in the Source column mean?</h4>
+<p style="font-size: 10pt;">T1: <b>FC</b>: Foul Cascade - <b>IT</b>: Iron Tombs - <b>ROTF</b>: Realm of the Fae - <b>KB</b>: King's Breach - <b>LH</b>: Lantern's Hook<br />
+T2: <b>DD</b>: Darkening Deeps - <b>DSM</b>: Deepstrike Mines - <b>RD</b>: Runic Descent - <b>CC</b>: Charmer's Caldera - <b>AP</b>: Abyssal Precipice<br />
+Raid T1: <b>GSB</b>: Greenscale's Blight - <b>RoS</b>: River of Souls<br />
+Raid T2: <b>HK</b>: Hammerknell Fortress</p>
<h4>How do I view all possible gear pieces for a slot?</h4>
<p>To view the full list for a slot, enter None as its name and click the suggested item in the dropdown box.</p>
<h4>How are the scores determined for items with proc effects, such as trinkets and essences?</h4>
-For trinket, buffs, and greater essences 100% uptime is assumed. Their real score might be a bit lower so a slight downgrade in the list might be equal in real use.
+For trinket, buffs, and greater essences, 100% uptime is assumed (in almost all cases). Their real score might be a bit lower so a slight downgrade in the list might be equal in real use.
<h4>Is weapon speed used in the calculations?</h4>
No, since damage is normalized, weapon speed only matters for proc effects such as poisons which aren't used in the calculation (yet).
+<h4>How are item scores calculated?</h4>
+In contrast to the common spreadsheets, the scores per item are calculated based on all your stats/runes/talents/weights, instead of just adding up scores from a single item. This makes the tool much more valuable then a simple BiS list. For the exact workings you would have to dive into the PHP code (see the link at the bottom of this page).
+
+<h4>I want to donate something!</h4>
+Just click on the google ads on the pages (if you can't see them, whitelist the domain in your Adblocker addon). This will indirectly donate a small amount of money. I use this to pay for hosting and domainname costs.
+
<h4>I have an idea / I want to help out!</h4>
-Great, view our public code repository <a href="https://github.com/Roobarb/Rift-Upgrades">here</a> and check out the wiki there. Feature requests and bugreports can also be made here. For realtime communication with the authors, you can drop by on IRC: #riftupgrades on irc.riftirc.com
+Great, view our public code repository <a href="https://github.com/Roobarb/Rift-Upgrades">here</a> and check out the wiki there. Feature requests and bugreports can also be made here. For realtime communication you can drop by on IRC: #riftupgrades on irc.riftirc.com , for somewhat slower communication the Shoutbox is useful too.
View
@@ -206,6 +206,15 @@
<td style="font-size: 9pt; "><input name="ignoreohdps" id="ignoreohdps" type="checkbox" />Ignore Offhand DPS</td>
<td style="font-size: 9pt; "><input name="ignorerngdps" id="ignorerngdps" type="checkbox" />Ignore Ranged DPS</td>
</tr>
+ <tr>
+ <td style="font-size: 9pt;" colspan="3"><p>Other suggestion filters:</p></td>
+ </tr>
+ <tr>
+ <td style="font-size: 9pt;" colspan="3"><input name="ignoretwohanded" id="ignoretwohanded" type="checkbox" />Hide twohanded weapons</p></td>
+ </tr>
+ <tr>
+ <td style="font-size: 9pt;" colspan="3"><input name="showworlddrop" id="showworlddrop" type="checkbox" />Show all the blue/epic world drops ("... of the Fortress", etc) in the results.</p></td>
+ </tr>
</table>
<p style="text-align: center;"><input type="button" value="Hide Settings" onclick="hideSettings()" /></p>
</div>
@@ -282,7 +291,7 @@
<div class="stats"></div>
</div>
<div id="right">
- <p style="font-weight: bold;font-size: 10pt;">Version 0.6.2 by Roobarb @ Blightweald - <a href="mailto:riftupgrade@mathijs.info">Feedback</a> - <a href="changelog.txt">Changelog/Todo</a> - <a href="faq.html">FAQ</a></p>
+ <p style="font-weight: bold;font-size: 10pt;">Version 0.7 by Roobarb @ Blightweald - <a href="mailto:riftupgrade@mathijs.info">Feedback</a> - <a href="changelog.txt">Changelog/Todo</a> - <a href="faq.html">FAQ</a></p>
</div>
</div> <!-- wrapper -->
Oops, something went wrong.

0 comments on commit c937260

Please sign in to comment.