Character Browser My Changes.
Reply
My Changes.
I thought I'd just make a thread that I can update over time with my changes, rather than continuously making separate threads. To start this thread off, aug types. Also, I'm not going to post all the changes I made, but I removed sign() from all of my code due to the fact if the column is negative it will show -#; therefore, I see no reason to show +#.

Here's a picture of some of the changes.
http://img822.imageshack.us/img822/3026/9z2t.png
Here's a diff for heroics and aug types.
Diff Output
More +
"C:\\Website\\magelo_new/character.php"
@@ -154,11 +154,23 @@
   'INT' => ($baseINT+$itemstats->INT()),
   'WIS' => ($baseWIS+$itemstats->WIS()),
   'CHA' => ($baseCHA+$itemstats->CHA()),
+  'HSTR' => ($itemstats->HSTR()),  
+  'HSTA' => ($itemstats->HSTA()),  
+  'HDEX' => ($itemstats->HDEX()),  
+  'HAGI' => ($itemstats->HAGI()),  
+  'HINT' => ($itemstats->HINT()),  
+  'HWIS' => ($itemstats->HWIS()),  
+  'HCHA' => ($itemstats->HCHA()),
   'POISON' => (PRbyRace($race)+$PRbyClass[$class]+$itemstats->PR()),
   'FIRE' => (FRbyRace($race)+$FRbyClass[$class]+$itemstats->FR()),
   'MAGIC' => (MRbyRace($race)+$MRbyClass[$class]+$itemstats->MR()),
   'DISEASE' => (DRbyRace($race)+$DRbyClass[$class]+$itemstats->DR()),
   'COLD' => (CRbyRace($race)+$CRbyClass[$class]+$itemstats->CR()),
+  'HPOISON' => $itemstats->HPR(),
+  'HFIRE' => $itemstats->HFR(),
+  'HMAGIC' => $itemstats->HMR(),
+  'HDISEASE' => $itemstats->HDR(),
+  'HCOLD' => $itemstats->HCR(),
   'WEIGHT' => round($itemstats->WT()/10),
   'PP' => (($mypermission['coininventory'])?$language['MESSAGE_DISABLED']:$pp),
   'GP' => (($mypermission['coininventory'])?$language['MESSAGE_DISABLED']:$gp),
@@ -189,11 +201,23 @@
   'L_INT' => $language['CHAR_INT'],
   'L_WIS' => $language['CHAR_WIS'],
   'L_CHA' => $language['CHAR_CHA'],
+  'L_HSTR' => $language['CHAR_HSTR'],
+  'L_HSTA' => $language['CHAR_HSTA'],
+  'L_HDEX' => $language['CHAR_HDEX'],
+  'L_HAGI' => $language['CHAR_HAGI'],
+  'L_HINT' => $language['CHAR_HINT'],
+  'L_HWIS' => $language['CHAR_HWIS'],
+  'L_HCHA' => $language['CHAR_HCHA'],
   'L_POISON' => $language['CHAR_POISON'],
   'L_MAGIC' => $language['CHAR_MAGIC'],
   'L_DISEASE' => $language['CHAR_DISEASE'],
   'L_FIRE' => $language['CHAR_FIRE'],
   'L_COLD' => $language['CHAR_COLD'],
+  'L_HPOISON' => $language['CHAR_HPOISON'],
+  'L_HMAGIC' => $language['CHAR_HMAGIC'],
+  'L_HDISEASE' => $language['CHAR_HDISEASE'],
+  'L_HFIRE' => $language['CHAR_HFIRE'],
+  'L_HCOLD' => $language['CHAR_HCOLD'],
   'L_WEIGHT' => $language['CHAR_WEIGHT'],
   'L_AAS' => $language['BUTTON_AAS'],
   'L_KEYS' => $language['BUTTON_KEYS'],
"C:\\Website\\magelo_new/include/global.php"
@@ -385,5 +385,38 @@
 $dbslots[2]="Ear";
 $dbslots[1]="Charm";
 
