Skip to content

Commit

Permalink
[412] Display helm in 3D Viewer if player don`t have PLAYER_FLAGS_HID…
Browse files Browse the repository at this point in the history
…E_HELM flag (1024)
  • Loading branch information
Shadez committed Oct 24, 2010
1 parent 246261c commit 064a6ae
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 21 deletions.
38 changes: 20 additions & 18 deletions character-model.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
/**
* @package World of Warcraft Armory
* @version Release Candidate 1
* @revision 352
* @revision 412
* @copyright (c) 2009-2010 Shadez
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
*
Expand Down Expand Up @@ -42,7 +42,7 @@
$_GET['r'] = false;
}
$realmId = $utils->GetRealmIdByName($_GET['r']);
$characters->BuildCharacter($name, $realmId);
$characters->BuildCharacter($name, $realmId, true, true);
$isCharacter = $characters->CheckPlayer();
if($_GET['r'] === false || !$armory->currentRealmInfo) {
$isCharacter = false;
Expand Down Expand Up @@ -99,10 +99,10 @@
$character_model_data['hide_helm'] = 0;
$character_model_data['hide_cloak'] = 0;
if($player_model['playerFlags'] & 1024) {
if($player_model['playerFlags'] & PLAYER_FLAGS_HIDE_HELM) {
$character_model_data['hide_helm'] = 1;
}
if($player_model['playerFlags'] & 2048) {
if($player_model['playerFlags'] & PLAYER_FLAGS_HIDE_CLOAK) {
$character_model_data['hide_cloak'] = 1;
}
if(strlen($character_model_data['skin_style']) == 1) {
Expand Down Expand Up @@ -519,20 +519,22 @@

/** ATTACHMENT TEXTURES **/

if($tmpid = $characters->GetCharacterEquip('head') && $character_model_data['hide_helm'] == 0) {
if($items->GetItemModelData(0, 'modelName_1', $tmpid)) {
/**
* Helm (texture)
**/
$model_data_attachment['helm_texture'] = array(
'linkPoint' => 11,
'type' => 'none',
'modelFile' => 'item/objectcomponents/head/'.$items->GetItemModelData(0, 'modelName_1', $tmpid).'_'.$character_model_data['race_gender'].'.m2',
'skinFile' => 'item/objectcomponents/head/'.$items->GetItemModelData(0, 'modelName_1', $tmpid).'_'.$character_model_data['race_gender'].'00.skin',
'texture' => 'item/objectcomponents/head/'.$items->GetItemModelData(0, 'modelTexture_1', $tmpid).'.png',
);
if($model_data_attachment['helm_texture']['texture'] == 'item/objectcomponents/head/.png') {
//unset($model_data_attachment['helm_texture']);
if($tmpid = $characters->GetCharacterEquip('head')) {
if($character_model_data['hide_helm'] == 0) {
if($items->GetItemModelData(0, 'modelName_1', $tmpid)) {
/**
* Helm (texture)
**/
$model_data_attachment['helm_texture'] = array(
'linkPoint' => 11,
'type' => 'none',
'modelFile' => 'item/objectcomponents/head/'.$items->GetItemModelData(0, 'modelName_1', $tmpid).'_'.$character_model_data['race_gender'].'.m2',
'skinFile' => 'item/objectcomponents/head/'.$items->GetItemModelData(0, 'modelName_1', $tmpid).'_'.$character_model_data['race_gender'].'00.skin',
'texture' => 'item/objectcomponents/head/'.$items->GetItemModelData(0, 'modelTexture_1', $tmpid).'.png',
);
if($model_data_attachment['helm_texture']['texture'] == 'item/objectcomponents/head/.png') {
unset($model_data_attachment['helm_texture']);
}
}
}
unset($tmpid);
Expand Down
4 changes: 2 additions & 2 deletions includes/defines.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
/**
* @package World of Warcraft Armory
* @version Release Candidate 1
* @revision 405
* @revision 412
* @copyright (c) 2009-2010 Shadez
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
*
Expand Down Expand Up @@ -524,8 +524,8 @@

// Player::LoadFromDB()
define('DEFAULT_WORLD_OBJECT_SIZE', 0.388999998569489);
define('PLAYER_FLAGS_HIDE_CLOAK', 2048);
define('PLAYER_FLAGS_HIDE_HELM', 1024);
define('PLAYER_FLAGS_HIDE_CLOAK', 2048);
define('MAX_STATS', 5);

/** Spell Schools **/
Expand Down
2 changes: 1 addition & 1 deletion includes/revision_nr.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?php
define('ARMORY_REVISION', 411);
define('ARMORY_REVISION', 412);
define('DB_VERSION', 'armory_r398');
define('CONFIG_VERSION', '0708201001');
?>

0 comments on commit 064a6ae

Please sign in to comment.