Mercurial > mm7
comparison UI/UICharacter.cpp @ 1620:61ea994a1812
sub_43EE77_ProbablyIfUnderwaterSuitIsEquipped to Player::HasUnderwaterSuitEquipped, sub_43EDB9_get_some_race_sex_relation_2 to ShouldLoadTexturesForRaceAndGender, Player_has_item to Player::HasItem
author | Grumpy7 |
---|---|
date | Sun, 15 Sep 2013 02:20:06 +0200 |
parents | 75fafd8ced59 |
children | ccde94f02b75 511cd6dd1048 |
comparison
equal
deleted
inserted
replaced
1619:eceabd56f399 | 1620:61ea994a1812 |
---|---|
1696 uTextureID_right_panel_loop = uTextureID_right_panel; | 1696 uTextureID_right_panel_loop = uTextureID_right_panel; |
1697 uTextureID_BACKHAND = pIcons_LOD->LoadTexture("BACKHAND", TEXTURE_16BIT_PALETTE); | 1697 uTextureID_BACKHAND = pIcons_LOD->LoadTexture("BACKHAND", TEXTURE_16BIT_PALETTE); |
1698 uTextureID_detaliz_close_button = uExitCancelTextureId; | 1698 uTextureID_detaliz_close_button = uExitCancelTextureId; |
1699 for ( uint i = 0; i < 4; ++i ) | 1699 for ( uint i = 0; i < 4; ++i ) |
1700 { | 1700 { |
1701 if ( sub_43EE77_ProbablyIfUnderwaterSuitIsEquipped(i + 1) ) | 1701 if ( pPlayers[i + 1]->HasUnderwaterSuitEquipped() ) |
1702 { | 1702 { |
1703 if ( pPlayers[i + 1]->GetRace() == CHARACTER_RACE_DWARF ) | 1703 if ( pPlayers[i + 1]->GetRace() == CHARACTER_RACE_DWARF ) |
1704 v3 = (pPlayers[i + 1]->GetSexByVoice() != 0) + 3; | 1704 v3 = (pPlayers[i + 1]->GetSexByVoice() != 0) + 3; |
1705 else | 1705 else |
1706 v3 = (pPlayers[i + 1]->GetSexByVoice() != 0) + 1; | 1706 v3 = (pPlayers[i + 1]->GetSexByVoice() != 0) + 1; |
1755 party_has_equipment[i] = 0; | 1755 party_has_equipment[i] = 0; |
1756 if ( pParty->pPickedItem.uItemID != i + 66 ) | 1756 if ( pParty->pPickedItem.uItemID != i + 66 ) |
1757 { | 1757 { |
1758 for ( uint j = 0; j < 4; ++j) | 1758 for ( uint j = 0; j < 4; ++j) |
1759 { | 1759 { |
1760 if ( Player_has_item(i + 66, &pParty->pPlayers[j], 0) ) | 1760 if ( pParty->pPlayers[j].HasItem(i + 66, 0) ) |
1761 party_has_equipment[i] = 1; | 1761 party_has_equipment[i] = 1; |
1762 } | 1762 } |
1763 } | 1763 } |
1764 } | 1764 } |
1765 memset(byte_5111F6.data(), 0, sizeof(byte_5111F6)); | 1765 memset(byte_5111F6.data(), 0, sizeof(byte_5111F6)); |
1766 for (uint i = 0; i < 4; ++i) | 1766 for (uint i = 0; i < 4; ++i) |
1767 { | 1767 { |
1768 auto player = pParty->pPlayers + i; | 1768 auto player = pParty->pPlayers + i; |
1769 | 1769 |
1770 if (Player_has_item(ITEM_ARTICACT_GOVERNONS_ARMOR, player, 1)) byte_5111F6[0] = 1; | 1770 if (player->HasItem(ITEM_ARTICACT_GOVERNONS_ARMOR, 1)) byte_5111F6[0] = 1; |
1771 if (Player_has_item(ITEM_ARTIFACT_YORUBA, player, 1)) byte_5111F6[1] = 1; | 1771 if (player->HasItem(ITEM_ARTIFACT_YORUBA, 1)) byte_5111F6[1] = 1; |
1772 if (Player_has_item(ITEM_RELIC_HARECS_LEATHER, player, 1)) byte_5111F6[2] = 1; | 1772 if (player->HasItem(ITEM_RELIC_HARECS_LEATHER, 1)) byte_5111F6[2] = 1; |
1773 if (Player_has_item(ITEM_ARTIFACT_LEAGUE_BOOTS, player, 1)) byte_5111F6[3] = 1; | 1773 if (player->HasItem(ITEM_ARTIFACT_LEAGUE_BOOTS, 1)) byte_5111F6[3] = 1; |
1774 if (Player_has_item(ITEM_RELIC_TALEDONS_HELM, player, 1)) byte_5111F6[4] = 1; | 1774 if (player->HasItem(ITEM_RELIC_TALEDONS_HELM, 1)) byte_5111F6[4] = 1; |
1775 if (Player_has_item(ITEM_RELIC_SCHOLARS_CAP, player, 1)) byte_5111F6[5] = 1; | 1775 if (player->HasItem(ITEM_RELIC_SCHOLARS_CAP, 1)) byte_5111F6[5] = 1; |
1776 if (Player_has_item(ITEM_RELIC_PHYNAXIAN_CROWN, player, 1)) byte_5111F6[6] = 1; | 1776 if (player->HasItem(ITEM_RELIC_PHYNAXIAN_CROWN, 1)) byte_5111F6[6] = 1; |
1777 if (Player_has_item(ITEM_ARTIFACT_MINDS_EYE, player, 1)) byte_5111F6[7] = 1; | 1777 if (player->HasItem(ITEM_ARTIFACT_MINDS_EYE, 1)) byte_5111F6[7] = 1; |
1778 if (Player_has_item(ITEM_RARE_SHADOWS_MASK, player, 1)) byte_5111F6[8] = 1; | 1778 if (player->HasItem(ITEM_RARE_SHADOWS_MASK, 1)) byte_5111F6[8] = 1; |
1779 if (Player_has_item(ITEM_RILIC_TITANS_BELT, player, 1)) byte_5111F6[9] = 1; | 1779 if (player->HasItem(ITEM_RILIC_TITANS_BELT, 1)) byte_5111F6[9] = 1; |
1780 if (Player_has_item(ITEM_ARTIFACT_HEROS_BELT, player, 1)) byte_5111F6[10] = 1; | 1780 if (player->HasItem(ITEM_ARTIFACT_HEROS_BELT, 1)) byte_5111F6[10] = 1; |
1781 if (Player_has_item(ITEM_RELIC_TWILIGHT, player, 1)) byte_5111F6[11] = 1; | 1781 if (player->HasItem(ITEM_RELIC_TWILIGHT, 1)) byte_5111F6[11] = 1; |
1782 if (Player_has_item(ITEM_ARTIFACT_CLOAK_OF_THE_SHEEP, player, 1)) byte_5111F6[12] = 1; | 1782 if (player->HasItem(ITEM_ARTIFACT_CLOAK_OF_THE_SHEEP, 1)) byte_5111F6[12] = 1; |
1783 if (Player_has_item(ITEM_RARE_SUN_CLOAK, player, 1)) byte_5111F6[13] = 1; | 1783 if (player->HasItem(ITEM_RARE_SUN_CLOAK, 1)) byte_5111F6[13] = 1; |
1784 if (Player_has_item(ITEM_RARE_MOON_CLOAK, player, 1)) byte_5111F6[14] = 1; | 1784 if (player->HasItem(ITEM_RARE_MOON_CLOAK, 1)) byte_5111F6[14] = 1; |
1785 if (Player_has_item(ITEM_RARE_VAMPIRES_CAPE, player, 1)) byte_5111F6[15] = 1; | 1785 if (player->HasItem(ITEM_RARE_VAMPIRES_CAPE, 1)) byte_5111F6[15] = 1; |
1786 if (Player_has_item(ITEM_ELVEN_CHAINMAIL, player, 1)) byte_5111F6[16] = 1; | 1786 if (player->HasItem(ITEM_ELVEN_CHAINMAIL, 1)) byte_5111F6[16] = 1; |
1787 } | 1787 } |
1788 | 1788 |
1789 for (uint i = 0; i < 2; ++i) | 1789 for (uint i = 0; i < 2; ++i) |
1790 { | 1790 { |
1791 for ( uint j = 0; j < 5; ++j )//Belt | 1791 for ( uint j = 0; j < 5; ++j )//Belt |
1814 papredoll_dbrds[11] = pIcons_LOD->LoadTexture("item092v3", TEXTURE_16BIT_PALETTE); | 1814 papredoll_dbrds[11] = pIcons_LOD->LoadTexture("item092v3", TEXTURE_16BIT_PALETTE); |
1815 } | 1815 } |
1816 //v43 = 0; | 1816 //v43 = 0; |
1817 for (uint i = 0; i < 4; ++i) | 1817 for (uint i = 0; i < 4; ++i) |
1818 { | 1818 { |
1819 if ( sub_43EDB9_get_some_race_sex_relation_2(i) ) | 1819 if ( ShouldLoadTexturesForRaceAndGender(i) ) |
1820 { | 1820 { |
1821 GetItemTextureFilename(pContainer, 524, i + 1, 0); | 1821 GetItemTextureFilename(pContainer, 524, i + 1, 0); |
1822 paperdoll_belt_texture[i][5] = pIcons_LOD->LoadTexture(pContainer, TEXTURE_16BIT_PALETTE);//Titans belt | 1822 paperdoll_belt_texture[i][5] = pIcons_LOD->LoadTexture(pContainer, TEXTURE_16BIT_PALETTE);//Titans belt |
1823 pItemTXTNum = 66; | 1823 pItemTXTNum = 66; |
1824 for ( v32 = 0; v32 < 13; ++v32 )//simple armor | 1824 for ( v32 = 0; v32 < 13; ++v32 )//simple armor |
2402 if ( !pPlayers[uActiveCharacter]->HasSkill(pSkillType) )//нет навыка | 2402 if ( !pPlayers[uActiveCharacter]->HasSkill(pSkillType) )//нет навыка |
2403 { | 2403 { |
2404 pPlayers[uActiveCharacter]->PlaySound(SPEECH_39, 0); | 2404 pPlayers[uActiveCharacter]->PlaySound(SPEECH_39, 0); |
2405 return; | 2405 return; |
2406 } | 2406 } |
2407 if ( sub_43EE77_ProbablyIfUnderwaterSuitIsEquipped(uActiveCharacter) && (pEquipType != EQUIP_ARMOUR || bUnderwater) ) | 2407 if ( pPlayers[uActiveCharacter]->HasUnderwaterSuitEquipped() && (pEquipType != EQUIP_ARMOUR || bUnderwater) ) |
2408 { | 2408 { |
2409 pAudioPlayer->PlaySound(SOUND_27, 0, 0, -1, 0, 0, 0, 0); | 2409 pAudioPlayer->PlaySound(SOUND_27, 0, 0, -1, 0, 0, 0, 0); |
2410 return; | 2410 return; |
2411 } | 2411 } |
2412 pPlayers[uActiveCharacter]->EquipBody(pEquipType); | 2412 pPlayers[uActiveCharacter]->EquipBody(pEquipType); |
2413 if ( pParty->pPickedItem.uItemID == ITEM_WETSUIT ) | 2413 if ( pParty->pPickedItem.uItemID == ITEM_WETSUIT ) |
2414 WetsuitOff(uActiveCharacter); | 2414 WetsuitOff(uActiveCharacter); |
2415 return; | 2415 return; |
2416 //------------------------dress rings(одевание колец)---------------------------------- | 2416 //------------------------dress rings(одевание колец)---------------------------------- |
2417 case EQUIP_RING: | 2417 case EQUIP_RING: |
2418 if ( sub_43EE77_ProbablyIfUnderwaterSuitIsEquipped(uActiveCharacter) ) | 2418 if ( pPlayers[uActiveCharacter]->HasUnderwaterSuitEquipped() ) |
2419 { | 2419 { |
2420 pAudioPlayer->PlaySound(SOUND_27, 0, 0, -1, 0, 0, 0, 0); | 2420 pAudioPlayer->PlaySound(SOUND_27, 0, 0, -1, 0, 0, 0, 0); |
2421 return; | 2421 return; |
2422 } | 2422 } |
2423 //слоты для колец | 2423 //слоты для колец |
2450 pPlayers[uActiveCharacter]->pEquipment.uRings[5] = v52 + 1; | 2450 pPlayers[uActiveCharacter]->pEquipment.uRings[5] = v52 + 1; |
2451 } | 2451 } |
2452 return; | 2452 return; |
2453 //------------------dress shield(одеть щит)------------------------------------------------------ | 2453 //------------------dress shield(одеть щит)------------------------------------------------------ |
2454 case EQUIP_SHIELD://Щит | 2454 case EQUIP_SHIELD://Щит |
2455 if ( sub_43EE77_ProbablyIfUnderwaterSuitIsEquipped(uActiveCharacter) )//в акваланге | 2455 if ( pPlayers[uActiveCharacter]->HasUnderwaterSuitEquipped() )//в акваланге |
2456 { | 2456 { |
2457 pAudioPlayer->PlaySound(SOUND_27, 0, 0, -1, 0, 0, 0, 0); | 2457 pAudioPlayer->PlaySound(SOUND_27, 0, 0, -1, 0, 0, 0, 0); |
2458 return; | 2458 return; |
2459 } | 2459 } |
2460 if ( !pPlayers[uActiveCharacter]->HasSkill(pSkillType) )//нет навыка | 2460 if ( !pPlayers[uActiveCharacter]->HasSkill(pSkillType) )//нет навыка |
2501 pPlayers[uActiveCharacter]->pEquipment.uMainHand = 0; | 2501 pPlayers[uActiveCharacter]->pEquipment.uMainHand = 0; |
2502 return; | 2502 return; |
2503 //-------------------------taken in hand(взять в руку)------------------------------------------- | 2503 //-------------------------taken in hand(взять в руку)------------------------------------------- |
2504 case EQUIP_OFF_HAND: | 2504 case EQUIP_OFF_HAND: |
2505 case EQUIP_WAND: | 2505 case EQUIP_WAND: |
2506 if ( sub_43EE77_ProbablyIfUnderwaterSuitIsEquipped(uActiveCharacter) | 2506 if ( pPlayers[uActiveCharacter]->HasUnderwaterSuitEquipped() |
2507 && pParty->pPickedItem.uItemID != 64 | 2507 && pParty->pPickedItem.uItemID != 64 |
2508 && pParty->pPickedItem.uItemID != 65 ) | 2508 && pParty->pPickedItem.uItemID != 65 ) |
2509 { | 2509 { |
2510 pAudioPlayer->PlaySound(SOUND_27, 0, 0, -1, 0, 0, 0, 0); | 2510 pAudioPlayer->PlaySound(SOUND_27, 0, 0, -1, 0, 0, 0, 0); |
2511 return; | 2511 return; |
2605 stru_A750F8[uActiveCharacter - 1]._494836( *((int *)&pSpellDatas[66].uNormalLevelRecovery + v50), uActiveCharacter - 1 + 9); | 2605 stru_A750F8[uActiveCharacter - 1]._494836( *((int *)&pSpellDatas[66].uNormalLevelRecovery + v50), uActiveCharacter - 1 + 9); |
2606 } | 2606 } |
2607 break; | 2607 break; |
2608 //---------------------------take two hands(взять двумя руками)--------------------------------- | 2608 //---------------------------take two hands(взять двумя руками)--------------------------------- |
2609 case EQUIP_MAIN_HAND: | 2609 case EQUIP_MAIN_HAND: |
2610 if ( sub_43EE77_ProbablyIfUnderwaterSuitIsEquipped(uActiveCharacter) ) | 2610 if ( pPlayers[uActiveCharacter]->HasUnderwaterSuitEquipped() ) |
2611 { | 2611 { |
2612 pAudioPlayer->PlaySound(SOUND_27, 0, 0, -1, 0, 0, 0, 0); | 2612 pAudioPlayer->PlaySound(SOUND_27, 0, 0, -1, 0, 0, 0, 0); |
2613 return; | 2613 return; |
2614 } | 2614 } |
2615 if ( !pPlayers[uActiveCharacter]->HasSkill(pSkillType) ) | 2615 if ( !pPlayers[uActiveCharacter]->HasSkill(pSkillType) ) |