Character Browser Adding Powersource Slot
Reply
Adding Powersource Slot
Hello there I am NatedogEZ from the eqemu forums and with help from KinglyKrab over there we decided to add powersource slot to the Character Browser.

This is the code if you wish to add it I will host the files we added as well if you want to download the icon we created for the slot.

http://natedogtest.no-ip.biz/magelo/images/slots/slot_9999.gif

Edit.. Forgot to mention there is a fix to the hiding of items after you click on them it would not hide items that were clicked on from certain slots between slot 2190 and slot 2270


Macro
More +

--- "/include/global.php"
+++ "/include/global.php"      
@@ -357,6 +357,7 @@
                       
 
 $dbslots=array(); $dbslotsid=array();
+$dbslots[4194304]="Powersource";
 $dbslots[2097152]="Ammo";
 $dbslots[1048576]="Waist";
 $dbslots[524288]="Feet";
 

 
--- "/include/itemclass.php"   
+++ "/include/itemclass.php"
@@ -77,7 +77,7 @@
            $this->myname=$row['Name'];
            $this->myid=$row['id'];
            switch ($this->myslot){
-                case ($this->myslot >= 0 && $this->myslot <= 21):
+                case ($this->myslot >= 0 && $this->myslot <= 21 || $this->myslot == 9999):
                      $this->mytype = 1;
                      $this->myvslot = $this->myslot;
                      break;
                                         

                                         
--- "/templates/character_body.tpl"
+++ "/templates/character_body.tpl"
@@ -5,7 +5,8 @@
   if (target = document.getElementById(prefix + id))
     if (type) target.style.display = (target.style.display == 'none') ? 'block' : 'none';
   else {
-    for(var i=0; i < 2190; i++) if (hideme = document.getElementById(prefix + i)) hideme.style.display = 'none';            
+    for(var i=0; i <= 2270; i++) if (hideme = document.getElementById(prefix + i)) hideme.style.display = 'none';  
+       for(var i=9999; i < 10000; i++) if (hideme = document.getElementById(prefix + i)) hideme.style.display = 'none';
     target.style.display = 'block';
   }
 }
@@ -140,7 +141,7 @@
           <div class='Slot slotloc27 slotimage'></div>
           <div class='Slot slotloc28 slotimage'></div>
           <div class='Slot slotloc29 slotimage'></div>
-
+                 <div class='Slot slotloc9999 slotimage9999'></div>
 
           <!-- BEGIN invitem -->
           <div onclick="display(0, {invitem.SLOT}, 'slot');if ({invitem.ISBAG}) display(0, {invitem.SLOT}, 'bag');" class='Slot slotloc{invitem.SLOT}' style='background-image: url(images/items/item_{invitem.ICON}.gif);'></div>
                   

                   
--- "/templates/style.css"
+++ "/templates/style.css"
@@ -839,6 +839,11 @@
   top: 358px;
   left: 360px;
 }
+.slotloc9999
+{
+       top: 272px;
+       left: 267px;
+}
 .slotloc2000 {
   top: 20px;
   left: 6px;
@@ -1005,6 +1010,9 @@
 .slotimage21 {
   background-image: url(../images/slots/slot_21.gif);
 }
+.slotimage9999 {
+  background-image: url(../images/slots/slot_9999.gif);
+}
 .slotimage {
   background-image: url(../images/slots/slot_.gif);
 }
\ No newline at end of file
 
Mon Feb 03, 2014 7:53 pm
Awesome, thanks. Ill merge these in first chance I get
Tue Feb 04, 2014 7:38 am
Project Lead
Merged in and posted as v2.24.

I don't keep up with the EQEmu forums so thanks for submitting the changes! I added a couple months of membership to your account as a meager thanks.
Wed Feb 05, 2014 7:30 pm
Project Lead
Character Browser Adding Powersource Slot
Reply