+$augtypes = array();
+$augtypes[2147483647] = "All Types";
+$augtypes[536870912] = "Type 30";
+$augtypes[268435456] = "Type 29";
+$augtypes[134217728] = "Type 28";
+$augtypes[67108864] = "Type 27";
+$augtypes[33554432] = "Type 26";
+$augtypes[16777216] = "Type 25";
+$augtypes[8388608] = "Type 24";
+$augtypes[4194304] = "Type 23";
+$augtypes[2097152] = "Type 22";
+$augtypes[1048576] = "Type 21";
+$augtypes[524288] = "Type 20";
+$augtypes[262144] = "Type 19";
+$augtypes[131072] = "Type 18";
+$augtypes[65536] = "Type 17";
+$augtypes[32768] = "Type 16";
+$augtypes[16384] = "Type 15";
+$augtypes[8192] = "Type 14";
+$augtypes[4096] = "Type 13";
+$augtypes[2048] = "Type 12";
+$augtypes[1024] = "Type 11";
+$augtypes[512] = "Type 10";
+$augtypes[256] = "Type 9";
+$augtypes[128] = "Type 8";
+$augtypes[64] = "Type 7";
+$augtypes[32] = "Type 6";
+$augtypes[16] = "Type 5";
+$augtypes[8] = "Type 4";
+$augtypes[4] = "Type 3";
+$augtypes[2] = "Type 2";
+$augtypes[1] = "Type 1";
+
 
 ?>
\ No newline at end of file
"C:\\Website\\magelo_new/include/item.php"
@@ -97,7 +97,7 @@
   return $res;
 }
 
