| author | Rink Springer <rink@rink.nu> |
| Wed Mar 05 20:30:48 2008 +0100 (2008-03-05 ago) | |
| changeset 14 | 31ea53c48db6 |
| parent 13 | 24013e2231c8 |
| child 15 | f505a7ec4723 |
Final phase of the 1.10+ addition effort! Everything should be in by now.
1.1 --- a/scripts/mig-spells.pl Wed Mar 05 20:02:28 2008 +0100 1.2 +++ b/scripts/mig-spells.pl Wed Mar 05 20:30:48 2008 +0100 1.3 @@ -14,7 +14,7 @@ 1.4 my $addspell_sth = $DB->prepare("INSERT INTO spell (name) VALUES (?)"); 1.5 my $getitemprop_sth = $DB->prepare("SELECT itemid,value,value_min,value_max FROM item_item_prop WHERE itempropid=?"); 1.6 my $addspellprop_sth = $DB->prepare("INSERT INTO item_spell (itemid,spellid,type,level_val,level_min,level_max,pct_val,pct_min,pct_max,num_charges) VALUES (?,?,?,?,?,?,?,?,?,?)"); 1.7 -my $prop_sth = $DB->prepare("SELECT itempropid,name FROM itemproperty WHERE name LIKE '% Chance to%' OR name LIKE '% Change To%' OR name LIKE 'Charges: %'"); 1.8 +my $prop_sth = $DB->prepare("SELECT itempropid,name FROM itemproperty WHERE name LIKE '% Chance to%' OR name LIKE '% Chance To%' OR name LIKE 'Charges: %'"); 1.9 $prop_sth->execute or die; 1.10 1.11 my $zapip_sth = $DB->prepare("DELETE FROM item_item_prop WHERE itempropid=?");
2.1 --- a/templates/footer.tpl Wed Mar 05 20:02:28 2008 +0100 2.2 +++ b/templates/footer.tpl Wed Mar 05 20:30:48 2008 +0100 2.3 @@ -5,7 +5,7 @@ 2.4 </div> 2.5 <p /> 2.6 <div class="copyrightbar"> 2.7 - © 2007 <a href="http://rink.nu">Rink Springer</a> 2.8 + © 2007 - 2008 <a href="http://rink.nu">Rink Springer</a> 2.9 </div> 2.10 </body> 2.11 </html>
3.1 --- a/templates/header.tpl Wed Mar 05 20:02:28 2008 +0100 3.2 +++ b/templates/header.tpl Wed Mar 05 20:30:48 2008 +0100 3.3 @@ -1,7 +1,7 @@ 3.4 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> 3.5 <html xmlns="http://www.w3.org/1999/xhtml"> 3.6 <head> 3.7 - <title>Diablo2 1.09 Lives!</title> 3.8 + <title>Diablo2 Lives!</title> 3.9 <link href="style.css" rel="Stylesheet" type="text/css" /> 3.10 </head> 3.11 <body>
4.1 --- a/templates/index.tpl Wed Mar 05 20:02:28 2008 +0100 4.2 +++ b/templates/index.tpl Wed Mar 05 20:30:48 2008 +0100 4.3 @@ -1,17 +1,23 @@ 4.4 {include file="header.tpl"} 4.5 <table class="itemtab"> 4.6 <tr> 4.7 - <td class="header" colspan="2"> 4.8 - Diablo2 Item Website 4.9 - </td> 4.10 + <td class="header" colspan="2">Diablo 2: Lord of Destruction Items</td> 4.11 </tr> 4.12 <tr> 4.13 <td>Collected / Total set items</td> 4.14 <td>{$setitems_owned} / {$setitems_total} ({$setitems_pct} %)</td> 4.15 </tr> 4.16 <tr> 4.17 - <td>Collected / Total unique items</td> 4.18 - <td>{$uniqueitems_owned} / {$uniqueitems_total} ({$uniqueitems_pct} %)</td> 4.19 + <td>Collected / Total unique items (1.09)</td> 4.20 + <td>{$uniqueitems109_owned} / {$uniqueitems109_total} ({$uniqueitems109_pct} %)</td> 4.21 + </tr> 4.22 + <tr> 4.23 + <td>Collected / Total unique items (1.10+)</td> 4.24 + <td>{$uniqueitems110_owned} / {$uniqueitems110_total} ({$uniqueitems110_pct} %)</td> 4.25 + </tr> 4.26 + <tr> 4.27 + <td>Collected / Total all items (1.09)</td> 4.28 + <td>{$items109_owned} / {$items109_total} ({$items109_pct} %)</td> 4.29 </tr> 4.30 <tr> 4.31 <td>Collected / Total all items</td>
5.1 --- a/templates/item-details.tpl Wed Mar 05 20:02:28 2008 +0100 5.2 +++ b/templates/item-details.tpl Wed Mar 05 20:30:48 2008 +0100 5.3 @@ -47,7 +47,7 @@ 5.4 {elseif $spell.type=="S"} 5.5 +{if $spell.lval!=""}{$spell.lval}{else}{$spell.lmin} - {$spell.lmax}{/if} to {$spell.name} ({$spell.class} only) 5.6 {else} 5.7 - {if $spell.pval!=""}{$spell.pval}{else}{$spell.pmin} - {$spell.pmax} {/if} % Chance to Cast Level {if $spell.lval!=""}{$spell.lval}{else}{$spell.lmin} - {$spell.lmax}{/if} {$spell.name} {if $spell.type=="O"}on striking{elseif $spell.type=="W"}when struck{elseif $spell.type=="A"}on Attack{/if} 5.8 + {if $spell.pval!=""}{$spell.pval}{else}{$spell.pmin} - {$spell.pmax} {/if} % Chance to Cast Level {if $spell.lval!=""}{$spell.lval}{else}{$spell.lmin} - {$spell.lmax}{/if} {$spell.name} {if $spell.type=="O"}on striking{elseif $spell.type=="W"}when struck{elseif $spell.type=="A"}on Attack{elseif $spell.type=="I"}when you die{elseif $spell.type=="L"}when you level-up{/if} 5.9 {/if} 5.10 <br/> 5.11 {/foreach}
6.1 Binary file www/images/items/types/grandcharm.gif has changed
7.1 Binary file www/images/items/types/jewel.gif has changed
8.1 Binary file www/images/items/types/largecharm.gif has changed
9.1 Binary file www/images/items/types/smallcharm.gif has changed
10.1 --- a/www/index.php Wed Mar 05 20:02:28 2008 +0100 10.2 +++ b/www/index.php Wed Mar 05 20:30:48 2008 +0100 10.3 @@ -1,11 +1,6 @@ 10.4 <?php 10.5 require "lib.php"; 10.6 10.7 - $res = $GLOBALS["DB"]->query(" 10.8 - SELECT itemcatid,name FROM itemcategory ORDER BY name ASC 10.9 - "); 10.10 - if (PEAR::isError($res)) { die($res->getMessage()); } 10.11 - 10.12 // grab the total number of set item 10.13 $res = $GLOBALS["DB"]->query(" 10.14 SELECT COUNT(itemid) AS amount 10.15 @@ -23,22 +18,46 @@ 10.16 if (PEAR::isError($res)) { die($res->getMessage()); } 10.17 $a = $res->fetchRow(); $setitems_owned = $a["amount"]; 10.18 10.19 - // grab the total number of unique item 10.20 + // grab the total number of unique items (1.09) 10.21 $res = $GLOBALS["DB"]->query(" 10.22 SELECT COUNT(itemid) AS amount 10.23 FROM item 10.24 WHERE itemsetid IS NULL 10.25 + AND version=109 10.26 "); 10.27 if (PEAR::isError($res)) { die($res->getMessage()); } 10.28 - $a = $res->fetchRow(); $uniqueitems_total = $a["amount"]; 10.29 - // grab the total number of unique item owned 10.30 + $a = $res->fetchRow(); $uniqueitems109_total = $a["amount"]; 10.31 + 10.32 + // grab the total number of unique item owned (1.09) 10.33 $res = $GLOBALS["DB"]->query(" 10.34 SELECT COUNT(DISTINCT ci.itemid) AS amount 10.35 FROM char_item ci,item i 10.36 WHERE ci.itemid=i.itemid AND i.itemsetid IS NULL 10.37 + AND i.version=109 10.38 "); 10.39 if (PEAR::isError($res)) { die($res->getMessage()); } 10.40 - $a = $res->fetchRow(); $uniqueitems_owned = $a["amount"]; 10.41 + $a = $res->fetchRow(); $uniqueitems109_owned = $a["amount"]; 10.42 + 10.43 + // grab the total number of unique items (1.10+) 10.44 + $res = $GLOBALS["DB"]->query(" 10.45 + SELECT COUNT(itemid) AS amount 10.46 + FROM item 10.47 + WHERE itemsetid IS NULL 10.48 + AND version>=110 10.49 + "); 10.50 + if (PEAR::isError($res)) { die($res->getMessage()); } 10.51 + $a = $res->fetchRow(); $uniqueitems110_total = $a["amount"]; 10.52 + 10.53 + // grab the total number of unique item owned (1.10+) 10.54 + $res = $GLOBALS["DB"]->query(" 10.55 + SELECT COUNT(DISTINCT ci.itemid) AS amount 10.56 + FROM char_item ci,item i 10.57 + WHERE ci.itemid=i.itemid AND i.itemsetid IS NULL 10.58 + AND i.version>=110 10.59 + "); 10.60 + if (PEAR::isError($res)) { die($res->getMessage()); } 10.61 + $a = $res->fetchRow(); $uniqueitems110_owned = $a["amount"]; 10.62 + 10.63 // fetch the number of items per set 10.64 $res = $GLOBALS["DB"]->query(" 10.65 SELECT i.itemsetid,COUNT(DISTINCT ci.itemid) AS itemcount 10.66 @@ -63,17 +82,24 @@ 10.67 } 10.68 } 10.69 10.70 + $GLOBALS["smarty"]->assign("uniqueitems109_total", $uniqueitems109_total); 10.71 + $GLOBALS["smarty"]->assign("uniqueitems109_owned", $uniqueitems109_owned); 10.72 + $GLOBALS["smarty"]->assign("uniqueitems109_pct", sprintf("%.02f", ($uniqueitems109_owned / $uniqueitems109_total) * 100)); 10.73 + $GLOBALS["smarty"]->assign("uniqueitems110_total", $uniqueitems110_total); 10.74 + $GLOBALS["smarty"]->assign("uniqueitems110_owned", $uniqueitems110_owned); 10.75 + $GLOBALS["smarty"]->assign("uniqueitems110_pct", sprintf("%.02f", ($uniqueitems110_owned / $uniqueitems110_total) * 100)); 10.76 + $GLOBALS["smarty"]->assign("items109_total", ($setitems_total + $uniqueitems109_total)); 10.77 + $GLOBALS["smarty"]->assign("items109_owned", ($setitems_owned + $uniqueitems109_owned)); 10.78 + $GLOBALS["smarty"]->assign("items109_pct", sprintf("%.02f", (($setitems_owned + $uniqueitems109_owned) / ($setitems_total + $uniqueitems109_total)) * 100)); 10.79 + $GLOBALS["smarty"]->assign("items_total", ($setitems_total + $uniqueitems109_total + $uniqueitems110_total)); 10.80 + $GLOBALS["smarty"]->assign("items_owned", ($setitems_owned + $uniqueitems109_owned + $uniqueitems110_owned)); 10.81 + $GLOBALS["smarty"]->assign("items_pct", sprintf("%.02f", (($setitems_owned + $uniqueitems109_owned + $uniqueitems110_owned) / ($setitems_total + $uniqueitems109_total + $uniqueitems110_total) * 100))); 10.82 $GLOBALS["smarty"]->assign("setitems_total", $setitems_total); 10.83 $GLOBALS["smarty"]->assign("setitems_owned", $setitems_owned); 10.84 $GLOBALS["smarty"]->assign("setitems_pct", sprintf("%.02f", ($setitems_owned / $setitems_total) * 100)); 10.85 - $GLOBALS["smarty"]->assign("uniqueitems_total", $uniqueitems_total); 10.86 - $GLOBALS["smarty"]->assign("uniqueitems_owned", $uniqueitems_owned); 10.87 - $GLOBALS["smarty"]->assign("uniqueitems_pct", sprintf("%.02f", ($uniqueitems_owned / $uniqueitems_total) * 100)); 10.88 - $GLOBALS["smarty"]->assign("items_total", ($setitems_total + $uniqueitems_total)); 10.89 - $GLOBALS["smarty"]->assign("items_owned", ($setitems_owned + $uniqueitems_owned)); 10.90 - $GLOBALS["smarty"]->assign("items_pct", sprintf("%.02f", (($setitems_owned + $uniqueitems_owned) / ($setitems_total + $uniqueitems_total)) * 100)); 10.91 $GLOBALS["smarty"]->assign("sets_total", $setitems); 10.92 $GLOBALS["smarty"]->assign("sets_complete", $setcomplete); 10.93 $GLOBALS["smarty"]->assign("sets_pct", sprintf("%.02f", (($setcomplete / $setitems) * 100))); 10.94 + 10.95 $GLOBALS["smarty"]->display("index.tpl"); 10.96 ?>