Mercurial > mm7
changeset 1474:3cda66022a77
UICharacter.cpp cleaning(continue) OnPaperdollLeftClick
author | Ritor1 |
---|---|
date | Wed, 28 Aug 2013 14:38:51 +0600 |
parents | ec79ee6d44ce |
children | d7720c1f1d3b |
files | UI/UICharacter.cpp |
diffstat | 1 files changed, 482 insertions(+), 614 deletions(-) [+] |
line wrap: on
line diff
--- a/UI/UICharacter.cpp Mon Aug 26 15:05:15 2013 +0600 +++ b/UI/UICharacter.cpp Wed Aug 28 14:38:51 2013 +0600 @@ -1161,107 +1161,106 @@ } if ( index >= 0 && index < 17 ) { - if ( pPlayers[uPlayerID]->pEquipment.uMainHand - && (pPlayers[uPlayerID]->GetEquippedItemEquipType(EQUIP_MAIN_HAND) == EQUIP_MAIN_HAND - || pPlayers[uPlayerID]->GetEquippedItemSkillType(EQUIP_MAIN_HAND) == EQUIP_SHIELD - && !pPlayers[uPlayerID]->pEquipment.uShield) )//без щита - { - v94 = paperdoll_armor_texture[pBodyComplection][index][2]; - if ( paperdoll_armor_texture[pBodyComplection][index][2] == pIcons_LOD->FindTextureByName("pending") ) - { - v94 = paperdoll_armor_texture[pBodyComplection][index][1]; - item_X = pPaperdoll_BodyX + paperdoll_shoulder_coord[pBodyComplection][index][0]; - item_Y = pPaperdoll_BodyY + paperdoll_shoulder_coord[pBodyComplection][index][1]; - } - else + if ( pPlayers[uPlayerID]->pEquipment.uMainHand + && (pPlayers[uPlayerID]->GetEquippedItemEquipType(EQUIP_MAIN_HAND) == EQUIP_MAIN_HAND + || pPlayers[uPlayerID]->GetEquippedItemSkillType(EQUIP_MAIN_HAND) == EQUIP_SHIELD + && !pPlayers[uPlayerID]->pEquipment.uShield) )//без щита { - item_X = pPaperdoll_BodyX + paperdoll_shoulder_second_coord[pBodyComplection][index][0]; - item_Y = pPaperdoll_BodyY + paperdoll_shoulder_second_coord[pBodyComplection][index][1]; - } - if ( v94 != pIcons_LOD->FindTextureByName("pending") ) - { - if ( !(item->uAttributes & 0xF0) ) + v94 = paperdoll_armor_texture[pBodyComplection][index][2]; + if ( paperdoll_armor_texture[pBodyComplection][index][2] == pIcons_LOD->FindTextureByName("pending") ) { - if ( item->uAttributes & 2 ) - pRenderer->DrawTransparentRedShade(item_X, item_Y, pIcons_LOD->GetTexture(v94)); - else - { - if ( item->uAttributes & 1 ) - pRenderer->DrawTextureTransparent(item_X, item_Y, pIcons_LOD->GetTexture(v94)); - else - pRenderer->DrawTransparentGreenShade(item_X, item_Y, pIcons_LOD->GetTexture(v94)); - } + v94 = paperdoll_armor_texture[pBodyComplection][index][1]; + item_X = pPaperdoll_BodyX + paperdoll_shoulder_coord[pBodyComplection][index][0]; + item_Y = pPaperdoll_BodyY + paperdoll_shoulder_coord[pBodyComplection][index][1]; } else { - if ( paperdoll_armor_texture[pBodyComplection][index][2] != pIcons_LOD->FindTextureByName("pending") ) + item_X = pPaperdoll_BodyX + paperdoll_shoulder_second_coord[pBodyComplection][index][0]; + item_Y = pPaperdoll_BodyY + paperdoll_shoulder_second_coord[pBodyComplection][index][1]; + } + if ( v94 != pIcons_LOD->FindTextureByName("pending") ) + { + if ( !(item->uAttributes & 0xF0) ) { - if ( item->uAttributes & 0xF0 ) + if ( item->uAttributes & 2 ) + pRenderer->DrawTransparentRedShade(item_X, item_Y, pIcons_LOD->GetTexture(v94)); + else + { + if ( item->uAttributes & 1 ) + pRenderer->DrawTextureTransparent(item_X, item_Y, pIcons_LOD->GetTexture(v94)); + else + pRenderer->DrawTransparentGreenShade(item_X, item_Y, pIcons_LOD->GetTexture(v94)); + } + } + else + { + if ( paperdoll_armor_texture[pBodyComplection][index][2] != pIcons_LOD->FindTextureByName("pending") ) { - if ( (item->uAttributes & 0xF0) == ITEM_AURA_EFFECT_RED ) - container = "sptext01"; - if ( (item->uAttributes & 0xF0) == ITEM_AURA_EFFECT_BLUE ) - container = "sp28a"; - if ( ( item->uAttributes & 0xF0) == ITEM_AURA_EFFECT_GREEN ) - container = "sp30a"; - if ( (item->uAttributes & 0xF0) == ITEM_AURA_EFFECT_PURPLE ) - container = "sp91a"; - _50C9A8_item_enchantment_timer -= pEventTimer->uTimeElapsed; - if ( _50C9A8_item_enchantment_timer <= 0 ) + if ( item->uAttributes & 0xF0 ) { - _50C9A8_item_enchantment_timer = 0; - item->uAttributes &= 0xFFFFFF0Fu; - ptr_50C9A4 = 0; + if ( (item->uAttributes & 0xF0) == ITEM_AURA_EFFECT_RED ) + container = "sptext01"; + if ( (item->uAttributes & 0xF0) == ITEM_AURA_EFFECT_BLUE ) + container = "sp28a"; + if ( ( item->uAttributes & 0xF0) == ITEM_AURA_EFFECT_GREEN ) + container = "sp30a"; + if ( (item->uAttributes & 0xF0) == ITEM_AURA_EFFECT_PURPLE ) + container = "sp91a"; + _50C9A8_item_enchantment_timer -= pEventTimer->uTimeElapsed; + if ( _50C9A8_item_enchantment_timer <= 0 ) + { + _50C9A8_item_enchantment_timer = 0; + item->uAttributes &= 0xFFFFFF0Fu; + ptr_50C9A4 = 0; + } + pRenderer->DrawAura(item_X, item_Y, pIcons_LOD->GetTexture(v94), pIcons_LOD->LoadTexturePtr(container, TEXTURE_16BIT_PALETTE), + GetTickCount() * 0.1, 0, 255); } - pRenderer->DrawAura(item_X, item_Y, pIcons_LOD->GetTexture(v94), pIcons_LOD->LoadTexturePtr(container, TEXTURE_16BIT_PALETTE), - GetTickCount() * 0.1, 0, 255); } } } } - } - else//без ничего или с щитом - { - //v94 = paperdoll_armor_texture[pBodyComplection][index][1]; - if ( paperdoll_armor_texture[pBodyComplection][index][1] != pIcons_LOD->FindTextureByName("pending") ) + else//без ничего или с щитом { - item_X = pPaperdoll_BodyX + paperdoll_shoulder_coord[pBodyComplection][index][0]; - item_Y = pPaperdoll_BodyY + paperdoll_shoulder_coord[pBodyComplection][index][1]; - if ( !(item->uAttributes & 0xF0) ) + //v94 = paperdoll_armor_texture[pBodyComplection][index][1]; + if ( paperdoll_armor_texture[pBodyComplection][index][1] != pIcons_LOD->FindTextureByName("pending") ) { - if ( item->uAttributes & 2 ) - pRenderer->DrawTransparentRedShade(item_X, item_Y, pIcons_LOD->GetTexture(paperdoll_armor_texture[pBodyComplection][index][1])); + item_X = pPaperdoll_BodyX + paperdoll_shoulder_coord[pBodyComplection][index][0]; + item_Y = pPaperdoll_BodyY + paperdoll_shoulder_coord[pBodyComplection][index][1]; + if ( !(item->uAttributes & 0xF0) ) + { + if ( item->uAttributes & 2 ) + pRenderer->DrawTransparentRedShade(item_X, item_Y, pIcons_LOD->GetTexture(paperdoll_armor_texture[pBodyComplection][index][1])); + else + { + if ( item->uAttributes & 1 ) + pRenderer->DrawTextureTransparent(item_X, item_Y, pIcons_LOD->GetTexture(paperdoll_armor_texture[pBodyComplection][index][1])); + else + pRenderer->DrawTransparentGreenShade(item_X, item_Y, pIcons_LOD->GetTexture(paperdoll_armor_texture[pBodyComplection][index][1])); + } + } else { - if ( item->uAttributes & 1 ) - pRenderer->DrawTextureTransparent(item_X, item_Y, pIcons_LOD->GetTexture(paperdoll_armor_texture[pBodyComplection][index][1])); - else - pRenderer->DrawTransparentGreenShade(item_X, item_Y, pIcons_LOD->GetTexture(paperdoll_armor_texture[pBodyComplection][index][1])); + if ( (item->uAttributes & 0xF0) == ITEM_AURA_EFFECT_RED ) + container = "sptext01"; + if ( (item->uAttributes & 0xF0) == ITEM_AURA_EFFECT_BLUE ) + container = "sp28a"; + if ( (item->uAttributes & 0xF0) == ITEM_AURA_EFFECT_GREEN ) + container = "sp30a"; + if ( (item->uAttributes & 0xF0) == ITEM_AURA_EFFECT_PURPLE ) + container = "sp91a"; + _50C9A8_item_enchantment_timer -= pEventTimer->uTimeElapsed; + if ( _50C9A8_item_enchantment_timer <= 0 ) + { + _50C9A8_item_enchantment_timer = 0; + item->uAttributes &= 0xFFFFFF0Fu; + ptr_50C9A4 = 0; + } + pRenderer->DrawAura(item_X, item_Y, pIcons_LOD->GetTexture(paperdoll_armor_texture[pBodyComplection][index][1]), + pIcons_LOD->LoadTexturePtr(container, TEXTURE_16BIT_PALETTE), GetTickCount() * 0.1, 0, 255); } } - else - { - if ( (item->uAttributes & 0xF0) == ITEM_AURA_EFFECT_RED ) - container = "sptext01"; - if ( (item->uAttributes & 0xF0) == ITEM_AURA_EFFECT_BLUE ) - container = "sp28a"; - if ( (item->uAttributes & 0xF0) == ITEM_AURA_EFFECT_GREEN ) - container = "sp30a"; - if ( (item->uAttributes & 0xF0) == ITEM_AURA_EFFECT_PURPLE ) - container = "sp91a"; - _50C9A8_item_enchantment_timer -= pEventTimer->uTimeElapsed; - if ( _50C9A8_item_enchantment_timer <= 0 ) - { - _50C9A8_item_enchantment_timer = 0; - item->uAttributes &= 0xFFFFFF0Fu; - ptr_50C9A4 = 0; - } - pRenderer->DrawAura(item_X, item_Y, pIcons_LOD->GetTexture(paperdoll_armor_texture[pBodyComplection][index][1]), - pIcons_LOD->LoadTexturePtr(container, TEXTURE_16BIT_PALETTE), GetTickCount() * 0.1, 0, 255); - } } - } - } //----------------------------------------------(Cloak collar/воротник плаща)------------------------------------- if ( pPlayers[uPlayerID]->pEquipment.uCloak ) @@ -1673,22 +1672,16 @@ //----- (0043BCA7) -------------------------------------------------------- void CharacterUI_LoadPaperdollTextures() { - //enum CHARACTER_RACE pRace; // ebx@7 - //signed int pSex; // eax@7 int v3; // ebx@10 Player *pPlayer; // edi@12 - //unsigned __int8 v5; // cl@12 int v6; // edi@16 unsigned int v7; // eax@16 Player *pPlayer2; // ebx@16 char *v9; // ebx@16 - //char v10; // al@16 - //signed int v11; // edi@21 unsigned int v22; // eax@76 int v23; // ecx@76 unsigned int v24; // eax@78 int v25; // ecx@78 - //int v26; // ebx@79 unsigned int v27; // eax@80 int v28; // ecx@80 signed int v32; // [sp+10h] [bp-28h]@75 @@ -1697,7 +1690,6 @@ int pItemTXTNum; // [sp+14h] [bp-24h]@75 int v37; // [sp+14h] [bp-24h]@77 signed int v38; // [sp+14h] [bp-24h]@79 - //int v43; // [sp+20h] [bp-18h]@73 char pContainer[128]; // [sp+24h] [bp-14h]@12 uTextureID_MAGNIF_B = pIcons_LOD->LoadTexture("MAGNIF-B", TEXTURE_16BIT_PALETTE); @@ -1910,180 +1902,102 @@ //----- (00419401) -------------------------------------------------------- void CharacterUI_SkillsTab_CreateButtons() - { - // unsigned int v0; // ecx@3 - GUIButton *pButton; // eax@3 - unsigned int current_Y; // esi@8 - int buttons_count; // [sp+10h] [bp-14h]@1 - int first_rows; // [sp+14h] [bp-10h]@19 - int skill_id; // [sp+18h] [bp-Ch]@8 - Player *curr_player; // [sp+1Ch] [bp-8h]@8 - int i; - int uCurrFontHeght; +{ + GUIButton *pButton; // eax@3 + unsigned int current_Y; // esi@8 + int buttons_count; // [sp+10h] [bp-14h]@1 + int first_rows; // [sp+14h] [bp-10h]@19 + int skill_id; // [sp+18h] [bp-Ch]@8 + Player *curr_player; // [sp+1Ch] [bp-8h]@8 + int i; + int uCurrFontHeght; - buttons_count = 0; - if ( dword_507CC0_activ_ch ) - CharacterUI_ReleaseButtons(); - dword_507CC0_activ_ch = uActiveCharacter; - for ( pButton = pGUIWindow_CurrentMenu->pControlsHead; pButton; pButton = pButton->pNext ) - { - if ( pButton->msg == UIMSG_InventoryLeftClick ) - { - dword_50698C_uX = pButton->uX; - dword_506988_uY = pButton->uY; - dword_506984_uZ = pButton->uZ; - dword_506980_uW = pButton->uW; - pButton->uW = 0; - pButton->uZ = 0; - pButton->uY = 0; - pButton->uX = 0; - } - } - first_rows = 0; - // a5 = pGUIWindow_CurrentMenu->uNumControls; - curr_player = &pParty->pPlayers[uActiveCharacter-1]; + buttons_count = 0; + if ( dword_507CC0_activ_ch ) + CharacterUI_ReleaseButtons(); + dword_507CC0_activ_ch = uActiveCharacter; + for ( pButton = pGUIWindow_CurrentMenu->pControlsHead; pButton; pButton = pButton->pNext ) + { + if ( pButton->msg == UIMSG_InventoryLeftClick ) + { + dword_50698C_uX = pButton->uX; + dword_506988_uY = pButton->uY; + dword_506984_uZ = pButton->uZ; + dword_506980_uW = pButton->uW; + pButton->uW = 0; + pButton->uZ = 0; + pButton->uY = 0; + pButton->uX = 0; + } + } + first_rows = 0; + // a5 = pGUIWindow_CurrentMenu->uNumControls; + curr_player = &pParty->pPlayers[uActiveCharacter-1]; - uCurrFontHeght=pFontLucida->uFontHeight; - current_Y = 2 *uCurrFontHeght + 13; - for(i=0; i<9;++i) - { - skill_id = pWeaponSkills[i]; - if ( curr_player->pActiveSkills[skill_id] & 0x3F ) - { - current_Y += uCurrFontHeght - 3; - ++buttons_count; - ++first_rows; - pGUIWindow_CurrentMenu->CreateButton(24, current_Y, 204, uCurrFontHeght - 3, 3, skill_id | 0x8000, UIMSG_SkillUp, skill_id, 0, "", 0, 0); - } - } - if ( !first_rows ) - current_Y += uCurrFontHeght - 3; - current_Y += 2 * uCurrFontHeght - 6; - for(i=0; i<9;++i) - { - skill_id = pMagicSkills[i]; - if ( curr_player->pActiveSkills[skill_id] & 0x3F && buttons_count < 15 ) - { - current_Y += uCurrFontHeght - 3; - ++buttons_count; - pGUIWindow_CurrentMenu->CreateButton(24, current_Y, 204, uCurrFontHeght - 3, 3, skill_id | 0x8000, UIMSG_SkillUp, skill_id, 0, "", 0, 0); - } - } - first_rows = 0; - current_Y = 2 * uCurrFontHeght + 13; - for(i=0; i<5;++i) - { - skill_id = pArmorSkills[i]; - if ( curr_player->pActiveSkills[skill_id] & 0x3F ) - { - current_Y+= uCurrFontHeght - 3; - ++buttons_count; - ++first_rows; - pGUIWindow_CurrentMenu->CreateButton(246, current_Y, 204, uCurrFontHeght - 3, 3, skill_id | 0x8000, UIMSG_SkillUp, skill_id, 0, "", 0, 0); - } - } - if ( !first_rows ) - current_Y += uCurrFontHeght - 3; - current_Y += 2 * uCurrFontHeght - 6; - for(i=0; i<12; ++i) - { - skill_id = pMiscSkills[i]; - if ( curr_player->pActiveSkills[skill_id] & 0x3F ) - { - current_Y += uCurrFontHeght - 3; - ++buttons_count; - pGUIWindow_CurrentMenu->CreateButton(246, current_Y, 204, uCurrFontHeght - 3, 3, skill_id | 0x8000, UIMSG_SkillUp, skill_id, 0, "", 0, 0); - } - } + uCurrFontHeght=pFontLucida->uFontHeight; + current_Y = 2 *uCurrFontHeght + 13; + for( i = 0; i < 9; ++i ) + { + skill_id = pWeaponSkills[i]; + if ( curr_player->pActiveSkills[skill_id] & 0x3F ) + { + current_Y += uCurrFontHeght - 3; + ++buttons_count; + ++first_rows; + pGUIWindow_CurrentMenu->CreateButton(24, current_Y, 204, uCurrFontHeght - 3, 3, skill_id | 0x8000, UIMSG_SkillUp, skill_id, 0, "", 0, 0); + } + } + if ( !first_rows ) + current_Y += uCurrFontHeght - 3; + current_Y += 2 * uCurrFontHeght - 6; + for ( i = 0; i < 9; ++i ) + { + skill_id = pMagicSkills[i]; + if ( curr_player->pActiveSkills[skill_id] & 0x3F && buttons_count < 15 ) + { + current_Y += uCurrFontHeght - 3; + ++buttons_count; + pGUIWindow_CurrentMenu->CreateButton(24, current_Y, 204, uCurrFontHeght - 3, 3, skill_id | 0x8000, UIMSG_SkillUp, skill_id, 0, "", 0, 0); + } + } + first_rows = 0; + current_Y = 2 * uCurrFontHeght + 13; + for ( i = 0; i < 5; ++i ) + { + skill_id = pArmorSkills[i]; + if ( curr_player->pActiveSkills[skill_id] & 0x3F ) + { + current_Y+= uCurrFontHeght - 3; + ++buttons_count; + ++first_rows; + pGUIWindow_CurrentMenu->CreateButton(246, current_Y, 204, uCurrFontHeght - 3, 3, skill_id | 0x8000, UIMSG_SkillUp, skill_id, 0, "", 0, 0); + } + } + if ( !first_rows ) + current_Y += uCurrFontHeght - 3; + current_Y += 2 * uCurrFontHeght - 6; + for ( i = 0; i < 12; ++i ) + { + skill_id = pMiscSkills[i]; + if ( curr_player->pActiveSkills[skill_id] & 0x3F ) + { + current_Y += uCurrFontHeght - 3; + ++buttons_count; + pGUIWindow_CurrentMenu->CreateButton(246, current_Y, 204, uCurrFontHeght - 3, 3, skill_id | 0x8000, UIMSG_SkillUp, skill_id, 0, "", 0, 0); + } + } - if ( buttons_count ) - pGUIWindow_CurrentMenu->_41D08F_set_keyboard_control_group(buttons_count, 1, 0, pGUIWindow_CurrentMenu->uNumControls); - } - - + if ( buttons_count ) + pGUIWindow_CurrentMenu->_41D08F_set_keyboard_control_group(buttons_count, 1, 0, pGUIWindow_CurrentMenu->uNumControls); +} //----- (00418511) -------------------------------------------------------- - void CharacterUI_StatsTab_Draw( Player *player ) - { - //Player *pPlayer; // edi@1 - //unsigned int v4; // eax@2 - int v7; // ebp@4 - int v8; // eax@4 - unsigned int v9; // eax@4 - int v10; // ST34_4@4 - int v13; // ebp@4 - int v14; // eax@4 - unsigned int v15; // eax@4 - int v19; // ebp@4 - int v20; // eax@4 - unsigned int v21; // eax@4 - int v25; // ebp@4 - int v26; // eax@4 - unsigned int v27; // eax@4 - int v31; // ebp@4 - int v32; // eax@4 - unsigned int v33; // eax@4 - int v37; // ebp@4 - int v38; // eax@4 - unsigned int v39; // eax@4 - int v43; // ebp@4 - int v44; // eax@4 - unsigned int v45; // eax@4 - signed int v49; // eax@6 - unsigned int v50; // eax@6 - int v53; // eax@8 - unsigned int v54; // eax@8 - int v58; // ebp@8 - int v59; // eax@8 - unsigned int v60; // eax@8 - unsigned int v62; // eax@8 - signed int v64; // eax@8 - //unsigned __int8 v66; // al@8 - char *v67; // eax@9 - signed int v70; // ebp@11 - signed int v71; // eax@11 - unsigned int v72; // eax@11 - int v75; // ebp@13 - int v76; // eax@13 - unsigned int v77; // eax@13 - char *v78; // ecx@14 - unsigned int v81; // eax@16 - int v83; // eax@16 - char *v85; // eax@16 - int v87; // eax@16 - char *v89; // eax@16 - int v90; // eax@16 - unsigned int v92; // eax@19 - int v93; // eax@19 - unsigned int v95; // eax@22 - int v96; // eax@22 - unsigned int v98; // eax@25 - int v99; // eax@25 - unsigned int v101; // eax@27 - int v102; // eax@27 - unsigned int v104; // eax@30 - unsigned int v106; // eax@32 - int v107; // eax@33 - unsigned int v109; // eax@36 - unsigned int v111; // eax@38 - const char *a2; // [sp+14h] [bp-Ch]@4 - const char *a2a; // [sp+14h] [bp-Ch]@6 - const char *a2b; // [sp+14h] [bp-Ch]@11 - const char *a2c; // [sp+14h] [bp-Ch]@16 - const char *a2d; // [sp+14h] [bp-Ch]@19 - const char *a2e; // [sp+14h] [bp-Ch]@22 - const char *a2f; // [sp+14h] [bp-Ch]@25 - const char *a2g; // [sp+14h] [bp-Ch]@27 - const char *a2h; // [sp+14h] [bp-Ch]@33 - int v131; // [sp+18h] [bp-8h]@16 - int v132; // [sp+18h] [bp-8h]@19 - int v133; // [sp+18h] [bp-8h]@22 - int v134; // [sp+18h] [bp-8h]@25 - int v135; // [sp+18h] [bp-8h]@27 - int v136; // [sp+18h] [bp-8h]@33 +void CharacterUI_StatsTab_Draw( Player *player ) +{ + int pY; // ST34_4@4 + char *pText; // eax@9 + const char *a2; // [sp+14h] [bp-Ch]@4 - //pPlayer = &pParty->pPlayers[uPlayerID-1]; - //pPlayer = player; pRenderer->DrawTextureIndexed(8, 8, pIcons_LOD->LoadTexturePtr("fr_stats", TEXTURE_16BIT_PALETTE)); sprintf(pTmpBuf.data(), "\f%05d", ui_character_header_text_color); sprintfex(pTmpBuf2.data(), pGlobalTXT_LocalizationStrings[429], player->pName, pClassNames[player->classType]);//"^Pi[%s] %s" / "%s the %s" @@ -2095,355 +2009,312 @@ strcat(pTmpBuf.data(), pTmpBuf2.data()); pGUIWindow_CurrentMenu->DrawText(pFontArrus, 26, 18, 0, pTmpBuf.data(), 0, 0, 0); - v10 = 53; - v7 = player->GetBaseStrength(); - v8 = player->GetActualMight(); - v9 = UI_GetHealthManaStringColor(v8, v7); - sprintf(pTmpBuf.data(), "%s\f%05u\r424%d\f00000 /\t185%d\n", pGlobalTXT_LocalizationStrings[144], v9, v8, v7);//Might - pGUIWindow_CurrentMenu->DrawText(pFontArrus, 26, v10, 0, pTmpBuf.data(), 0, 0, 0); + //First column(Первая колонка) + pY = 53; + sprintf(pTmpBuf.data(), "%s\f%05u\r424%d\f00000 /\t185%d\n", pGlobalTXT_LocalizationStrings[144], + UI_GetHealthManaStringColor(player->GetActualMight(), player->GetBaseStrength()), + player->GetActualMight(), player->GetBaseStrength());//Might + pGUIWindow_CurrentMenu->DrawText(pFontArrus, 26, pY, 0, pTmpBuf.data(), 0, 0, 0); - v10 += LOBYTE(pFontArrus->uFontHeight) - 2; - v13 = player->GetBaseIntelligence(); - v14 = player->GetActualIntelligence(); - v15 = UI_GetHealthManaStringColor(v14, v13); - sprintf(pTmpBuf.data(), "%s\f%05u\r424%d\f00000 /\t185%d\n", pGlobalTXT_LocalizationStrings[116], v15, v14, v13);//Intellect - pGUIWindow_CurrentMenu->DrawText(pFontArrus, 26, v10, 0, pTmpBuf.data(), 0, 0, 0); + pY += LOBYTE(pFontArrus->uFontHeight) - 2; + sprintf(pTmpBuf.data(), "%s\f%05u\r424%d\f00000 /\t185%d\n", pGlobalTXT_LocalizationStrings[116], + UI_GetHealthManaStringColor(player->GetActualIntelligence(), player->GetBaseIntelligence()), + player->GetActualIntelligence(), player->GetBaseIntelligence());//Intellect + pGUIWindow_CurrentMenu->DrawText(pFontArrus, 26, pY, 0, pTmpBuf.data(), 0, 0, 0); - v10 += LOBYTE(pFontArrus->uFontHeight) - 2; - v19 = player->GetBaseWillpower(); - v20 = player->GetActualWillpower(); - v21 = UI_GetHealthManaStringColor(v20, v19); - sprintf(pTmpBuf.data(), "%s\f%05u\r424%d\f00000 /\t185%d\n", pGlobalTXT_LocalizationStrings[163], v21, v20, v19);// - pGUIWindow_CurrentMenu->DrawText(pFontArrus, 26, v10, 0, pTmpBuf.data(), 0, 0, 0); + pY += LOBYTE(pFontArrus->uFontHeight) - 2; + sprintf(pTmpBuf.data(), "%s\f%05u\r424%d\f00000 /\t185%d\n", pGlobalTXT_LocalizationStrings[163], + UI_GetHealthManaStringColor(player->GetActualWillpower(), player->GetBaseWillpower()), + player->GetActualWillpower(), player->GetBaseWillpower());// + pGUIWindow_CurrentMenu->DrawText(pFontArrus, 26, pY, 0, pTmpBuf.data(), 0, 0, 0); - v10 += LOBYTE(pFontArrus->uFontHeight) - 2; - v25 = player->GetBaseEndurance(); - v26 = player->GetActualEndurance(); - v27 = UI_GetHealthManaStringColor(v26, v25); - sprintf(pTmpBuf.data(), "%s\f%05u\r424%d\f00000 /\t185%d\n", pGlobalTXT_LocalizationStrings[75], v27, v26, v25);// - pGUIWindow_CurrentMenu->DrawText(pFontArrus, 26, v10, 0, pTmpBuf.data(), 0, 0, 0); + pY += LOBYTE(pFontArrus->uFontHeight) - 2; + sprintf(pTmpBuf.data(), "%s\f%05u\r424%d\f00000 /\t185%d\n", pGlobalTXT_LocalizationStrings[75], + UI_GetHealthManaStringColor(player->GetActualEndurance(), player->GetBaseEndurance()), + player->GetActualEndurance(), player->GetBaseEndurance());// + pGUIWindow_CurrentMenu->DrawText(pFontArrus, 26, pY, 0, pTmpBuf.data(), 0, 0, 0); + + pY += LOBYTE(pFontArrus->uFontHeight) - 2; + sprintf(pTmpBuf.data(), "%s\f%05u\r424%d\f00000 /\t185%d\n", pGlobalTXT_LocalizationStrings[1], + UI_GetHealthManaStringColor(player->GetActualAccuracy(), player->GetBaseAccuracy()), + player->GetActualAccuracy(), player->GetBaseAccuracy()); + pGUIWindow_CurrentMenu->DrawText(pFontArrus, 26, pY, 0, pTmpBuf.data(), 0, 0, 0); - v10 += LOBYTE(pFontArrus->uFontHeight) - 2; - v31 = player->GetBaseAccuracy(); - v32 = player->GetActualAccuracy(); - v33 = UI_GetHealthManaStringColor(v32, v31); - sprintf(pTmpBuf.data(), "%s\f%05u\r424%d\f00000 /\t185%d\n", pGlobalTXT_LocalizationStrings[1], v33, v32, v31); - pGUIWindow_CurrentMenu->DrawText(pFontArrus, 26, v10, 0, pTmpBuf.data(), 0, 0, 0); + pY += LOBYTE(pFontArrus->uFontHeight) - 2; + sprintf(pTmpBuf.data(), "%s\f%05u\r424%d\f00000 /\t185%d\n", pGlobalTXT_LocalizationStrings[211], + UI_GetHealthManaStringColor(player->GetActualSpeed(), player->GetBaseSpeed()), + player->GetActualSpeed(), player->GetBaseSpeed()); + pGUIWindow_CurrentMenu->DrawText(pFontArrus, 26, pY, 0, pTmpBuf.data(), 0, 0, 0); - v10 += LOBYTE(pFontArrus->uFontHeight) - 2; - v37 = player->GetBaseSpeed(); - v38 = player->GetActualSpeed(); - v39 = UI_GetHealthManaStringColor(v38, v37); - sprintf(pTmpBuf.data(), "%s\f%05u\r424%d\f00000 /\t185%d\n", pGlobalTXT_LocalizationStrings[211], v39, v38, v37); - pGUIWindow_CurrentMenu->DrawText(pFontArrus, 26, v10, 0, pTmpBuf.data(), 0, 0, 0); + pY += LOBYTE(pFontArrus->uFontHeight) - 2; + sprintf(pTmpBuf.data(), "%s\f%05u\r424%d\f00000 /\t185%d\n\n", pGlobalTXT_LocalizationStrings[136], + UI_GetHealthManaStringColor(player->GetActualLuck(), player->GetBaseLuck()), + player->GetActualLuck(), player->GetBaseLuck()); + pGUIWindow_CurrentMenu->DrawText(pFontArrus, 26, pY, 0, pTmpBuf.data(), 0, 0, 0); - v10 += LOBYTE(pFontArrus->uFontHeight) - 2; - v43 = player->GetBaseLuck(); - v44 = player->GetActualLuck(); - v45 = UI_GetHealthManaStringColor(v44, v43); - sprintf(pTmpBuf.data(), "%s\f%05u\r424%d\f00000 /\t185%d\n\n", pGlobalTXT_LocalizationStrings[136], v45, v44, v43); - pGUIWindow_CurrentMenu->DrawText(pFontArrus, 26, v10, 0, pTmpBuf.data(), 0, 0, 0); + a2 = "%s\f%05u\r424%d\f00000 /\t185%d\n"; + if ( player->GetMaxHealth() >= 1000 ) + a2 = "%s\f%05u\r388%d\f00000 / %d\n"; + pY += 2 * LOBYTE(pFontArrus->uFontHeight) + 5; + sprintf(pTmpBuf.data(), a2, pGlobalTXT_LocalizationStrings[108], + UI_GetHealthManaStringColor(player->sHealth, player->GetMaxHealth()), + player->sHealth, player->GetMaxHealth()); + pGUIWindow_CurrentMenu->DrawText(pFontArrus, 26, pY, 0, pTmpBuf.data(), 0, 0, 0); - a2 = "%s\f%05u\r424%d\f00000 /\t185%d\n"; - v10 += 2 * LOBYTE(pFontArrus->uFontHeight) + 5; - if ( player->GetMaxHealth() >= 1000 ) - a2 = "%s\f%05u\r388%d\f00000 / %d\n"; - v49 = player->GetMaxHealth(); - v50 = UI_GetHealthManaStringColor(player->sHealth, v49); - sprintf(pTmpBuf.data(), a2, pGlobalTXT_LocalizationStrings[108], v50, player->sHealth, v49); - pGUIWindow_CurrentMenu->DrawText(pFontArrus, 26, v10, 0, pTmpBuf.data(), 0, 0, 0); - - a2a = "%s\f%05u\r424%d\f00000 /\t185%d\n"; - v10 += LOBYTE(pFontArrus->uFontHeight) - 2; - if ( player->GetMaxMana() >= 1000 ) - a2a = "%s\f%05u\r388%d\f00000 / %d\n"; - v53 = player->GetMaxMana(); - v54 = UI_GetHealthManaStringColor(player->sMana, v53); - sprintf(pTmpBuf.data(), a2a, pGlobalTXT_LocalizationStrings[212], v54, player->sMana, v53); - pGUIWindow_CurrentMenu->DrawText(pFontArrus, 26, v10, 0, pTmpBuf.data(), 0, 0, 0); + a2 = "%s\f%05u\r424%d\f00000 /\t185%d\n"; + if ( player->GetMaxMana() >= 1000 ) + a2 = "%s\f%05u\r388%d\f00000 / %d\n"; + pY += LOBYTE(pFontArrus->uFontHeight) - 2; + sprintf(pTmpBuf.data(), a2, pGlobalTXT_LocalizationStrings[212], + UI_GetHealthManaStringColor(player->sMana, player->GetMaxMana()), + player->sMana, player->GetMaxMana()); + pGUIWindow_CurrentMenu->DrawText(pFontArrus, 26, pY, 0, pTmpBuf.data(), 0, 0, 0); - v10 += LOBYTE(pFontArrus->uFontHeight) - 2; - v58 = player->GetBaseAC(); - v59 = player->GetActualAC(); - v60 = UI_GetHealthManaStringColor(v59, v58); - sprintf(pTmpBuf.data(), "%s\f%05u\r424%d\f00000 /\t185%d\n\n", pGlobalTXT_LocalizationStrings[12], v60, v59, v58); - pGUIWindow_CurrentMenu->DrawText(pFontArrus, 26, v10, 0, pTmpBuf.data(), 0, 0, 0); + pY += LOBYTE(pFontArrus->uFontHeight) - 2; + sprintf(pTmpBuf.data(), "%s\f%05u\r424%d\f00000 /\t185%d\n\n", pGlobalTXT_LocalizationStrings[12], + UI_GetHealthManaStringColor(player->GetActualAC(), player->GetBaseAC()), + player->GetActualAC(), player->GetBaseAC()); + pGUIWindow_CurrentMenu->DrawText(pFontArrus, 26, pY, 0, pTmpBuf.data(), 0, 0, 0); - v10 += 2 * LOBYTE(pFontArrus->uFontHeight) - 2; - v62 = player->GetMajorConditionIdx(); - v64 = GetConditionDrawColor(v62); - sprintf(pTmpBuf.data(), "%s: \f%05d%s\n", pGlobalTXT_LocalizationStrings[47], v64, aCharacterConditionNames[v62]); - pGUIWindow_CurrentMenu->DrawTextInRect(pFontArrus, 0x1Au, v10, 0, pTmpBuf.data(), 226, 0); + pY += 2 * LOBYTE(pFontArrus->uFontHeight) - 2; + sprintf(pTmpBuf.data(), "%s: \f%05d%s\n", pGlobalTXT_LocalizationStrings[47], GetConditionDrawColor(player->GetMajorConditionIdx()), + aCharacterConditionNames[player->GetMajorConditionIdx()]);//Состояние + pGUIWindow_CurrentMenu->DrawTextInRect(pFontArrus, 26, pY, 0, pTmpBuf.data(), 226, 0); - v10 += LOBYTE(pFontArrus->uFontHeight) + - 1; - if (player->uQuickSpell) - v67 = pSpellStats->pInfos[player->uQuickSpell].pShortName; - else - v67 = pGlobalTXT_LocalizationStrings[153]; - sprintf(pTmpBuf.data(), "%s: %s", pGlobalTXT_LocalizationStrings[172], v67); - pGUIWindow_CurrentMenu->DrawTextInRect(pFontArrus, 0x1Au, v10, 0, pTmpBuf.data(), 226, 0); + pY += LOBYTE(pFontArrus->uFontHeight) + - 1; + pText = pGlobalTXT_LocalizationStrings[153];//Нет + if (player->uQuickSpell) + pText = pSpellStats->pInfos[player->uQuickSpell].pShortName; + sprintf(pTmpBuf.data(), "%s: %s", pGlobalTXT_LocalizationStrings[172], pText);//Б. применение + pGUIWindow_CurrentMenu->DrawTextInRect(pFontArrus, 26, pY, 0, pTmpBuf.data(), 226, 0); - v10 = 50; - v70 = player->GetBaseAge(); - v71 = player->GetActualAge(); - v72 = UI_GetHealthManaStringColor(v71, v70); - sprintf(pTmpBuf.data(), "%s\f%05u\t100%d\f00000 / %d\n", pGlobalTXT_LocalizationStrings[5], v72, v71, v70); - pGUIWindow_CurrentMenu->DrawText(pFontArrus, 266, v10, 0, pTmpBuf.data(), 0, 0, 0); + //Second column (Вторая колонка) + pY = 50; + sprintf(pTmpBuf.data(), "%s\f%05u\t100%d\f00000 / %d\n", pGlobalTXT_LocalizationStrings[5], + UI_GetHealthManaStringColor(player->GetActualAge(), player->GetBaseAge()), + player->GetActualAge(), player->GetBaseAge()); + pGUIWindow_CurrentMenu->DrawText(pFontArrus, 266, pY, 0, pTmpBuf.data(), 0, 0, 0); - a2b = "%s\f%05u\t100%d\f00000 / %d\n"; - v10 += LOBYTE(pFontArrus->uFontHeight) - 2; - if ( player->GetBaseLevel() > 99 ) - a2b = "%s\f%05u\t180%d\f00000 / %d\n"; - v75 = player->GetBaseLevel(); - v76 = player->GetActualLevel(); - v77 = UI_GetHealthManaStringColor(v76, v75); - sprintf(pTmpBuf.data(), a2b, pGlobalTXT_LocalizationStrings[131], v77, v76, v75); - pGUIWindow_CurrentMenu->DrawText(pFontArrus, 266, v10, 0, pTmpBuf.data(), 0, 0, 0); + a2 = "%s\f%05u\t100%d\f00000 / %d\n"; + if ( player->GetBaseLevel() > 99 ) + a2 = "%s\f%05u\t180%d\f00000 / %d\n"; + pY += LOBYTE(pFontArrus->uFontHeight) - 2; + sprintf(pTmpBuf.data(), a2, pGlobalTXT_LocalizationStrings[131],//Уров. + UI_GetHealthManaStringColor(player->GetActualLevel(), player->GetBaseLevel()), + player->GetActualLevel(), player->GetBaseLevel()); + pGUIWindow_CurrentMenu->DrawText(pFontArrus, 266, pY, 0, pTmpBuf.data(), 0, 0, 0); - v10 += LOBYTE(pFontArrus->uFontHeight) - 2; - if (player->uExperience <= 9999999) - v78 = pGlobalTXT_LocalizationStrings[83]; // "Experience" - else - v78 = pGlobalTXT_LocalizationStrings[17]; // "Exp." - v81 = player->GetExperienceDisplayColor(); - sprintf(pTmpBuf.data(), "%s\r180\f%05d%lu\f00000\n\n", v78, v81, LODWORD(player->uExperience)); - pGUIWindow_CurrentMenu->DrawText(pFontArrus, 266, v10, 0, pTmpBuf.data(), 0, 0, 0); + pY += LOBYTE(pFontArrus->uFontHeight) - 2; + pText = pGlobalTXT_LocalizationStrings[17]; // "Exp." + if (player->uExperience <= 9999999) + pText = pGlobalTXT_LocalizationStrings[83]; // "Experience" + sprintf(pTmpBuf.data(), "%s\r180\f%05d%lu\f00000\n\n", pText, player->GetExperienceDisplayColor(), LODWORD(player->uExperience)); + pGUIWindow_CurrentMenu->DrawText(pFontArrus, 266, pY, 0, pTmpBuf.data(), 0, 0, 0); - v10 += 2 * LOBYTE(pFontArrus->uFontHeight); - v83 = player->GetActualAttack(0); - sprintf(pTmpBuf.data(), "%s\t100%+d\n", pGlobalTXT_LocalizationStrings[18], v83); - pGUIWindow_CurrentMenu->DrawText(pFontArrus, 266, v10, 0, pTmpBuf.data(), 0, 0, 0); + pY += 2 * LOBYTE(pFontArrus->uFontHeight); + sprintf(pTmpBuf.data(), "%s\t100%+d\n", pGlobalTXT_LocalizationStrings[18], player->GetActualAttack(0)); + pGUIWindow_CurrentMenu->DrawText(pFontArrus, 266, pY, 0, pTmpBuf.data(), 0, 0, 0); - v10 += LOBYTE(pFontArrus->uFontHeight) - 2; - v85 = player->GetMeleeDamageString(); - sprintf(pTmpBuf.data(), "%s\t100 %s\n", pGlobalTXT_LocalizationStrings[53], v85); - pGUIWindow_CurrentMenu->DrawText(pFontArrus, 266, v10, 0, pTmpBuf.data(), 0, 0, 0); + pY += LOBYTE(pFontArrus->uFontHeight) - 2; + sprintf(pTmpBuf.data(), "%s\t100 %s\n", pGlobalTXT_LocalizationStrings[53], player->GetMeleeDamageString()); + pGUIWindow_CurrentMenu->DrawText(pFontArrus, 266, pY, 0, pTmpBuf.data(), 0, 0, 0); - v10 += LOBYTE(pFontArrus->uFontHeight) - 2; - v87 = player->GetRangedAttack(); - sprintf(pTmpBuf.data(), "%s\t100%+d\n", pGlobalTXT_LocalizationStrings[203], v87); - pGUIWindow_CurrentMenu->DrawText(pFontArrus, 266, v10, 0, pTmpBuf.data(), 0, 0, 0); + pY += LOBYTE(pFontArrus->uFontHeight) - 2; + sprintf(pTmpBuf.data(), "%s\t100%+d\n", pGlobalTXT_LocalizationStrings[203], player->GetRangedAttack()); + pGUIWindow_CurrentMenu->DrawText(pFontArrus, 266, pY, 0, pTmpBuf.data(), 0, 0, 0); - v10 += LOBYTE(pFontArrus->uFontHeight) - 2; - v89 = player->GetRangedDamageString(); - sprintf(pTmpBuf.data(), "%s\t100 %s\n\n", pGlobalTXT_LocalizationStrings[53], v89); - pGUIWindow_CurrentMenu->DrawText(pFontArrus, 266, v10, 0, pTmpBuf.data(), 0, 0, 0); + pY += LOBYTE(pFontArrus->uFontHeight) - 2; + sprintf(pTmpBuf.data(), "%s\t100 %s\n\n", pGlobalTXT_LocalizationStrings[53], player->GetRangedDamageString()); + pGUIWindow_CurrentMenu->DrawText(pFontArrus, 266, pY, 0, pTmpBuf.data(), 0, 0, 0); - a2c = format_4E2E10; - v10 += 2 * LOBYTE(pFontArrus->uFontHeight) - 4; - v131 = player->GetActualResistance(CHARACTER_ATTRIBUTE_RESIST_FIRE); - v90 = player->GetBaseResistance(CHARACTER_ATTRIBUTE_RESIST_FIRE); - if ( v131 > 99 || v90 > 99 ) - a2c = "%s\f%05u\t180%d\f00000 / %d\n"; - v92 = UI_GetHealthManaStringColor(v131, v90); - sprintf(pTmpBuf.data(), a2c, pGlobalTXT_LocalizationStrings[87], v92, v131, v90); - pGUIWindow_CurrentMenu->DrawText(pFontArrus, 266, v10, 0, pTmpBuf.data(), 0, 0, 0); + a2 = format_4E2E10; + if ( player->GetActualResistance(CHARACTER_ATTRIBUTE_RESIST_FIRE) > 99 || player->GetBaseResistance(CHARACTER_ATTRIBUTE_RESIST_FIRE) > 99 ) + a2 = "%s\f%05u\t180%d\f00000 / %d\n"; + pY += 2 * LOBYTE(pFontArrus->uFontHeight) - 4; + sprintf(pTmpBuf.data(), a2, pGlobalTXT_LocalizationStrings[87], + UI_GetHealthManaStringColor(player->GetActualResistance(CHARACTER_ATTRIBUTE_RESIST_FIRE), player->GetBaseResistance(CHARACTER_ATTRIBUTE_RESIST_FIRE)), + player->GetActualResistance(CHARACTER_ATTRIBUTE_RESIST_FIRE), player->GetBaseResistance(CHARACTER_ATTRIBUTE_RESIST_FIRE)); + pGUIWindow_CurrentMenu->DrawText(pFontArrus, 266, pY, 0, pTmpBuf.data(), 0, 0, 0); - a2d = format_4E2E10; - v10 += LOBYTE(pFontArrus->uFontHeight) - 2; - v132 = player->GetActualResistance(CHARACTER_ATTRIBUTE_RESIST_AIR); - v93 = player->GetBaseResistance(CHARACTER_ATTRIBUTE_RESIST_AIR); - if ( v132 > 99 || v93 > 99 ) - a2d = "%s\f%05u\t180%d\f00000 / %d\n"; - v95 = UI_GetHealthManaStringColor(v132, v93); - sprintf(pTmpBuf.data(), a2d, pGlobalTXT_LocalizationStrings[6], v95, v132, v93); - pGUIWindow_CurrentMenu->DrawText(pFontArrus, 266, v10, 0, pTmpBuf.data(), 0, 0, 0); + a2 = format_4E2E10; + if ( player->GetActualResistance(CHARACTER_ATTRIBUTE_RESIST_AIR) > 99 || player->GetBaseResistance(CHARACTER_ATTRIBUTE_RESIST_AIR) > 99 ) + a2 = "%s\f%05u\t180%d\f00000 / %d\n"; + pY += LOBYTE(pFontArrus->uFontHeight) - 2; + sprintf(pTmpBuf.data(), a2, pGlobalTXT_LocalizationStrings[6], + UI_GetHealthManaStringColor(player->GetActualResistance(CHARACTER_ATTRIBUTE_RESIST_AIR), player->GetBaseResistance(CHARACTER_ATTRIBUTE_RESIST_AIR)), + player->GetActualResistance(CHARACTER_ATTRIBUTE_RESIST_AIR), player->GetBaseResistance(CHARACTER_ATTRIBUTE_RESIST_AIR)); + pGUIWindow_CurrentMenu->DrawText(pFontArrus, 266, pY, 0, pTmpBuf.data(), 0, 0, 0); - a2e = format_4E2E10; - v10 += LOBYTE(pFontArrus->uFontHeight) - 2; - v133 = player->GetActualResistance(CHARACTER_ATTRIBUTE_RESIST_WATER); - v96 = player->GetBaseResistance(CHARACTER_ATTRIBUTE_RESIST_WATER); - if ( v133 > 99 || v96 > 99 ) - a2e = "%s\f%05u\t180%d\f00000 / %d\n"; - v98 = UI_GetHealthManaStringColor(v133, v96); - sprintf(pTmpBuf.data(), a2e, pGlobalTXT_LocalizationStrings[240], v98, v133, v96); - pGUIWindow_CurrentMenu->DrawText(pFontArrus, 266, v10, 0, pTmpBuf.data(), 0, 0, 0); - - a2f = format_4E2E10; - v10 += LOBYTE(pFontArrus->uFontHeight) - 2; - v134 = player->GetActualResistance(CHARACTER_ATTRIBUTE_RESIST_EARTH); - v99 = player->GetBaseResistance(CHARACTER_ATTRIBUTE_RESIST_EARTH); - if ( v134 > 99 ) - a2f = "%s\f%05u\t180%d\f00000 / %d\n"; - v101 = UI_GetHealthManaStringColor(v134, v99); - sprintf(pTmpBuf.data(), a2f, pGlobalTXT_LocalizationStrings[70], v101, v134, v99); - pGUIWindow_CurrentMenu->DrawText(pFontArrus, 266, v10, 0, pTmpBuf.data(), 0, 0, 0); + a2 = format_4E2E10; + if ( player->GetActualResistance(CHARACTER_ATTRIBUTE_RESIST_WATER) > 99 || player->GetBaseResistance(CHARACTER_ATTRIBUTE_RESIST_WATER) > 99 ) + a2 = "%s\f%05u\t180%d\f00000 / %d\n"; + pY += LOBYTE(pFontArrus->uFontHeight) - 2; + sprintf(pTmpBuf.data(), a2, pGlobalTXT_LocalizationStrings[240], + UI_GetHealthManaStringColor(player->GetActualResistance(CHARACTER_ATTRIBUTE_RESIST_WATER), player->GetBaseResistance(CHARACTER_ATTRIBUTE_RESIST_WATER)), + player->GetActualResistance(CHARACTER_ATTRIBUTE_RESIST_WATER), player->GetBaseResistance(CHARACTER_ATTRIBUTE_RESIST_WATER)); + pGUIWindow_CurrentMenu->DrawText(pFontArrus, 266, pY, 0, pTmpBuf.data(), 0, 0, 0); - a2g = format_4E2E10; - v10 += LOBYTE(pFontArrus->uFontHeight) - 2; - v135 = player->GetActualResistance(CHARACTER_ATTRIBUTE_RESIST_MIND); - v102 = player->GetBaseResistance(CHARACTER_ATTRIBUTE_RESIST_MIND); - if ( v135 > 99 || v102 > 99 ) - a2g = "%s\f%05u\t180%d\f00000 / %d\n"; - v104 = UI_GetHealthManaStringColor(v135, v102); - sprintf(pTmpBuf.data(), a2g, pGlobalTXT_LocalizationStrings[142], v104, v135, v102); - if ( player->classType == PLAYER_CLASS_LICH && v102 == 200 ) - { - v106 = UI_GetHealthManaStringColor(v135, 200); - sprintf(pTmpBuf.data(), format_4E2E00, pGlobalTXT_LocalizationStrings[142], v106, pGlobalTXT_LocalizationStrings[625]); - } - pGUIWindow_CurrentMenu->DrawText(pFontArrus, 266, v10, 0, pTmpBuf.data(), 0, 0, 0); + a2 = format_4E2E10; + if ( player->GetActualResistance(CHARACTER_ATTRIBUTE_RESIST_EARTH) > 99 ) + a2 = "%s\f%05u\t180%d\f00000 / %d\n"; + pY += LOBYTE(pFontArrus->uFontHeight) - 2; + sprintf(pTmpBuf.data(), a2, pGlobalTXT_LocalizationStrings[70], + UI_GetHealthManaStringColor(player->GetActualResistance(CHARACTER_ATTRIBUTE_RESIST_EARTH), player->GetBaseResistance(CHARACTER_ATTRIBUTE_RESIST_EARTH)), + player->GetActualResistance(CHARACTER_ATTRIBUTE_RESIST_EARTH), player->GetBaseResistance(CHARACTER_ATTRIBUTE_RESIST_EARTH)); + pGUIWindow_CurrentMenu->DrawText(pFontArrus, 266, pY, 0, pTmpBuf.data(), 0, 0, 0); - a2h = format_4E2E10; - v10 += LOBYTE(pFontArrus->uFontHeight) - 2; - v136 = player->GetActualResistance(CHARACTER_ATTRIBUTE_RESIST_BODY); - v107 = player->GetBaseResistance(CHARACTER_ATTRIBUTE_RESIST_BODY); - if ( v136 > 99 || v107 > 99 ) - a2h = "%s\f%05u\t180%d\f00000 / %d\n"; - v109 = UI_GetHealthManaStringColor(v136, v107); - sprintf(pTmpBuf.data(), a2h, pGlobalTXT_LocalizationStrings[29], v109, v136, v107); - if ( player->classType == PLAYER_CLASS_LICH && v107 == 200 ) - { - v111 = UI_GetHealthManaStringColor(v136, 200); - sprintf(pTmpBuf.data(), format_4E2E00, pGlobalTXT_LocalizationStrings[29], v111, pGlobalTXT_LocalizationStrings[625]); - } - pGUIWindow_CurrentMenu->DrawText(pFontArrus, 266, v10, 0, pTmpBuf.data(), 0, 0, 0); + a2 = format_4E2E10; + if ( player->GetActualResistance(CHARACTER_ATTRIBUTE_RESIST_MIND) > 99 || player->GetBaseResistance(CHARACTER_ATTRIBUTE_RESIST_MIND) > 99 ) + a2 = "%s\f%05u\t180%d\f00000 / %d\n"; + pY += LOBYTE(pFontArrus->uFontHeight) - 2; + sprintf(pTmpBuf.data(), a2, pGlobalTXT_LocalizationStrings[142], + UI_GetHealthManaStringColor(player->GetActualResistance(CHARACTER_ATTRIBUTE_RESIST_MIND), player->GetBaseResistance(CHARACTER_ATTRIBUTE_RESIST_MIND)), + player->GetActualResistance(CHARACTER_ATTRIBUTE_RESIST_MIND), player->GetBaseResistance(CHARACTER_ATTRIBUTE_RESIST_MIND)); + if ( player->classType == PLAYER_CLASS_LICH && player->GetBaseResistance(CHARACTER_ATTRIBUTE_RESIST_MIND) == 200 ) + sprintf(pTmpBuf.data(), format_4E2E00, pGlobalTXT_LocalizationStrings[142], + UI_GetHealthManaStringColor(player->GetActualResistance(CHARACTER_ATTRIBUTE_RESIST_MIND), 200), pGlobalTXT_LocalizationStrings[625]); + pGUIWindow_CurrentMenu->DrawText(pFontArrus, 266, pY, 0, pTmpBuf.data(), 0, 0, 0); + + a2 = format_4E2E10; + if ( player->GetActualResistance(CHARACTER_ATTRIBUTE_RESIST_BODY) > 99 || player->GetBaseResistance(CHARACTER_ATTRIBUTE_RESIST_BODY) > 99 ) + a2 = "%s\f%05u\t180%d\f00000 / %d\n"; + pY += LOBYTE(pFontArrus->uFontHeight) - 2; + sprintf(pTmpBuf.data(), a2, pGlobalTXT_LocalizationStrings[29], + UI_GetHealthManaStringColor(player->GetActualResistance(CHARACTER_ATTRIBUTE_RESIST_BODY), player->GetBaseResistance(CHARACTER_ATTRIBUTE_RESIST_BODY)), + player->GetActualResistance(CHARACTER_ATTRIBUTE_RESIST_BODY), player->GetBaseResistance(CHARACTER_ATTRIBUTE_RESIST_BODY)); + if ( player->classType == PLAYER_CLASS_LICH && player->GetBaseResistance(CHARACTER_ATTRIBUTE_RESIST_BODY) == 200 ) + sprintf(pTmpBuf.data(), format_4E2E00, pGlobalTXT_LocalizationStrings[29], + UI_GetHealthManaStringColor(player->GetActualResistance(CHARACTER_ATTRIBUTE_RESIST_BODY), 200), pGlobalTXT_LocalizationStrings[625]); + pGUIWindow_CurrentMenu->DrawText(pFontArrus, 266, pY, 0, pTmpBuf.data(), 0, 0, 0); } -bool awardSort (int i,int j) { - if (pAwards[i].uPriority == 0) //none - { - return false; - } - else if (pAwards[j].uPriority == 0) - { - return true; - } - else if(pAwards[i].uPriority == 1) //fines,arena stuff,etc - { - return false; - } - else if(pAwards[j].uPriority == 1) - { - return true; - } - else if(pAwards[i].uPriority == 5) //joined guilds - { - return false; - } - else if(pAwards[j].uPriority == 5) - { - return true; - } - else - { - return (pAwards[i].uPriority<pAwards[j].uPriority); - } +bool awardSort (int i, int j) +{ + if (pAwards[i].uPriority == 0) //none + return false; + else if (pAwards[j].uPriority == 0) + return true; + else if(pAwards[i].uPriority == 1) //fines,arena stuff,etc + return false; + else if(pAwards[j].uPriority == 1) + return true; + else if(pAwards[i].uPriority == 5) //joined guilds + return false; + else if(pAwards[j].uPriority == 5) + return true; + else + return (pAwards[i].uPriority < pAwards[j].uPriority); } //----- (00419100) -------------------------------------------------------- void FillAwardsData() { - Player* pPlayer = pPlayers[uActiveCharacter]; + Player* pPlayer = pPlayers[uActiveCharacter]; - memset(achieved_awards.data(), 0, 4000); - num_achieved_awards = 0; + memset(achieved_awards.data(), 0, 4000); + num_achieved_awards = 0; - memset(pTmpBuf2.data(), 0, 0x7D0u); - BtnDown_flag = 0; - BtnUp_flag = 0; - books_page_number = 0; - books_primary_item_per_page = 0; - for (int i = 1; i < 105; ++i) - { - if ( _449B57_test_bit(pPlayer->_achieved_awards_bits, i) && pAwards[i].pText ) - { - achieved_awards[num_achieved_awards++] = (AwardType)i; - } - } - full_num_items_in_book = num_achieved_awards; - num_achieved_awards = 0; + memset(pTmpBuf2.data(), 0, 0x7D0u); + BtnDown_flag = 0; + BtnUp_flag = 0; + books_page_number = 0; + books_primary_item_per_page = 0; + for ( int i = 1; i < 105; ++i ) + { + if ( _449B57_test_bit(pPlayer->_achieved_awards_bits, i) && pAwards[i].pText ) + achieved_awards[num_achieved_awards++] = (AwardType)i; + } + full_num_items_in_book = num_achieved_awards; + num_achieved_awards = 0; - //sort awards index + //sort awards index - if (full_num_items_in_book>0) + if (full_num_items_in_book>0) + { + for (int i = 0; i< full_num_items_in_book; ++i) + achieved_awards[full_num_items_in_book+i] = (AwardType)(rand()%16); + for (int i = 1; i< full_num_items_in_book; ++i) + { + for (int j = i; j< full_num_items_in_book; ++j) + { + AwardType tmp; + if (pAwards[achieved_awards[j]].uPriority < pAwards[achieved_awards[i]].uPriority) { - for (int i = 0; i< full_num_items_in_book; ++i) - achieved_awards[full_num_items_in_book+i] = (AwardType)(rand()%16); - for (int i = 1; i< full_num_items_in_book; ++i) - { - for (int j = i; j< full_num_items_in_book; ++j) - { - AwardType tmp; - if (pAwards[achieved_awards[j]].uPriority < pAwards[achieved_awards[i]].uPriority) - { - tmp= achieved_awards[j]; - achieved_awards[j] = achieved_awards[i]; - achieved_awards[i] = tmp; - } - } - } + tmp= achieved_awards[j]; + achieved_awards[j] = achieved_awards[i]; + achieved_awards[i] = tmp; } - + } + } + } // if (full_num_items_in_book > 0) /* { std::stable_sort(achieved_awards.begin(), achieved_awards.end(), awardSort); }*/ - } - +} //----- (0043EF2B) -------------------------------------------------------- void WetsuitOn( unsigned int uPlayerID ) - { - CHARACTER_RACE player_race; // edi@2 - signed int player_sex; // eax@2 - int texture_num; // ecx@5 - char pContainer[20]; // [sp+4h] [bp-1Ch]@7 - - if ( uPlayerID> 0 ) - { - player_race = pPlayers[uPlayerID]->GetRace(); - player_sex = pPlayers[uPlayerID]->GetSexByVoice(); - if ( player_race == CHARACTER_RACE_DWARF ) - texture_num = (player_sex != 0) + 3; - else - texture_num = (player_sex != 0) + 1; - wsprintfA(pContainer, "pc23v%dBod", texture_num); - papredoll_dbods[uPlayerID - 1] = pIcons_LOD->LoadTexture(pContainer, TEXTURE_16BIT_PALETTE); - wsprintfA(pContainer, "pc23v%dlad", texture_num); - papredoll_dlads[uPlayerID - 1] = pIcons_LOD->LoadTexture(pContainer, TEXTURE_16BIT_PALETTE); - wsprintfA(pContainer, "pc23v%dlau", texture_num); - papredoll_dlaus[uPlayerID - 1] = pIcons_LOD->LoadTexture(pContainer, TEXTURE_16BIT_PALETTE); - wsprintfA(pContainer, "pc23v%drh", texture_num); - papredoll_drhs[uPlayerID - 1] = pIcons_LOD->LoadTexture(pContainer, TEXTURE_16BIT_PALETTE); - wsprintfA(pContainer, "pc23v%dlh", texture_num); - papredoll_dlhs[uPlayerID - 1] = pIcons_LOD->LoadTexture(pContainer, TEXTURE_16BIT_PALETTE); - wsprintfA(pContainer, "pc23v%dlhu", texture_num); - papredoll_dlhus[uPlayerID - 1] = pIcons_LOD->LoadTexture(pContainer, TEXTURE_16BIT_PALETTE); +{ + CHARACTER_RACE player_race; // edi@2 + signed int player_sex; // eax@2 + int texture_num; // ecx@5 + char pContainer[20]; // [sp+4h] [bp-1Ch]@7 - if ( pPlayers[uPlayerID]->uCurrentFace == 12 || pPlayers[uPlayerID]->uCurrentFace == 13 ) - papredoll_dbrds[pPlayers[uPlayerID]->uCurrentFace] = 0; + if ( uPlayerID> 0 ) + { + player_race = pPlayers[uPlayerID]->GetRace(); + player_sex = pPlayers[uPlayerID]->GetSexByVoice(); + if ( player_race == CHARACTER_RACE_DWARF ) + texture_num = (player_sex != 0) + 3; + else + texture_num = (player_sex != 0) + 1; + wsprintfA(pContainer, "pc23v%dBod", texture_num); + papredoll_dbods[uPlayerID - 1] = pIcons_LOD->LoadTexture(pContainer, TEXTURE_16BIT_PALETTE); + wsprintfA(pContainer, "pc23v%dlad", texture_num); + papredoll_dlads[uPlayerID - 1] = pIcons_LOD->LoadTexture(pContainer, TEXTURE_16BIT_PALETTE); + wsprintfA(pContainer, "pc23v%dlau", texture_num); + papredoll_dlaus[uPlayerID - 1] = pIcons_LOD->LoadTexture(pContainer, TEXTURE_16BIT_PALETTE); + wsprintfA(pContainer, "pc23v%drh", texture_num); + papredoll_drhs[uPlayerID - 1] = pIcons_LOD->LoadTexture(pContainer, TEXTURE_16BIT_PALETTE); + wsprintfA(pContainer, "pc23v%dlh", texture_num); + papredoll_dlhs[uPlayerID - 1] = pIcons_LOD->LoadTexture(pContainer, TEXTURE_16BIT_PALETTE); + wsprintfA(pContainer, "pc23v%dlhu", texture_num); + papredoll_dlhus[uPlayerID - 1] = pIcons_LOD->LoadTexture(pContainer, TEXTURE_16BIT_PALETTE); - papredoll_flying_feet[pPlayers[uPlayerID]->uCurrentFace] = 0; - IsPlayerWearingWatersuit[uPlayerID] = 1; - } - } + if ( pPlayers[uPlayerID]->uCurrentFace == 12 || pPlayers[uPlayerID]->uCurrentFace == 13 ) + papredoll_dbrds[pPlayers[uPlayerID]->uCurrentFace] = 0; + papredoll_flying_feet[pPlayers[uPlayerID]->uCurrentFace] = 0; + IsPlayerWearingWatersuit[uPlayerID] = 1; + } +} //----- (0043F0BD) -------------------------------------------------------- void WetsuitOff( unsigned int uPlayerID ) - { - char pContainer[20]; // [sp+0h] [bp-18h]@4 +{ + char pContainer[20]; // [sp+0h] [bp-18h]@4 + + if (uPlayerID > 0 ) + { + papredoll_dbods[uPlayerID - 1] = pIcons_LOD->LoadTexture(dbod_texnames_by_face[pPlayers[uPlayerID]->uCurrentFace], TEXTURE_16BIT_PALETTE); + papredoll_dlads[uPlayerID - 1] = pIcons_LOD->LoadTexture(dlad_texnames_by_face[pPlayers[uPlayerID]->uCurrentFace], TEXTURE_16BIT_PALETTE); + papredoll_dlaus[uPlayerID - 1] = pIcons_LOD->LoadTexture(dlau_texnames_by_face[pPlayers[uPlayerID]->uCurrentFace], TEXTURE_16BIT_PALETTE); + papredoll_drhs [uPlayerID - 1] = pIcons_LOD->LoadTexture(drh_texnames_by_face [pPlayers[uPlayerID]->uCurrentFace], TEXTURE_16BIT_PALETTE); + papredoll_dlhs [uPlayerID - 1] = pIcons_LOD->LoadTexture(dlh_texnames_by_face [pPlayers[uPlayerID]->uCurrentFace], TEXTURE_16BIT_PALETTE); + papredoll_dlhus[uPlayerID - 1] = pIcons_LOD->LoadTexture(dlhu_texnames_by_face[pPlayers[uPlayerID]->uCurrentFace], TEXTURE_16BIT_PALETTE); - if (uPlayerID > 0 ) - { - papredoll_dbods[uPlayerID - 1] = pIcons_LOD->LoadTexture(dbod_texnames_by_face[pPlayers[uPlayerID]->uCurrentFace], TEXTURE_16BIT_PALETTE); - papredoll_dlads[uPlayerID - 1] = pIcons_LOD->LoadTexture(dlad_texnames_by_face[pPlayers[uPlayerID]->uCurrentFace], TEXTURE_16BIT_PALETTE); - papredoll_dlaus[uPlayerID - 1] = pIcons_LOD->LoadTexture(dlau_texnames_by_face[pPlayers[uPlayerID]->uCurrentFace], TEXTURE_16BIT_PALETTE); - papredoll_drhs [uPlayerID - 1] = pIcons_LOD->LoadTexture(drh_texnames_by_face [pPlayers[uPlayerID]->uCurrentFace], TEXTURE_16BIT_PALETTE); - papredoll_dlhs [uPlayerID - 1] = pIcons_LOD->LoadTexture(dlh_texnames_by_face [pPlayers[uPlayerID]->uCurrentFace], TEXTURE_16BIT_PALETTE); - papredoll_dlhus[uPlayerID - 1] = pIcons_LOD->LoadTexture(dlhu_texnames_by_face[pPlayers[uPlayerID]->uCurrentFace], TEXTURE_16BIT_PALETTE); + if ( pPlayers[uPlayerID]->uCurrentFace == 12 || pPlayers[uPlayerID]->uCurrentFace == 13 ) + { + wsprintfA(pContainer, "pc%02dbrd", pPlayers[uPlayerID]->uCurrentFace + 1); + papredoll_dbrds[pPlayers[uPlayerID]->uCurrentFace] = pIcons_LOD->LoadTexture(pContainer, TEXTURE_16BIT_PALETTE); + } + wsprintfA(pContainer, "item281pc%02d", pPlayers[uPlayerID]->uCurrentFace + 1); + papredoll_flying_feet[pPlayers[uPlayerID]->uCurrentFace] = pIcons_LOD->LoadTexture(pContainer, TEXTURE_16BIT_PALETTE); + IsPlayerWearingWatersuit[uPlayerID] = 0; + } +} - if ( pPlayers[uPlayerID]->uCurrentFace == 12 || pPlayers[uPlayerID]->uCurrentFace == 13 ) - { - wsprintfA(pContainer, "pc%02dbrd", pPlayers[uPlayerID]->uCurrentFace + 1); - papredoll_dbrds[pPlayers[uPlayerID]->uCurrentFace] = pIcons_LOD->LoadTexture(pContainer, TEXTURE_16BIT_PALETTE); - } - wsprintfA(pContainer, "item281pc%02d", pPlayers[uPlayerID]->uCurrentFace + 1); - papredoll_flying_feet[pPlayers[uPlayerID]->uCurrentFace] = pIcons_LOD->LoadTexture(pContainer, TEXTURE_16BIT_PALETTE); - IsPlayerWearingWatersuit[uPlayerID] = 0; - } - } //----- (00468F8A) -------------------------------------------------------- void OnPaperdollLeftClick() { @@ -2452,12 +2323,12 @@ unsigned int v3; // edx@4 unsigned int pSkillType; // esi@5 unsigned __int16 v5; // ax@7 - unsigned int v6; // edi@19 + //unsigned int v6; // edi@19 int v7; // esi@27 int v8; // eax@29 - int v9; // edx@32 + //int v9; // edx@32 int v10; // esi@34 - int v11; // eax@34 + //int v11; // eax@34 int v12; // esi@38 int v13; // eax@38 char v14; // zf@38 @@ -2492,8 +2363,7 @@ unsigned int v50; // [sp+38h] [bp-14h]@50 int v51; // [sp+3Ch] [bp-10h]@1 int v52; // [sp+40h] [bp-Ch]@5 - //int v53; // [sp+44h] [bp-8h]@1 - //unsigned int v54; // [sp+48h] [bp-4h]@1 + ITEM_EQUIP_TYPE pEquipType; v51 = 0; _this.Reset(); @@ -2507,7 +2377,7 @@ v3 = pParty->pPickedItem.uItemID; if ( pParty->pPickedItem.uItemID ) { - v52 = pItemsTable->pItems[pParty->pPickedItem.uItemID].uEquipType; + pEquipType = pItemsTable->pItems[pParty->pPickedItem.uItemID].uEquipType; pSkillType = pItemsTable->pItems[pParty->pPickedItem.uItemID].uSkillType; if ( pSkillType == 4 ) { @@ -2548,60 +2418,57 @@ WetsuitOn(uActiveCharacter); return; } - v6 = v52; - switch ( v52 ) + //v6 = v52; + switch ( pEquipType ) { - case 2u: - case 3u: - case 5u: - case 6u: - case 7u: - case 8u: - case 9u: - case 0xBu: + case EQUIP_BOW: + case EQUIP_ARMOUR: + case EQUIP_HELMET: + case EQUIP_BELT: + case EQUIP_CLOAK: + case EQUIP_GAUNTLETS: + case EQUIP_BOOTS: + case EQUIP_AMULET: if ( !pPlayers[uActiveCharacter]->HasSkill(pSkillType) ) { pPlayers[uActiveCharacter]->PlaySound(SPEECH_39, 0); return; } - if ( sub_43EE77_ProbablyIfUnderwaterSuitIsEquipped(uActiveCharacter) && (v6 != 3 || bUnderwater) ) - { - pAudioPlayer->PlaySound(SOUND_27, 0, 0, -1, 0, 0, 0, 0); - return; - } - pPlayers[uActiveCharacter]->EquipBody((ITEM_EQUIP_TYPE)v6); + if ( sub_43EE77_ProbablyIfUnderwaterSuitIsEquipped(uActiveCharacter) && (pEquipType != EQUIP_ARMOUR || bUnderwater) ) + { + pAudioPlayer->PlaySound(SOUND_27, 0, 0, -1, 0, 0, 0, 0); + return; + } + pPlayers[uActiveCharacter]->EquipBody(pEquipType); if ( pParty->pPickedItem.uItemID == ITEM_WETSUIT ) WetsuitOff(uActiveCharacter); return; - case 0xAu: + + case EQUIP_RING://Кольца if ( sub_43EE77_ProbablyIfUnderwaterSuitIsEquipped(uActiveCharacter) ) - { - pAudioPlayer->PlaySound(SOUND_27, 0, 0, -1, 0, 0, 0, 0); - return; - } - v52 = 10; - v7 = (int)&pPlayers[uActiveCharacter]->pEquipment.uRings; - while ( 1 ) { - if ( !*(int *)v7 ) + pAudioPlayer->PlaySound(SOUND_27, 0, 0, -1, 0, 0, 0, 0); + return; + } + //слоты для колец + v7 = 0; + for ( v52 = 10; (signed int)v52 < 16; ++v52 ) + { + if ( !pPlayers[uActiveCharacter]->pEquipment.uRings[v7] ) { v8 = pPlayers[uActiveCharacter]->FindFreeInventoryListSlot(); if ( v8 >= 0 ) - { - v9 = v52; - pParty->pPickedItem.uBodyAnchor = v52 + 1; - memcpy(&pPlayers[uActiveCharacter]->pInventoryItemList[v8], &pParty->pPickedItem, sizeof(pPlayers[uActiveCharacter]->pInventoryItemList[v8])); - *(&pPlayers[uActiveCharacter]->pEquipment.uShield + v9) = v8 + 1; - pMouse->RemoveHoldingItem(); + { + pParty->pPickedItem.uBodyAnchor = v52 + 1; + memcpy(&pPlayers[uActiveCharacter]->pInventoryItemList[v8], &pParty->pPickedItem, sizeof(pPlayers[uActiveCharacter]->pInventoryItemList[v8])); + pPlayers[uActiveCharacter]->pEquipment.uRings[v7] = v8 + 1; + pMouse->RemoveHoldingItem(); break; - } + } } - ++v52; - v7 += 4; - if ( (signed int)v52 > 15 ) - break; + v7++; } - if ( v52 == 16 ) + if ( v52 == 16 )//замещение последнего кольца { v52 = pPlayers[uActiveCharacter]->pEquipment.uRings[6] - 1; memcpy(&_this, &pParty->pPickedItem, sizeof(_this)); @@ -2610,17 +2477,17 @@ pParty->pPickedItem.Reset(); pParty->SetHoldingItem((ItemGen *)(v10 + 532)); _this.uBodyAnchor = 16; - v11 = v52 + 1; memcpy((void *)(v10 + 532), &_this, 0x24u); - pPlayers[uActiveCharacter]->pEquipment.uRings[6] = v11; + pPlayers[uActiveCharacter]->pEquipment.uRings[6] = v52 + 1; } return; - case 4u: + + case EQUIP_SHIELD://Щит if ( sub_43EE77_ProbablyIfUnderwaterSuitIsEquipped(uActiveCharacter) ) - { - pAudioPlayer->PlaySound(SOUND_27, 0, 0, -1, 0, 0, 0, 0); - return; - } + { + pAudioPlayer->PlaySound(SOUND_27, 0, 0, -1, 0, 0, 0, 0); + return; + } if ( !pPlayers[uActiveCharacter]->HasSkill(pSkillType) ) { pPlayers[uActiveCharacter]->PlaySound(SPEECH_39, 0); @@ -2668,8 +2535,8 @@ } pPlayers[uActiveCharacter]->pEquipment.uMainHand = 0; return; - case 0u: - case 0xCu: + case EQUIP_OFF_HAND: + case EQUIP_WAND: if ( sub_43EE77_ProbablyIfUnderwaterSuitIsEquipped(uActiveCharacter) && pParty->pPickedItem.uItemID != 64 && pParty->pPickedItem.uItemID != 65 ) @@ -2705,7 +2572,7 @@ pParty->SetHoldingItem((ItemGen *)(v20 + 532)); _this.uBodyAnchor = 1; v21 = v2 + 1; - v14 = v52 == 12; + v14 = pEquipType == 12; memcpy((void *)(v20 + 532), &_this, 0x24u); pPlayers[uActiveCharacter]->pEquipment.uShield = v21; if ( !v14 ) @@ -2727,7 +2594,7 @@ memcpy(&pPlayers[uActiveCharacter]->pInventoryItemList[v23], &pParty->pPickedItem, sizeof(pPlayers[uActiveCharacter]->pInventoryItemList[v23])); pPlayers[uActiveCharacter]->pEquipment.uShield = v23 + 1; pMouse->RemoveHoldingItem(); - if ( v52 != 12 ) + if ( pEquipType != 12 ) return; v22 = *(int *)v50; v50 = v22; @@ -2750,7 +2617,7 @@ memcpy(&pPlayers[uActiveCharacter]->pInventoryItemList[v26], &pParty->pPickedItem, sizeof(pPlayers[uActiveCharacter]->pInventoryItemList[v26])); pPlayers[uActiveCharacter]->pEquipment.uMainHand = v26 + 1; pMouse->RemoveHoldingItem(); - if ( v52 != 12 ) + if ( pEquipType != 12 ) return; v22 = *(int *)v50; v50 = v22; @@ -2769,7 +2636,7 @@ pParty->SetHoldingItem((ItemGen *)(v24 + 532)); _this.uBodyAnchor = 2; v25 = v1 + 1; - v14 = v52 == 12; + v14 = pEquipType == 12; memcpy((void *)(v24 + 532), &_this, 0x24u); pPlayers[uActiveCharacter]->pEquipment.uMainHand = v25; if ( v14 ) @@ -2782,7 +2649,7 @@ stru_A750F8[uActiveCharacter - 1]._494836( *((int *)&pSpellDatas[66].uNormalLevelRecovery + v50), uActiveCharacter - 1 + 9); } break; - case 1u: + case EQUIP_MAIN_HAND: if ( sub_43EE77_ProbablyIfUnderwaterSuitIsEquipped(uActiveCharacter) ) { pAudioPlayer->PlaySound(SOUND_27, 0, 0, -1, 0, 0, 0, 0); @@ -2858,7 +2725,7 @@ v50 = v37; v38 = (ItemGen *)(v37 + 532); v14 = v38->uItemID == ITEM_WETSUIT; - v52 = pItemsTable->pItems[v38->uItemID].uEquipType; + pEquipType = pItemsTable->pItems[v38->uItemID].uEquipType; if ( v14 ) { if ( bUnderwater ) @@ -2872,7 +2739,7 @@ { *((char *)pGUIWindow_Settings->ptr_1C + 8) &= 0x7Fu; *((short *)pGUIWindow_Settings->ptr_1C + 2) = uActiveCharacter - 1; - v39 = v52; + v39 = pEquipType; *((int *)pGUIWindow_Settings->ptr_1C + 3) = v36; *((short *)pGUIWindow_Settings->ptr_1C + 3) = v39; ptr_50C9A4 = v38; @@ -2906,6 +2773,7 @@ } } } + //----- (004196A0) -------------------------------------------------------- void CharacterUI_ReleaseButtons() {