public static function GetEquippedItem($SlotId)
 {
     if (!ModelViewer::IsSlotEquipped($SlotId)) {
         return -1;
     } else {
         return ModelViewer::$EquippedItems[$SlotId];
     }
 }
示例#2
0
 /**
  * ModelViewer can be optionally constructed to restrict its output to a specific module
  */
 function __construct($module = null)
 {
     $this->module = $module;
     parent::__construct();
 }
示例#3
0
 function DisplayCharacterModel()
 {
     $CharacterData = Characters::GetCharacterData($_REQUEST['datatype']);
     $Inventory = Characters::GetGearForCharacter($CharacterData['guid']);
     ModelViewer::Initialize(450, 450);
     ModelViewer::SetCharacterData($CharacterData['race_data']['name'], $CharacterData['gender']);
     foreach ($Inventory as $Item) {
         if (isset($Item['data'])) {
             ModelViewer::EquipItem($Item['slot'], $Item['data']['displayid']);
         }
     }
     echo ModelViewer::GetCharacterHtml();
 }
示例#4
0
            echo '<td id="side"><a href="http://www.wowhead.com/item=' . $head_entry["itemEntry"] . '"><img src="../armory/ICONS/' . $head_icon . '.png"></a></td>';
        } else {
            echo '<td id="side"><img src="icons/head.png" ></td>';
        }
        // portrait
        if ($RACE == 1 || $RACE == 3 || $RACE == 4 || $RACE == 7 || $RACE == 11) {
            $PORTRAIT = '<img src="icons/portrait/' . $GENDER . '-' . $RACE . '-' . $CLASS . '.gif" style="width:160px;height:160px;vertical-align:middle;
			box-shadow: 3px 3px 3px blue, 0 0 30px violet, 0 0 5px blue;margin:2px;" >';
        }
        if ($RACE == 2 || $RACE == 5 || $RACE == 6 || $RACE == 8 || $RACE == 10) {
            $PORTRAIT = '<img src="icons/portrait/' . $GENDER . '-' . $RACE . '-' . $CLASS . '.gif" style="width:160px;height:160px;vertical-align:middle;
			box-shadow: 3px 3px 3px orange, 0 0 30px red, 0 0 5px orange;margin:2px;" >';
        }
        // generate model view
        include './MV.php';
        $mv = new ModelViewer();
        $mv->ObjectHeight = 370;
        $mv->ObjectWidth = 220;
        // get gender
        if ($GENDER == 1) {
            $mv->SetGender(GENDER_FEMALE);
        }
        if ($GENDER == 0) {
            $mv->SetGender(GENDER_MALE);
        }
        // get gender
        // get race
        if ($RACE == 1) {
            $mv->SetRace(RACE_HUMAN);
        }
        if ($RACE == 2) {