-function gedeities($val) {
+function getdeities($val) {
   global $dbideities;
   reset($dbideities);
   do {
@@ -107,6 +107,24 @@
   return $res;
 }
 
+function getaugtype($val)
+{
+       global $augtypes;
+       reset($augtypes);
+       do
+       {
+               $key = key($augtypes);
+               if($key <= $val)
+               {
+                       $val -= $key;
+                       $res .= $v . current($augtypes);
+                       $v = ", ";
+               }
+       }
+       while (next($augtypes));
+               return $res;
+}
+
 
 function sign($val) {
   if ($val>0) { return "+$val"; } else { return $val; }
@@ -157,7 +175,7 @@
       
        // Augmentation type
        if($item["itemtype"] == 54) {
-               if($item["augtype"] > 0) { $Output .= $tab."Augmentation type: ".$item["augtype"]."<br>\n"; }
+               if($item["augtype"] > 0) { $Output .= $tab."Augmentation type: ".getaugtype($item["augtype"])."<br>\n"; }
                else { $Output .= $tab."Augmentation type: for all slots<br>\n"; }
        }
       
@@ -269,25 +290,37 @@
       
        // Stats / HP / Mana / Endurance
        $Stats = "";
-       if($item[ "astr"] != 0)  $Stats .= " STR: "           .sign($item ["astr"]);
-       if($item[ "asta"] != 0)  $Stats .= " STA: "           .sign($item ["asta"]);
-       if($item[ "aagi"] != 0)  $Stats .= " AGI: "           .sign($item ["aagi"]);
-       if($item[ "adex"] != 0)  $Stats .= " DEX: "           .sign($item ["adex"]);
-       if($item[ "awis"] != 0)  $Stats .= " WIS: "           .sign($item ["awis"]);
-       if($item[ "aint"] != 0)  $Stats .= " INT: "           .sign($item ["aint"]);
-       if($item[ "acha"] != 0)  $Stats .= " CHA: "           .sign($item ["acha"]);
-       if($item[   "hp"] != 0)  $Stats .= " HP: "            .sign($item   ["hp"]);
-       if($item[ "mana"] != 0)  $Stats .= " MANA: "          .sign($item ["mana"]);
-       if($item["endur"] != 0)  $Stats .= " Endurance: "     .sign($item["endur"]);
+       if($item[ "astr"] != 0)  $Stats         .= " STR: "             . $item ["astr"];
+       if($item["heroic_str"] != 0) $Stats .= " " . $item["heroic_str"] ;
+       if($item[ "asta"] != 0)  $Stats         .= " STA: "             . $item ["asta"];
+       if($item["heroic_sta"] != 0) $Stats .= " " . $item["heroic_sta"] ;
+       if($item[ "aagi"] != 0)  $Stats         .= " AGI: "             . $item ["aagi"];
+       if($item["heroic_agi"] != 0) $Stats .= " " . $item["heroic_agi"] ;
+       if($item[ "adex"] != 0)  $Stats         .= " DEX: "             . $item ["adex"];
+       if($item["heroic_dex"] != 0) $Stats .= " " . $item["heroic_dex"] ;
+       if($item[ "awis"] != 0)  $Stats         .= " WIS: "             . $item ["awis"];
+       if($item["heroic_wis"] != 0) $Stats .= " " . $item["heroic_wis"] ;
+       if($item[ "aint"] != 0)  $Stats         .= " INT: "             . $item ["aint"];
+       if($item["heroic_int"] != 0) $Stats .= " " . $item["heroic_int"] ;
+       if($item[ "acha"] != 0)  $Stats         .= " CHA: "             . $item ["acha"];
+       if($item["heroic_cha"] != 0) $Stats .= " " . $item["heroic_cha"] ;
        if($Stats != "") { $Output .= $tab.$Stats."<br>\n"; }
       
        //resists
        $Stats = "";
-       if($item[   "fr"] != 0)  $Stats .= " SV FIRE: "   .sign($item   ["fr"]);
-       if($item[   "dr"] != 0)  $Stats .= " SV DISEASE: ".sign($item   ["dr"]);
-       if($item[   "cr"] != 0)  $Stats .= " SV COLD: "   .sign($item   ["cr"]);
-       if($item[   "mr"] != 0)  $Stats .= " SV MAGIC: "  .sign($item   ["mr"]);
-       if($item[   "pr"] != 0)  $Stats .= " SV POISON: " .sign($item   ["pr"]);
+       if($item[   "fr"] != 0)  $Stats .= " Fire: "    . $item["fr"] ;
+       if($item["heroic_fr"] != 0) $Stats .= " " . $item["heroic_fr"] ;
+       if($item[   "dr"] != 0)  $Stats .= " Disease: " . $item["dr"] ;
+       if($item["heroic_dr"] != 0) $Stats .= " " . $item["heroic_dr"] ;
+       if($item[   "cr"] != 0)  $Stats .= " Cold: "    . $item["cr"] ;
+       if($item["heroic_cr"] != 0) $Stats .= " " . $item["heroic_cr"] ;
+       if($item[   "mr"] != 0)  $Stats .= " Magic: "   . $item["mr"] ;
+       if($item["heroic_mr"] != 0) $Stats .= " " . $item["heroic_mr"];
+       if($item[   "pr"] != 0)  $Stats .= " Poison: "  . $item["pr"];
+       if($item["heroic_pr"] != 0) $Stats .= " " . $item["heroic_pr"];
+       if($item[   "hp"] != 0)  $Stats .= " HP: "            .sign($item   ["hp"]);
+       if($item[ "mana"] != 0)  $Stats .= " MANA: "          .sign($item ["mana"]);
+       if($item["endur"] != 0)  $Stats .= " Endurance: "     .sign($item["endur"]);
        if($Stats != "") { $Output .= $tab.$Stats."<br>\n"; }
       
        // bonuses
@@ -343,7 +370,7 @@
        $Output .= $tab."Race: ".getraces($item["races"])."<br>\n";
       
        // Deity
-       if($item["deity"] > 0) { $Output .= $tab."Deity: ".gedeities($item["deity"])."<br>\n"; }
+       if($item["deity"] > 0) { $Output .= $tab."Deity: ".getdeities($item["deity"])."<br>\n"; }
       
        // Augmentations
        for( $i = 1; $i <= 5; $i ++) {"C:\\Website\\magelo_new/include/statsclass.php"
        var $myWIS;
        var $myINT;
        var $myCHA;
+       var $myHSTR;
+       var $myHSTA;
+       var $myHAGI;
+       var $myHDEX;
+       var $myHWIS;
+       var $myHINT;
+       var $myHCHA;
        var $myMR;
        var $myPR;
        var $myCR;
        var $myFR;
        var $myDR;
+       var $myHMR;
+       var $myHPR;
+       var $myHCR;
+       var $myHFR;
+       var $myHDR;
        var $myFT;
        var $myDS;
        var $myregen;
@@ -64,11 +76,23 @@
          $this->myWIS += $row['awis'];
          $this->myINT += $row['aint'];
          $this->myCHA += $row['acha'];
+         $this->myHSTR += $row['heroic_str'];
+         $this->myHSTA += $row['heroic_sta'];
+         $this->myHAGI += $row['heroic_agi'];
+         $this->myHDEX += $row['heroic_dex'];
+         $this->myHWIS += $row['heroic_wis'];
+         $this->myHINT += $row['heroic_int'];
+         $this->myHCHA += $row['heroic_cha'];
          $this->myMR += $row['mr'];
          $this->myPR += $row['pr'];
          $this->myCR += $row['cr'];
          $this->myFR += $row['fr'];
          $this->myDR += $row['dr'];
+         $this->myHMR += $row['heroic_mr'];
+         $this->myHPR += $row['heroic_pr'];
+         $this->myHCR += $row['heroic_cr'];
+         $this->myHFR += $row['heroic_fr'];
+         $this->myHDR += $row['heroic_dr'];
          $this->myFT += $row['manaregen'];
          $this->myDS += $row['damageshield'];
          $this->myregen += $row['regen'];
@@ -125,6 +149,34 @@
          return $this->myCHA;
          }
 
+               function HSTR() {
+         return $this->myHSTR;
+         }
+
+         function HSTA() {
+         return $this->myHSTA;
+         }
+
+         function HAGI() {
+         return $this->myHAGI;
+         }
+
+         function HDEX() {
+         return $this->myHDEX;
+         }
+
+         function HWIS() {
+         return $this->myHWIS;
+         }
+
+         function HINT() {
+         return $this->myHINT;
+         }
+
+         function HCHA() {
+         return $this->myHCHA;
+         }    
+                      
          function MR() {
          return $this->myMR;
          }
@@ -145,6 +197,26 @@
          return $this->myDR;
          }
 
+         function HMR() {
+         return $this->myHMR;
+         }
+
+         function HPR() {
+         return $this->myHPR;
+         }
+
+         function HCR() {
+         return $this->myHCR;
+         }
+
+         function HFR() {
+         return $this->myHFR;
+         }
+
+         function HDR() {
+         return $this->myHDR;
+         }
+
          function FT() {
          return $this->myFT;
          }
"C:\\Website\\magelo_new/templates/character_body.tpl"
@@ -84,17 +84,17 @@
               <tr><td class='Divider' colspan='2'></td></tr>
               <tr>
                 <td>{L_STR}<br>{L_STA}<br>{L_AGI}<br>{L_DEX}</td>
-                <td width='100%'>{STR}<br>{STA}<br>{AGI}<br>{DEX}</td>
+                <td width='100%'><font color ="#00FF00">{STR} <font color = "Gold">+{HSTR}</font><br>{STA} <font color = "Gold">+{HSTA}</font><br>{AGI} <font color = "Gold">+{HAGI}</font><br>{DEX} <font color = "Gold">+{HDEX}</font></font></td>
               </tr>
               <tr><td class='Divider' colspan='2'></td></tr>
               <tr>
                 <td>{L_WIS}<br>{L_INT}<br>{L_CHA}</td>
-                <td width='100%'>{WIS}<br>{INT}<br>{CHA}</td>
+                <td width='100%'><font color ="#00FF00">{WIS} <font color = "Gold">+{HWIS}</font><br>{INT} <font color = "Gold">+{HINT}</font><br>{CHA} <font color = "Gold">+{HCHA}</font></font></td>
               </tr>
               <tr><td class='Divider' colspan='2'></td></tr>
               <tr>
                 <td>{L_POISON}<br>{L_MAGIC}<br>{L_DISEASE}<br>{L_FIRE}<br>{L_COLD}</td>
-                <td>{POISON}<br>{MAGIC}<br>{DISEASE}<br>{FIRE}<br>{COLD}</td>
+                <td><font color ="#00FF00">{POISON} <font color = "Gold">+{HPOISON}</font><br>{MAGIC} <font color = "Gold">+{HMAGIC}</font><br>{DISEASE} <font color = "Gold">+{HDISEASE}</font><br>{FIRE} <font color = "Gold">+{HFIRE}</font><br>{COLD} <font color = "Gold">+{HCOLD}</font></font></td>
               </tr>
               <tr><td class='Divider' colspan='2'></td></tr>
               <tr>
Last edited by Kinglykrab on Fri Feb 14, 2014 7:30 am; edited 7 times in total
Fri Feb 14, 2014 5:54 am
I also noticed that item.php was checking if the item had a click type, then checking if its charges were greater than zero, but some items use -1 for infinite, so it confused me as to why you'd want it to be greater than 0.

Diff Output
More +
@@ -171,7 +171,7 @@
       
        //EXPENDABLE, Charges
        if($item["clicktype"] == 3) { $Output .= $tab."EXPENDABLE "; }
-       if($item["clicktype"]>0 && $item["maxcharges"]>0) { $Output .= "Charges: ".$item["maxcharges"]."<br>\n"; }
+       if($item["clicktype"]>0 && $item["maxcharges"]!=0) { $Output .= "Charges: ".$item["maxcharges"]."<br>\n"; }
       
        // Augmentation type
        if($item["itemtype"] == 54) {
Fri Feb 14, 2014 6:40 am
I added Drakkin to the Bazaar search race array as well as Powersource to the Bazaar search type array.
Diff Output
More +
@@ -167,7 +167,8 @@ $language['BAZAAR_ARRAY_SEARCH_TYPE'] = array (
   23   => 'Wind Instrument'
 );
 $language['BAZAAR_ARRAY_SEARCH_SLOT'] = array (
-  -1 => 'Any Slot',
+  -1 => 'Any Slot',
+  4194304 => 'Powersource',
   2097152 => 'Ammo',
   1048576 => 'Waist',
   524288 => 'Feet',
@@ -229,7 +230,8 @@ $language['BAZAAR_ARRAY_SEARCH_RACE'] = array (
   2048 => 'GNM',
   4096 => 'IKS',
   8192 => 'VAH',
-  16384 => 'FRG'
+  16384 => 'FRG',
+  32768 => 'DRK'
 );
 
 //alternate abilities language
Fri Feb 14, 2014 6:47 am
Added all the changes from the other threads today along with warmonger's new png icons. I'll try and get at this one tomorrow. This is a little more extensive than the others but hopefully I can get it all in and posted tomorrow night. Thanks again!
Mon Feb 24, 2014 7:46 pm
Project Lead
everything is added, still doing testing and clean up. I should have it posted tonight.

In regard to the max charges, it was done that way because that's how it shows up in game. If an item had infinite charges it just didn't show anything, at least that's how it used to be. That said, there's no harm in displaying it, so I went ahead and added it. The code you posted will show "Charges: -1" for infinitely charged items though. I used this line:

if($item["clicktype"]>0 && $item["maxcharges"]!=0) { $Output .= "Charges: ".(($item["maxcharges"]>0) ? $item["maxcharges"]: "Infinite")."<br>\n"; }{
Tue Feb 25, 2014 6:34 pm
Project Lead
Understandable, I read everything from a developer standpoint, so the -1 didn't bother me because I know what it means, haha.
Wed Feb 26, 2014 11:51 pm
Character Browser My Changes.
Reply