Esempio n. 1
0
function ParseItemType($class, $subclass, $inventorytype)
{
    include "locales/" . lang . ".php";
    $itype = GetItemClass($class, $subclass);
    $itmslot = GetSlot($inventorytype);
    if (debug) {
        echo "slot: {$itmslot} type: {$itype} <br /> class: {$class} sub: {$subclass} inv: {$inventorytype} <br />";
    }
    $out = "<span style='float:left;'>{$locale[$itmslot]}</span><span style='float:right;'>{$locale[$itype]}</span><br />";
    //Fixes
    if (in_array($itmslot, array("misc"))) {
        //itemtype: left when slot is misc
        $out = "<span style='float:left;'>{$locale[$itype]}</span><br />";
    }
    if (!in_array($class, array(2, 4, 6))) {
        $out = "";
    }
    echo $out;
    /*
    	if($class == 2) //weapon
    	{
    		if($subclass == 0) {
    			if($inventorytype == 21)
    			{$var = "<span style='float:left;'>$locale[main]</span><span style='float:right;'>$locale[axe]</span>";}
    			elseif($inventorytype == 22)
    			{$var = "<span style='float:left;'>$locale[off]</span><span style='float:right;'>$locale[axe]</span>";}
    			else
    			{$var = "<span style='float:left;'>$locale[onehand]</span><span style='float:right;'>$locale[axe]</span>";}
    		}
    		elseif($subclass == 1) {$var = "<span style='float:left;'>$locale[twohand]</span><span style='float:right;'>$locale[axe]</span>";}
    		elseif($subclass == 2) {$var = "<span style='float:left;'>$locale[dist]</span><span style='float:right;'>$locale[bow]</span>";}
    		elseif($subclass == 3) {$var = "<span style='float:left;'>$locale[dist]</span><span style='float:right;'>$locale[shot]</span>";}
    		elseif($subclass == 4) {
    			if($inventorytype == 21)
    			{$var = "<span style='float:left;'>$locale[main]</span><span style='float:right;'>$locale[mace]</span>";}
    			elseif($inventorytype == 22)
    			{$var = "<span style='float:left;'>$locale[off]</span><span style='float:right;'>$locale[mace]</span>";}
    			else
    			{$var = "<span style='float:left;'>$locale[onehand]</span><span style='float:right;'>$locale[mace]</span>";}
    		}
    		elseif($subclass == 5) {$var = "<span style='float:left;'>$locale[twohand]</span><span style='float:right;'>$locale[mace]</span>";}
    		elseif($subclass == 6) {$var = "<span style='float:left;'>$locale[twohand]</span><span style='float:right;'>$locale[polearm]</span>";}
    		elseif($subclass == 7) {
    			if($inventorytype == 21)
    			{$var = "<span style='float:left;'>$locale[main]</span><span style='float:right;'>$locale[sword]</span>";}
    			elseif($inventorytype == 22)
    			{$var = "<span style='float:left;'>$locale[off]</span><span style='float:right;'>$locale[sword]</span>";}
    			else
    			{$var = "<span style='float:left;'>$locale[onehand]</span><span style='float:right;'>$locale[sword]</span>";}
    		}
    		elseif($subclass == 8) {$var = "<span style='float:left;'>$locale[twohand]</span><span style='float:right;'>$locale[sword]</span>";}
    		elseif($subclass == 10) {$var = "<span style='float:left;'>$locale[twohand]</span><span style='float:right;'>$locale[staff]</span>";}
    		elseif($subclass == 13) {
    			if($inventorytype == 21)
    			{$var = "<span style='float:left;'>$locale[main]</span><span style='float:right;'>$locale[fist]</span>";}
    			elseif($inventorytype == 22)
    			{$var = "<span style='float:left;'>$locale[off]</span><span style='float:right;'>$locale[fist]</span>";}
    			else
    			{$var = "<span style='float:left;'>$locale[onehand]</span><span style='float:right;'>$locale[fist]</span>";}
    		}
    		elseif($subclass == 14) {
    			if($inventorytype == 21)
    			{$var = "<span style='float:left;'>$locale[main]</span>";}
    			elseif($inventorytype == 22)
    			{$var = "<span style='float:left;'>$locale[off]</span>";}
    			else
    			{$var = "<span style='float:left;'>$locale[onehand]</span>";}
    		}
    		elseif($subclass == 15) {
    			if($inventorytype == 21)
    			{$var = "<span style='float:left;'>$locale[main]</span><span style='float:right;'>$locale[dagger]</span>";}
    			elseif($inventorytype == 22)
    			{$var = "<span style='float:left;'>$locale[off]</span><span style='float:right;'>$locale[dagger]</span>";}
    			else
    			{$var = "<span style='float:left;'>$locale[onehand]</span><span style='float:right;'>$locale[dagger]</span>";}
    		}
    		elseif($subclass == 16) {$var = "<span style='float:left;'>$locale[throw]</span><span style='float:right;'>$locale[throw]</span>";}
    		elseif($subclass == 18) {$var = "<span style='float:left;'>$locale[range]</span><span style='float:right;'>$locale[cross]</span>";}
    		elseif($subclass == 19) {$var = "<span style='float:left;'>$locale[range]</span><span style='float:right;'>$locale[wand]</span>";}
    		elseif($subclass == 20) {
    			if($inventorytype == 21)
    			{$var = "<span style='float:left;'>$locale[main]</span><span style='float:right;'>$locale[fishpole]</span>";}
    			elseif($inventorytype == 22)
    			{$var = "<span style='float:left;'>$locale[off]</span><span style='float:right;'>$locale[fishpole]</span>";}
    			else
    			{$var = "<span style='float:left;'>$locale[onehand]</span><span style='float:right;'>$locale[fishpole]</span>";}
    		}
    	}
    	elseif($class == 4) //armor
    	{
    		if($inventorytype == 1) {$var = "<span style='float:left;'>$locale[head]</span>";}
    		elseif($inventorytype == 2) {$var = "<span style='float:left'>$locale[neck]</span>";}
    		elseif($inventorytype == 3) {$var = "<span style='float:left'>$locale[shoulder]</span>";}
    		elseif($inventorytype == 4) {$var = "<span style='float:left'>$locale[shirt]</span>";}
    		elseif($inventorytype == 5) {$var = "<span style='float:left'>$locale[chest]</span>";}
    		elseif($inventorytype == 6) {$var = "<span style='float:left'>$locale[waist]</span>";}
    		elseif($inventorytype == 7) {$var = "<span style='float:left'>$locale[legs]</span>";}
    		elseif($inventorytype == 8) {$var = "<span style='float:left'>$locale[feet]</span>";}
    		elseif($inventorytype == 9) {$var = "<span style='float:left'>$locale[wrist]</span>";}
    		elseif($inventorytype == 10) {$var = "<span style='float:left'>$locale[hands]</span>";}
    		elseif($inventorytype == 11) {$var = "<span style='float:left'>$locale[finger]</span>";}
    		elseif($inventorytype == 12) {$var = "<span style='float:left'>$locale[trinket]</span>";}
    		elseif($inventorytype == 16) {$var = "<span style='float:left'>$locale[cloak]</span>";}
    		elseif($inventorytype == 19) {$var = "<span style='float:left'>$locale[tabard]</span>";}
    		elseif($inventorytype == 23) {$var = "<span style='float:left'>$locale[offheld]</span>";}
    		elseif($inventorytype == 28) {$var = "<span style='float:left'>$locale[relic]</span>";}
    			
    		if($subclass == 1) {$var = $var . "<span style='float:right;'>$locale[cloth]</span>";}
    		elseif($subclass == 2) {$var = $var . "<span style='float:right;'>$locale[leather]</span>";}
    		elseif($subclass == 3) {$var = $var . "<span style='float:right;'>$locale[mail]</span>";}
    		elseif($subclass == 4) {$var = $var . "<span style='float:right;'>$locale[plate]</span>";}
    		elseif($subclass == 6) {$var = "<span style='float:left;'>$locale[off]</span><span style='float:right;'>$locale[shield]</span>";}
    	}
    	elseif($class == 6) //ammo
    	{
    		$var = "<span style='float:left;'>$locale[projectile]</span>";
    		if($subclass == 2) {$var = $var . "<span style='float:right;'>$locale[arrow]</span>";}
    		elseif($subclass == 3) {$var = $var . "<span style='float:right;'>$locale[bullet]</span>";}
    	}
    	if($var && $var != "<span style='float:left;'>$locale[unk]</span>")
    		echo $var . "<br />";*/
}
Esempio n. 2
0
     } else {
         $str = ParseDamage($dmg1type);
         echo "<span style='float:left;'>{$dmg1min} - {$dmg1max} {$str}{$locale['damage']}</span><span style='float:right;'>{$locale['speed']} ";
         printf("%01.2f</span><br />", $speed);
         $dps = ($dmg1max + $dmg1min) / 2 / $speed;
     }
 }
 if ($dmg2min > 0) {
     $str = ParseDamage($dmg2type);
     echo "+{$dmg2min} - {$dmg2max} {$str}{$locale['damage']}<br />";
     $dps += ($dmg2max + $dmg2min) / 2 / $speed;
 }
 if ($dps) {
     printf("(%01.1f {$locale['dps']})<br />", $dps);
 }
 echo ParseFeralAttackPower($dps, GetItemClass($class, $subclass));
 if ($armor) {
     echo "{$armor} {$locale['armor']}<br />";
 }
 if ($randomsuffix || $randomprop) {
     echo "<span class='q2'>&lt;{$locale['rnd']}&gt;</span><br />";
 }
 $stats = array($stat1t, $stat2t, $stat3t, $stat4t, $stat5t, $stat6t, $stat7t, $stat8t, $stat9t);
 $statvalues = array($stat1v, $stat2v, $stat3v, $stat4v, $stat5v, $stat6v, $stat7v, $stat8v, $stat9v);
 ParseStat($stats, $statvalues);
 /*if($ps && $stat1v)
 {
 	if($stat1v > 0)
 		echo "+";
 	echo "$stat1v $ps<br />";
 }