Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Merge pull request #179 from Takenbacon/master

[508] Fixed fury warriors and enhance shamans not loading when using dual-wield and character's robes
  • Loading branch information...
commit 642da6c7830f5e1f3c8571cd4e4565cae62c2e52 2 parents 5bdd9c1 + a655e13
Shadez authored March 25, 2012
2  README
... ...
@@ -1,6 +1,6 @@
1 1
 Project support closed. Repository (http://github.com/Shadez/wowarmory/) will stay as archive.
2 2
 
3  
-Armory core will be rewrited and updated in near future, stay tuned.
  3
+Armory core will be rewritten and updated in near future, stay tuned.
4 4
 
5 5
 WARNING: You must not remove and/or change any Blizzard's copyrights in any files and/or at the bottom of Armory pages!
6 6
 
108  character-model.php
@@ -135,26 +135,6 @@
135 135
 foreach($model_data as $model_key => $model_value) {
136 136
     $xml->XMLWriter()->writeAttribute($model_key, $model_value);
137 137
 }
138  
-$xml->XMLWriter()->startElement('components');
139  
-$components = array(100, 200, 801, 401, 601, $character_model_data['hair_style'], 901, 302, 1600, 1201, 702, 1001, 1401, 1501, 0, 101, 301, 1101, 502, 1502);
140  
-if($characters->GetGender() == 1) {
141  
-    $components[count($components)+1] = 1302; // Legs type
142  
-}
143  
-else {
144  
-    $components[count($components)+1] = 1301; // Legs type
145  
-}
146  
-if($characters->GetRace() == RACE_BLOODELF) {
147  
-    $components[count($components)+1] = 1702; // Eyes
148  
-}
149  
-if($characters->GetClass() == CLASS_DK) {
150  
-    $components[count($components)+1] = 1703; // Eyes
151  
-}
152  
-foreach($components as $component) {
153  
-    $xml->XMLWriter()->startElement('component');
154  
-    $xml->XMLWriter()->writeAttribute('n', $component);
155  
-    $xml->XMLWriter()->endElement();
156  
-}
157  
-$xml->XMLWriter()->endElement(); //components
158 138
 $subtexture_data = array();
159 139
 /** MAIN TEXTURES **/
160 140
 /*
@@ -599,7 +579,7 @@
599 579
          **/
600 580
         $model_data_attachment['main_hand_texture'] = array(
601 581
             'linkPoint' => 1,
602  
-            'type' => 'none',
  582
+            'type' => 'melee',
603 583
             'modelFile' => 'item/objectcomponents/weapon/'.$items->GetItemModelData($displayId, 'modelName_1', $tmpid).'.m2',
604 584
             'skinFile' => 'item/objectcomponents/weapon/'.$items->GetItemModelData($displayId, 'modelName_1', $tmpid).'00.skin',   // What does 00 means?
605 585
             'texture' => 'item/objectcomponents/weapon/'.$items->GetItemModelData($displayId, 'modelTexture_1', $tmpid).'.png',
@@ -613,42 +593,62 @@
613 593
 /**
614 594
  * Off hand (texture)
615 595
  **/
616  
-if($characters->GetClass() == CLASS_PALADIN || $characters->GetClass() == CLASS_WARRIOR || $characters->GetClass() == CLASS_SHAMAN) {
617  
-    if($tmpid = $characters->GetCharacterEquip('offhand')) {
618  
-        $displayId = $items->GetItemInfo($tmpid, 'displayid');
619  
-        $model_data_attachment['off_hand_texture'] = array(
620  
-            'linkPoint' => 0,
621  
-            'type' => 'melee',
622  
-            'modelFile' => 'item/objectcomponents/shield/'.$items->GetItemModelData($displayId, 'modelName_1', $tmpid).'.m2',
623  
-            'skinFile' => 'item/objectcomponents/shield/'.$items->GetItemModelData($displayId, 'modelName_1', $tmpid).'00.skin',   // What does 00 means?
624  
-            'texture' => 'item/objectcomponents/shield/'.$items->GetItemModelData($displayId, 'modelTexture_1', $tmpid).'.png',
625  
-        );
626  
-        if($model_data_attachment['off_hand_texture']['texture'] == 'item/objectcomponents/shield/.png') {
627  
-            unset($model_data_attachment['off_hand_texture']);
628  
-            $model_data['use_shield'] = false;
629  
-        }
630  
-        else {
631  
-            $model_data['use_shield'] = true;
632  
-        }
  596
+if($tmpid = $characters->GetCharacterEquip('offhand')) {
  597
+    $InventoryType = $items->GetItemInfo($tmpid, 'InventoryType');
  598
+    $displayId = $items->GetItemInfo($tmpid, 'displayid');
  599
+    if($InventoryType == 14) {
  600
+    	$model_data_attachment['off_hand_texture'] = array(
  601
+	   		'linkPoint' => 0,
  602
+	    	'type' => 'melee',
  603
+	    	'modelFile' => 'item/objectcomponents/shield/'.$items->GetItemModelData($displayId, 'modelName_1', $tmpid).'.m2',
  604
+	    	'skinFile' => 'item/objectcomponents/shield/'.$items->GetItemModelData($displayId, 'modelName_1', $tmpid).'00.skin',   // What does 00 means?
  605
+	    	'texture' => 'item/objectcomponents/shield/'.$items->GetItemModelData($displayId, 'modelTexture_1', $tmpid).'.png',
  606
+    	);
  607
+		if($model_data_attachment['off_hand_texture']['texture'] == 'item/objectcomponents/shield/.png') {
  608
+		    unset($model_data_attachment['off_hand_texture']);
  609
+		   	$model_data['use_shield'] = false;
  610
+		}
  611
+	    else {
  612
+	    	$model_data['use_shield'] = true;
  613
+	    }
  614
+	    unset($tmpid);
633 615
     }
634  
-    unset($tmpid);
635  
-}
636  
-else {
637  
-    if($tmpid = $characters->GetCharacterEquip('offhand')) {
638  
-        $displayId = $items->GetItemInfo($tmpid, 'displayid');
639  
-        $model_data_attachment['off_hand_texture'] = array(
640  
-            'linkPoint' => 1,
641  
-            'type' => 'ranged',
642  
-            'modelFile' => 'item/objectcomponents/weapon/'.$items->GetItemModelData($displayId, 'modelName_1', $tmpid).'.m2',
643  
-            'skinFile'  => 'item/objectcomponents/weapon/'.$items->GetItemModelData($displayId, 'modelName_1', $tmpid).'00.skin',   // What does 00 means?
644  
-            'texture'   => 'item/objectcomponents/weapon/'.$items->GetItemModelData($displayId, 'modelTexture_1', $tmpid).'.png',
645  
-        );
646  
-        if($model_data_attachment['off_hand_texture']['texture'] == 'item/objectcomponents/weapon/.png') {
647  
-            unset($model_data_attachment['off_hand_texture']);
648  
-        }
  616
+    else {
  617
+    	$model_data_attachment['off_hand_texture'] = array(
  618
+    			'linkPoint' => 2,
  619
+    			'type' => 'melee',
  620
+    			'modelFile' => 'item/objectcomponents/weapon/'.$items->GetItemModelData($displayId, 'modelName_1', $tmpid).'.m2',
  621
+    			'skinFile'  => 'item/objectcomponents/weapon/'.$items->GetItemModelData($displayId, 'modelName_1', $tmpid).'00.skin',   // What does 00 means?
  622
+    			'texture'   => 'item/objectcomponents/weapon/'.$items->GetItemModelData($displayId, 'modelTexture_1', $tmpid).'.png',
  623
+    	);
  624
+    	if($model_data_attachment['off_hand_texture']['texture'] == 'item/objectcomponents/weapon/.png') {
  625
+    		unset($model_data_attachment['off_hand_texture']);
  626
+    	}
  627
+    	unset($tmpid);
649 628
     }
650  
-    unset($tmpid);
651 629
 }
  630
+$xml->XMLWriter()->startElement('components');
  631
+$components = array(100, 200, 801, 401, 601, $character_model_data['hair_style'], 901, 302, 1600, 1201, 702, 1001, 1401, 1501, 0, 101, 301, 1101, 1502);
  632
+if(isset($subtexture_data['leg_ll']))
  633
+{
  634
+	$components[count($components)+1] = 1301; // Legs type (with robe)
  635
+	$components[count($components)+1] = 502; // Removes boots texture
  636
+}else {
  637
+	$components[count($components)+1] = 1302; // Legs type (no robe)
  638
+	$components[count($components)+1] = 500; // Adds boots texture
  639
+}
  640
+if($characters->GetRace() == RACE_BLOODELF) {
  641
+    $components[count($components)+1] = 1702; // Eyes
  642
+}
  643
+if($characters->GetClass() == CLASS_DK) {
  644
+    $components[count($components)+1] = 1703; // Eyes
  645
+}
  646
+foreach($components as $component) {
  647
+    $xml->XMLWriter()->startElement('component');
  648
+    $xml->XMLWriter()->writeAttribute('n', $component);
  649
+    $xml->XMLWriter()->endElement();
  650
+}
  651
+$xml->XMLWriter()->endElement(); //components
652 652
 $xml->XMLWriter()->startElement('textures');
653 653
 $xml->XMLWriter()->startElement('texture');
654 654
 $xml->XMLWriter()->writeAttribute('file', sprintf('character/%s/%s/%s%sskin00_%s.png', $character_model_data['race'], $character_model_data['gender'], $character_model_data['race'], $character_model_data['gender'], $character_model_data['skin_style']));

0 notes on commit 642da6c

Please sign in to comment.
Something went wrong with that request. Please try again.