comparison UI/UICharacter.cpp @ 1989:33787c8938a5

Single and Two-handed ENUM
author zipi
date Sat, 02 Nov 2013 17:45:58 +0000
parents c1c74df0a33e
children 28cb79ae2f6f
comparison
equal deleted inserted replaced
1988:7e2dd49832b5 1989:33787c8938a5
775 pRenderer->DrawTextureTransparent(pPaperdoll_BodyX, pPaperdoll_BodyY, pIcons_LOD->GetTexture(papredoll_dbods[uPlayerID - 1])); 775 pRenderer->DrawTextureTransparent(pPaperdoll_BodyX, pPaperdoll_BodyY, pIcons_LOD->GetTexture(papredoll_dbods[uPlayerID - 1]));
776 if ( !bRingsShownInCharScreen ) 776 if ( !bRingsShownInCharScreen )
777 pRenderer->DrawMaskToZBuffer(pPaperdoll_BodyX, pPaperdoll_BodyY, pIcons_LOD->GetTexture(papredoll_dbods[uPlayerID - 1]), player->pEquipment.uArmor); 777 pRenderer->DrawMaskToZBuffer(pPaperdoll_BodyX, pPaperdoll_BodyY, pIcons_LOD->GetTexture(papredoll_dbods[uPlayerID - 1]), player->pEquipment.uArmor);
778 //Рука не занята или ... 778 //Рука не занята или ...
779 if ( !player->GetItem(&PlayerEquipment::uMainHand) 779 if ( !player->GetItem(&PlayerEquipment::uMainHand)
780 || ( player->GetMainHandItem()->GetItemEquipType() != EQUIP_MAIN_HAND) 780 || ( player->GetMainHandItem()->GetItemEquipType() != EQUIP_TWO_HANDED)
781 && (player->GetMainHandItem()->GetItemEquipType() != PLAYER_SKILL_SPEAR 781 && (player->GetMainHandItem()->GetItemEquipType() != PLAYER_SKILL_SPEAR
782 || player->GetItem(&PlayerEquipment::uShield)) ) 782 || player->GetItem(&PlayerEquipment::uShield)) )
783 pRenderer->DrawTextureTransparent(pPaperdoll_BodyX + pPaperdoll_LeftHand[pBodyComplection][0], pPaperdoll_BodyY + pPaperdoll_LeftHand[pBodyComplection][1], 783 pRenderer->DrawTextureTransparent(pPaperdoll_BodyX + pPaperdoll_LeftHand[pBodyComplection][0], pPaperdoll_BodyY + pPaperdoll_LeftHand[pBodyComplection][1],
784 pIcons_LOD->GetTexture(papredoll_dlads[uPlayerID - 1])); 784 pIcons_LOD->GetTexture(papredoll_dlads[uPlayerID - 1]));
785 //-----------------------------------------------------(Hand/Рука)--------------------------------------------------------------- 785 //-----------------------------------------------------(Hand/Рука)---------------------------------------------------------------
1060 pRenderer->DrawMaskToZBuffer(item_X, item_Y, pIcons_LOD->GetTexture(v59), player->pEquipment.uBoot); 1060 pRenderer->DrawMaskToZBuffer(item_X, item_Y, pIcons_LOD->GetTexture(v59), player->pEquipment.uBoot);
1061 } 1061 }
1062 } 1062 }
1063 //--------------------------------------------(Hand/Рука)------------------------------------------------------ 1063 //--------------------------------------------(Hand/Рука)------------------------------------------------------
1064 if ( !player->GetItem(&PlayerEquipment::uMainHand) 1064 if ( !player->GetItem(&PlayerEquipment::uMainHand)
1065 || ( player->GetMainHandItem()->GetItemEquipType() != EQUIP_MAIN_HAND) 1065 || ( player->GetMainHandItem()->GetItemEquipType() != EQUIP_TWO_HANDED)
1066 && (player->GetMainHandItem()->GetPlayerSkillType() != PLAYER_SKILL_SPEAR 1066 && (player->GetMainHandItem()->GetPlayerSkillType() != PLAYER_SKILL_SPEAR
1067 || player->GetItem(&PlayerEquipment::uShield)) ) 1067 || player->GetItem(&PlayerEquipment::uShield)) )
1068 pRenderer->DrawTextureTransparent(pPaperdoll_BodyX + pPaperdoll_LeftHand[pBodyComplection][0], 1068 pRenderer->DrawTextureTransparent(pPaperdoll_BodyX + pPaperdoll_LeftHand[pBodyComplection][0],
1069 pPaperdoll_BodyY + pPaperdoll_LeftHand[pBodyComplection][1], pIcons_LOD->GetTexture(papredoll_dlads[uPlayerID - 1])); 1069 pPaperdoll_BodyY + pPaperdoll_LeftHand[pBodyComplection][1], pIcons_LOD->GetTexture(papredoll_dlads[uPlayerID - 1]));
1070 //--------------------------------------------(Belt/Пояс)------------------------------------------------------- 1070 //--------------------------------------------(Belt/Пояс)-------------------------------------------------------
1128 } 1128 }
1129 } 1129 }
1130 //---------------------------------------------(Hand2/Рука2)-------------------------------------------------- 1130 //---------------------------------------------(Hand2/Рука2)--------------------------------------------------
1131 if ( player->GetItem(&PlayerEquipment::uMainHand) ) 1131 if ( player->GetItem(&PlayerEquipment::uMainHand) )
1132 { 1132 {
1133 if ( player->GetMainHandItem()->GetItemEquipType() == EQUIP_MAIN_HAND 1133 if ( player->GetMainHandItem()->GetItemEquipType() == EQUIP_TWO_HANDED
1134 || player->GetMainHandItem()->GetPlayerSkillType() == PLAYER_SKILL_SPEAR 1134 || player->GetMainHandItem()->GetPlayerSkillType() == PLAYER_SKILL_SPEAR
1135 && !player->GetItem(&PlayerEquipment::uShield) ) 1135 && !player->GetItem(&PlayerEquipment::uShield) )
1136 pRenderer->DrawTextureTransparent(pPaperdoll_BodyX + pPaperdoll_SecondLeftHand[pBodyComplection][0], 1136 pRenderer->DrawTextureTransparent(pPaperdoll_BodyX + pPaperdoll_SecondLeftHand[pBodyComplection][0],
1137 pPaperdoll_BodyY + pPaperdoll_SecondLeftHand[pBodyComplection][1], pIcons_LOD->GetTexture(papredoll_dlaus[uPlayerID - 1])); 1137 pPaperdoll_BodyY + pPaperdoll_SecondLeftHand[pBodyComplection][1], pIcons_LOD->GetTexture(papredoll_dlaus[uPlayerID - 1]));
1138 } 1138 }
1159 break; 1159 break;
1160 } 1160 }
1161 if ( index >= 0 && index < 17 ) 1161 if ( index >= 0 && index < 17 )
1162 { 1162 {
1163 if ( player->GetItem(&PlayerEquipment::uMainHand) 1163 if ( player->GetItem(&PlayerEquipment::uMainHand)
1164 && (player->GetMainHandItem()->GetItemEquipType() == EQUIP_MAIN_HAND 1164 && (player->GetMainHandItem()->GetItemEquipType() == EQUIP_TWO_HANDED
1165 || player->GetMainHandItem()->GetPlayerSkillType() == PLAYER_SKILL_SPEAR 1165 || player->GetMainHandItem()->GetPlayerSkillType() == PLAYER_SKILL_SPEAR
1166 && !player->GetItem(&PlayerEquipment::uShield) ))//без щита 1166 && !player->GetItem(&PlayerEquipment::uShield) ))//без щита
1167 { 1167 {
1168 v94 = paperdoll_armor_texture[pBodyComplection][index][2]; 1168 v94 = paperdoll_armor_texture[pBodyComplection][index][2];
1169 if ( paperdoll_armor_texture[pBodyComplection][index][2] == pIcons_LOD->FindTextureByName("pending") ) 1169 if ( paperdoll_armor_texture[pBodyComplection][index][2] == pIcons_LOD->FindTextureByName("pending") )
1526 pRenderer->DrawTextureTransparent(pPaperdoll_BodyX + pPaperdoll_RightHand[pBodyComplection][0], pPaperdoll_BodyY + pPaperdoll_RightHand[pBodyComplection][1], pIcons_LOD->GetTexture(papredoll_drhs[uPlayerID - 1])); 1526 pRenderer->DrawTextureTransparent(pPaperdoll_BodyX + pPaperdoll_RightHand[pBodyComplection][0], pPaperdoll_BodyY + pPaperdoll_RightHand[pBodyComplection][1], pIcons_LOD->GetTexture(papredoll_drhs[uPlayerID - 1]));
1527 //--------------------------------------------------------(LeftHand/Левая рука)---------------------------------------------------- 1527 //--------------------------------------------------------(LeftHand/Левая рука)----------------------------------------------------
1528 if ( player->GetItem(&PlayerEquipment::uMainHand)) 1528 if ( player->GetItem(&PlayerEquipment::uMainHand))
1529 { 1529 {
1530 item = player->GetMainHandItem(); 1530 item = player->GetMainHandItem();
1531 if ( item->GetItemEquipType() == EQUIP_MAIN_HAND 1531 if ( item->GetItemEquipType() == EQUIP_TWO_HANDED
1532 || item->GetPlayerSkillType() == PLAYER_SKILL_SPEAR 1532 || item->GetPlayerSkillType() == PLAYER_SKILL_SPEAR
1533 && !player->GetItem(&PlayerEquipment::uShield) ) 1533 && !player->GetItem(&PlayerEquipment::uShield) )
1534 pRenderer->DrawTextureTransparent(pPaperdoll_BodyX + pPaperdoll_SecondLeftHand[pBodyComplection][0], 1534 pRenderer->DrawTextureTransparent(pPaperdoll_BodyX + pPaperdoll_SecondLeftHand[pBodyComplection][0],
1535 pPaperdoll_BodyY + pPaperdoll_SecondLeftHand[pBodyComplection][1], 1535 pPaperdoll_BodyY + pPaperdoll_SecondLeftHand[pBodyComplection][1],
1536 pIcons_LOD->GetTexture(papredoll_dlhus[uPlayerID - 1])); 1536 pIcons_LOD->GetTexture(papredoll_dlhus[uPlayerID - 1]));
2345 2345
2346 v51 = 0; 2346 v51 = 0;
2347 _this.Reset(); 2347 _this.Reset();
2348 v1 = pPlayers[uActiveCharacter]->pEquipment.uMainHand; 2348 v1 = pPlayers[uActiveCharacter]->pEquipment.uMainHand;
2349 v2 = pPlayers[uActiveCharacter]->pEquipment.uShield; 2349 v2 = pPlayers[uActiveCharacter]->pEquipment.uShield;
2350 if ( v1 && pPlayers[uActiveCharacter]->pInventoryItemList[v1 - 1].GetItemEquipType() == EQUIP_MAIN_HAND ) 2350 if ( v1 && pPlayers[uActiveCharacter]->pInventoryItemList[v1 - 1].GetItemEquipType() == EQUIP_TWO_HANDED )
2351 v51 = v1; 2351 v51 = v1;
2352 v3 = pParty->pPickedItem.uItemID; 2352 v3 = pParty->pPickedItem.uItemID;
2353 if ( pParty->pPickedItem.uItemID ) 2353 if ( pParty->pPickedItem.uItemID )
2354 { 2354 {
2355 pEquipType = pParty->pPickedItem.GetItemEquipType(); 2355 pEquipType = pParty->pPickedItem.GetItemEquipType();
2474 pParty->pPickedItem.Reset(); 2474 pParty->pPickedItem.Reset();
2475 pParty->SetHoldingItem(&pPlayers[uActiveCharacter]->pInventoryItemList[v2]); 2475 pParty->SetHoldingItem(&pPlayers[uActiveCharacter]->pInventoryItemList[v2]);
2476 _this.uBodyAnchor = 1; 2476 _this.uBodyAnchor = 1;
2477 memcpy(&pPlayers[uActiveCharacter]->pInventoryItemList[v2], &_this, 0x24u); 2477 memcpy(&pPlayers[uActiveCharacter]->pInventoryItemList[v2], &_this, 0x24u);
2478 pPlayers[uActiveCharacter]->pEquipment.uShield = v2 + 1; 2478 pPlayers[uActiveCharacter]->pEquipment.uShield = v2 + 1;
2479 if ( v51 == EQUIP_OFF_HAND ) 2479 if ( v51 == EQUIP_SINGLE_HANDED )
2480 return; 2480 return;
2481 } 2481 }
2482 else 2482 else
2483 { 2483 {
2484 v52 = pPlayers[uActiveCharacter]->FindFreeInventoryListSlot(); 2484 v52 = pPlayers[uActiveCharacter]->FindFreeInventoryListSlot();
2503 pPlayers[uActiveCharacter]->pEquipment.uShield = v52 + 1; 2503 pPlayers[uActiveCharacter]->pEquipment.uShield = v52 + 1;
2504 } 2504 }
2505 pPlayers[uActiveCharacter]->pEquipment.uMainHand = 0; 2505 pPlayers[uActiveCharacter]->pEquipment.uMainHand = 0;
2506 return; 2506 return;
2507 //-------------------------taken in hand(взять в руку)------------------------------------------- 2507 //-------------------------taken in hand(взять в руку)-------------------------------------------
2508 case EQUIP_OFF_HAND: 2508 case EQUIP_SINGLE_HANDED:
2509 case EQUIP_WAND: 2509 case EQUIP_WAND:
2510 if ( pPlayers[uActiveCharacter]->HasUnderwaterSuitEquipped() 2510 if ( pPlayers[uActiveCharacter]->HasUnderwaterSuitEquipped()
2511 && pParty->pPickedItem.uItemID != 64 2511 && pParty->pPickedItem.uItemID != 64
2512 && pParty->pPickedItem.uItemID != 65 ) 2512 && pParty->pPickedItem.uItemID != 65 )
2513 { 2513 {
2608 __debugbreak(); // looks like offset in player's inventory and wand_lut much like case in 0042ECB5 2608 __debugbreak(); // looks like offset in player's inventory and wand_lut much like case in 0042ECB5
2609 stru_A750F8[uActiveCharacter - 1]._494836( *((int *)&pSpellDatas[66].uNormalLevelRecovery + v50), uActiveCharacter - 1 + 9); 2609 stru_A750F8[uActiveCharacter - 1]._494836( *((int *)&pSpellDatas[66].uNormalLevelRecovery + v50), uActiveCharacter - 1 + 9);
2610 } 2610 }
2611 break; 2611 break;
2612 //---------------------------take two hands(взять двумя руками)--------------------------------- 2612 //---------------------------take two hands(взять двумя руками)---------------------------------
2613 case EQUIP_MAIN_HAND: 2613 case EQUIP_TWO_HANDED:
2614 if ( pPlayers[uActiveCharacter]->HasUnderwaterSuitEquipped() ) 2614 if ( pPlayers[uActiveCharacter]->HasUnderwaterSuitEquipped() )
2615 { 2615 {
2616 pAudioPlayer->PlaySound(SOUND_error, 0, 0, -1, 0, 0, 0, 0); 2616 pAudioPlayer->PlaySound(SOUND_error, 0, 0, -1, 0, 0, 0, 0);
2617 return; 2617 return;
2618 } 2618 }