comparison UI/UICharacter.cpp @ 1474:3cda66022a77

UICharacter.cpp cleaning(continue) OnPaperdollLeftClick
author Ritor1
date Wed, 28 Aug 2013 14:38:51 +0600
parents ec79ee6d44ce
children 92b63e3dca90
comparison
equal deleted inserted replaced
1466:ec79ee6d44ce 1474:3cda66022a77
1159 index = item->uItemID - 66; 1159 index = item->uItemID - 66;
1160 break; 1160 break;
1161 } 1161 }
1162 if ( index >= 0 && index < 17 ) 1162 if ( index >= 0 && index < 17 )
1163 { 1163 {
1164 if ( pPlayers[uPlayerID]->pEquipment.uMainHand 1164 if ( pPlayers[uPlayerID]->pEquipment.uMainHand
1165 && (pPlayers[uPlayerID]->GetEquippedItemEquipType(EQUIP_MAIN_HAND) == EQUIP_MAIN_HAND 1165 && (pPlayers[uPlayerID]->GetEquippedItemEquipType(EQUIP_MAIN_HAND) == EQUIP_MAIN_HAND
1166 || pPlayers[uPlayerID]->GetEquippedItemSkillType(EQUIP_MAIN_HAND) == EQUIP_SHIELD 1166 || pPlayers[uPlayerID]->GetEquippedItemSkillType(EQUIP_MAIN_HAND) == EQUIP_SHIELD
1167 && !pPlayers[uPlayerID]->pEquipment.uShield) )//без щита 1167 && !pPlayers[uPlayerID]->pEquipment.uShield) )//без щита
1168 { 1168 {
1169 v94 = paperdoll_armor_texture[pBodyComplection][index][2]; 1169 v94 = paperdoll_armor_texture[pBodyComplection][index][2];
1170 if ( paperdoll_armor_texture[pBodyComplection][index][2] == pIcons_LOD->FindTextureByName("pending") ) 1170 if ( paperdoll_armor_texture[pBodyComplection][index][2] == pIcons_LOD->FindTextureByName("pending") )
1171 {
1172 v94 = paperdoll_armor_texture[pBodyComplection][index][1];
1173 item_X = pPaperdoll_BodyX + paperdoll_shoulder_coord[pBodyComplection][index][0];
1174 item_Y = pPaperdoll_BodyY + paperdoll_shoulder_coord[pBodyComplection][index][1];
1175 }
1176 else
1177 {
1178 item_X = pPaperdoll_BodyX + paperdoll_shoulder_second_coord[pBodyComplection][index][0];
1179 item_Y = pPaperdoll_BodyY + paperdoll_shoulder_second_coord[pBodyComplection][index][1];
1180 }
1181 if ( v94 != pIcons_LOD->FindTextureByName("pending") )
1182 {
1183 if ( !(item->uAttributes & 0xF0) )
1184 { 1171 {
1185 if ( item->uAttributes & 2 ) 1172 v94 = paperdoll_armor_texture[pBodyComplection][index][1];
1186 pRenderer->DrawTransparentRedShade(item_X, item_Y, pIcons_LOD->GetTexture(v94)); 1173 item_X = pPaperdoll_BodyX + paperdoll_shoulder_coord[pBodyComplection][index][0];
1187 else 1174 item_Y = pPaperdoll_BodyY + paperdoll_shoulder_coord[pBodyComplection][index][1];
1188 {
1189 if ( item->uAttributes & 1 )
1190 pRenderer->DrawTextureTransparent(item_X, item_Y, pIcons_LOD->GetTexture(v94));
1191 else
1192 pRenderer->DrawTransparentGreenShade(item_X, item_Y, pIcons_LOD->GetTexture(v94));
1193 }
1194 } 1175 }
1195 else 1176 else
1196 { 1177 {
1197 if ( paperdoll_armor_texture[pBodyComplection][index][2] != pIcons_LOD->FindTextureByName("pending") ) 1178 item_X = pPaperdoll_BodyX + paperdoll_shoulder_second_coord[pBodyComplection][index][0];
1179 item_Y = pPaperdoll_BodyY + paperdoll_shoulder_second_coord[pBodyComplection][index][1];
1180 }
1181 if ( v94 != pIcons_LOD->FindTextureByName("pending") )
1182 {
1183 if ( !(item->uAttributes & 0xF0) )
1198 { 1184 {
1199 if ( item->uAttributes & 0xF0 ) 1185 if ( item->uAttributes & 2 )
1186 pRenderer->DrawTransparentRedShade(item_X, item_Y, pIcons_LOD->GetTexture(v94));
1187 else
1200 { 1188 {
1201 if ( (item->uAttributes & 0xF0) == ITEM_AURA_EFFECT_RED ) 1189 if ( item->uAttributes & 1 )
1202 container = "sptext01"; 1190 pRenderer->DrawTextureTransparent(item_X, item_Y, pIcons_LOD->GetTexture(v94));
1203 if ( (item->uAttributes & 0xF0) == ITEM_AURA_EFFECT_BLUE ) 1191 else
1204 container = "sp28a"; 1192 pRenderer->DrawTransparentGreenShade(item_X, item_Y, pIcons_LOD->GetTexture(v94));
1205 if ( ( item->uAttributes & 0xF0) == ITEM_AURA_EFFECT_GREEN ) 1193 }
1206 container = "sp30a"; 1194 }
1207 if ( (item->uAttributes & 0xF0) == ITEM_AURA_EFFECT_PURPLE ) 1195 else
1208 container = "sp91a"; 1196 {
1209 _50C9A8_item_enchantment_timer -= pEventTimer->uTimeElapsed; 1197 if ( paperdoll_armor_texture[pBodyComplection][index][2] != pIcons_LOD->FindTextureByName("pending") )
1210 if ( _50C9A8_item_enchantment_timer <= 0 ) 1198 {
1199 if ( item->uAttributes & 0xF0 )
1211 { 1200 {
1212 _50C9A8_item_enchantment_timer = 0; 1201 if ( (item->uAttributes & 0xF0) == ITEM_AURA_EFFECT_RED )
1213 item->uAttributes &= 0xFFFFFF0Fu; 1202 container = "sptext01";
1214 ptr_50C9A4 = 0; 1203 if ( (item->uAttributes & 0xF0) == ITEM_AURA_EFFECT_BLUE )
1204 container = "sp28a";
1205 if ( ( item->uAttributes & 0xF0) == ITEM_AURA_EFFECT_GREEN )
1206 container = "sp30a";
1207 if ( (item->uAttributes & 0xF0) == ITEM_AURA_EFFECT_PURPLE )
1208 container = "sp91a";
1209 _50C9A8_item_enchantment_timer -= pEventTimer->uTimeElapsed;
1210 if ( _50C9A8_item_enchantment_timer <= 0 )
1211 {
1212 _50C9A8_item_enchantment_timer = 0;
1213 item->uAttributes &= 0xFFFFFF0Fu;
1214 ptr_50C9A4 = 0;
1215 }
1216 pRenderer->DrawAura(item_X, item_Y, pIcons_LOD->GetTexture(v94), pIcons_LOD->LoadTexturePtr(container, TEXTURE_16BIT_PALETTE),
1217 GetTickCount() * 0.1, 0, 255);
1215 } 1218 }
1216 pRenderer->DrawAura(item_X, item_Y, pIcons_LOD->GetTexture(v94), pIcons_LOD->LoadTexturePtr(container, TEXTURE_16BIT_PALETTE),
1217 GetTickCount() * 0.1, 0, 255);
1218 } 1219 }
1219 } 1220 }
1220 } 1221 }
1221 } 1222 }
1222 } 1223 else//без ничего или с щитом
1223 else//без ничего или с щитом 1224 {
1224 { 1225 //v94 = paperdoll_armor_texture[pBodyComplection][index][1];
1225 //v94 = paperdoll_armor_texture[pBodyComplection][index][1]; 1226 if ( paperdoll_armor_texture[pBodyComplection][index][1] != pIcons_LOD->FindTextureByName("pending") )
1226 if ( paperdoll_armor_texture[pBodyComplection][index][1] != pIcons_LOD->FindTextureByName("pending") )
1227 {
1228 item_X = pPaperdoll_BodyX + paperdoll_shoulder_coord[pBodyComplection][index][0];
1229 item_Y = pPaperdoll_BodyY + paperdoll_shoulder_coord[pBodyComplection][index][1];
1230 if ( !(item->uAttributes & 0xF0) )
1231 { 1227 {
1232 if ( item->uAttributes & 2 ) 1228 item_X = pPaperdoll_BodyX + paperdoll_shoulder_coord[pBodyComplection][index][0];
1233 pRenderer->DrawTransparentRedShade(item_X, item_Y, pIcons_LOD->GetTexture(paperdoll_armor_texture[pBodyComplection][index][1])); 1229 item_Y = pPaperdoll_BodyY + paperdoll_shoulder_coord[pBodyComplection][index][1];
1230 if ( !(item->uAttributes & 0xF0) )
1231 {
1232 if ( item->uAttributes & 2 )
1233 pRenderer->DrawTransparentRedShade(item_X, item_Y, pIcons_LOD->GetTexture(paperdoll_armor_texture[pBodyComplection][index][1]));
1234 else
1235 {
1236 if ( item->uAttributes & 1 )
1237 pRenderer->DrawTextureTransparent(item_X, item_Y, pIcons_LOD->GetTexture(paperdoll_armor_texture[pBodyComplection][index][1]));
1238 else
1239 pRenderer->DrawTransparentGreenShade(item_X, item_Y, pIcons_LOD->GetTexture(paperdoll_armor_texture[pBodyComplection][index][1]));
1240 }
1241 }
1234 else 1242 else
1235 { 1243 {
1236 if ( item->uAttributes & 1 ) 1244 if ( (item->uAttributes & 0xF0) == ITEM_AURA_EFFECT_RED )
1237 pRenderer->DrawTextureTransparent(item_X, item_Y, pIcons_LOD->GetTexture(paperdoll_armor_texture[pBodyComplection][index][1])); 1245 container = "sptext01";
1238 else 1246 if ( (item->uAttributes & 0xF0) == ITEM_AURA_EFFECT_BLUE )
1239 pRenderer->DrawTransparentGreenShade(item_X, item_Y, pIcons_LOD->GetTexture(paperdoll_armor_texture[pBodyComplection][index][1])); 1247 container = "sp28a";
1248 if ( (item->uAttributes & 0xF0) == ITEM_AURA_EFFECT_GREEN )
1249 container = "sp30a";
1250 if ( (item->uAttributes & 0xF0) == ITEM_AURA_EFFECT_PURPLE )
1251 container = "sp91a";
1252 _50C9A8_item_enchantment_timer -= pEventTimer->uTimeElapsed;
1253 if ( _50C9A8_item_enchantment_timer <= 0 )
1254 {
1255 _50C9A8_item_enchantment_timer = 0;
1256 item->uAttributes &= 0xFFFFFF0Fu;
1257 ptr_50C9A4 = 0;
1258 }
1259 pRenderer->DrawAura(item_X, item_Y, pIcons_LOD->GetTexture(paperdoll_armor_texture[pBodyComplection][index][1]),
1260 pIcons_LOD->LoadTexturePtr(container, TEXTURE_16BIT_PALETTE), GetTickCount() * 0.1, 0, 255);
1240 } 1261 }
1241 } 1262 }
1242 else 1263 }
1243 {
1244 if ( (item->uAttributes & 0xF0) == ITEM_AURA_EFFECT_RED )
1245 container = "sptext01";
1246 if ( (item->uAttributes & 0xF0) == ITEM_AURA_EFFECT_BLUE )
1247 container = "sp28a";
1248 if ( (item->uAttributes & 0xF0) == ITEM_AURA_EFFECT_GREEN )
1249 container = "sp30a";
1250 if ( (item->uAttributes & 0xF0) == ITEM_AURA_EFFECT_PURPLE )
1251 container = "sp91a";
1252 _50C9A8_item_enchantment_timer -= pEventTimer->uTimeElapsed;
1253 if ( _50C9A8_item_enchantment_timer <= 0 )
1254 {
1255 _50C9A8_item_enchantment_timer = 0;
1256 item->uAttributes &= 0xFFFFFF0Fu;
1257 ptr_50C9A4 = 0;
1258 }
1259 pRenderer->DrawAura(item_X, item_Y, pIcons_LOD->GetTexture(paperdoll_armor_texture[pBodyComplection][index][1]),
1260 pIcons_LOD->LoadTexturePtr(container, TEXTURE_16BIT_PALETTE), GetTickCount() * 0.1, 0, 255);
1261 }
1262 }
1263 }
1264
1265 } 1264 }
1266 //----------------------------------------------(Cloak collar/воротник плаща)------------------------------------- 1265 //----------------------------------------------(Cloak collar/воротник плаща)-------------------------------------
1267 if ( pPlayers[uPlayerID]->pEquipment.uCloak ) 1266 if ( pPlayers[uPlayerID]->pEquipment.uCloak )
1268 { 1267 {
1269 item = &pPlayers[uPlayerID]->pInventoryItemList[pPlayers[uPlayerID]->pEquipment.uCloak - 1]; 1268 item = &pPlayers[uPlayerID]->pInventoryItemList[pPlayers[uPlayerID]->pEquipment.uCloak - 1];
1671 } 1670 }
1672 1671
1673 //----- (0043BCA7) -------------------------------------------------------- 1672 //----- (0043BCA7) --------------------------------------------------------
1674 void CharacterUI_LoadPaperdollTextures() 1673 void CharacterUI_LoadPaperdollTextures()
1675 { 1674 {
1676 //enum CHARACTER_RACE pRace; // ebx@7
1677 //signed int pSex; // eax@7
1678 int v3; // ebx@10 1675 int v3; // ebx@10
1679 Player *pPlayer; // edi@12 1676 Player *pPlayer; // edi@12
1680 //unsigned __int8 v5; // cl@12
1681 int v6; // edi@16 1677 int v6; // edi@16
1682 unsigned int v7; // eax@16 1678 unsigned int v7; // eax@16
1683 Player *pPlayer2; // ebx@16 1679 Player *pPlayer2; // ebx@16
1684 char *v9; // ebx@16 1680 char *v9; // ebx@16
1685 //char v10; // al@16
1686 //signed int v11; // edi@21
1687 unsigned int v22; // eax@76 1681 unsigned int v22; // eax@76
1688 int v23; // ecx@76 1682 int v23; // ecx@76
1689 unsigned int v24; // eax@78 1683 unsigned int v24; // eax@78
1690 int v25; // ecx@78 1684 int v25; // ecx@78
1691 //int v26; // ebx@79
1692 unsigned int v27; // eax@80 1685 unsigned int v27; // eax@80
1693 int v28; // ecx@80 1686 int v28; // ecx@80
1694 signed int v32; // [sp+10h] [bp-28h]@75 1687 signed int v32; // [sp+10h] [bp-28h]@75
1695 signed int v33; // [sp+10h] [bp-28h]@77 1688 signed int v33; // [sp+10h] [bp-28h]@77
1696 int v34; // [sp+10h] [bp-28h]@79 1689 int v34; // [sp+10h] [bp-28h]@79
1697 int pItemTXTNum; // [sp+14h] [bp-24h]@75 1690 int pItemTXTNum; // [sp+14h] [bp-24h]@75
1698 int v37; // [sp+14h] [bp-24h]@77 1691 int v37; // [sp+14h] [bp-24h]@77
1699 signed int v38; // [sp+14h] [bp-24h]@79 1692 signed int v38; // [sp+14h] [bp-24h]@79
1700 //int v43; // [sp+20h] [bp-18h]@73
1701 char pContainer[128]; // [sp+24h] [bp-14h]@12 1693 char pContainer[128]; // [sp+24h] [bp-14h]@12
1702 1694
1703 uTextureID_MAGNIF_B = pIcons_LOD->LoadTexture("MAGNIF-B", TEXTURE_16BIT_PALETTE); 1695 uTextureID_MAGNIF_B = pIcons_LOD->LoadTexture("MAGNIF-B", TEXTURE_16BIT_PALETTE);
1704 //if ( !pParty->uAlignment || pParty->uAlignment == 1 || pParty->uAlignment == 2 ) 1696 //if ( !pParty->uAlignment || pParty->uAlignment == 1 || pParty->uAlignment == 2 )
1705 uTextureID_BACKDOLL = pIcons_LOD->LoadTexture("BACKDOLL", TEXTURE_16BIT_PALETTE); 1697 uTextureID_BACKDOLL = pIcons_LOD->LoadTexture("BACKDOLL", TEXTURE_16BIT_PALETTE);
1908 } 1900 }
1909 } 1901 }
1910 1902
1911 //----- (00419401) -------------------------------------------------------- 1903 //----- (00419401) --------------------------------------------------------
1912 void CharacterUI_SkillsTab_CreateButtons() 1904 void CharacterUI_SkillsTab_CreateButtons()
1913 { 1905 {
1914 // unsigned int v0; // ecx@3 1906 GUIButton *pButton; // eax@3
1915 GUIButton *pButton; // eax@3 1907 unsigned int current_Y; // esi@8
1916 unsigned int current_Y; // esi@8 1908 int buttons_count; // [sp+10h] [bp-14h]@1
1917 int buttons_count; // [sp+10h] [bp-14h]@1 1909 int first_rows; // [sp+14h] [bp-10h]@19
1918 int first_rows; // [sp+14h] [bp-10h]@19 1910 int skill_id; // [sp+18h] [bp-Ch]@8
1919 int skill_id; // [sp+18h] [bp-Ch]@8 1911 Player *curr_player; // [sp+1Ch] [bp-8h]@8
1920 Player *curr_player; // [sp+1Ch] [bp-8h]@8 1912 int i;
1921 int i; 1913 int uCurrFontHeght;
1922 int uCurrFontHeght; 1914
1923 1915 buttons_count = 0;
1924 buttons_count = 0; 1916 if ( dword_507CC0_activ_ch )
1925 if ( dword_507CC0_activ_ch ) 1917 CharacterUI_ReleaseButtons();
1926 CharacterUI_ReleaseButtons(); 1918 dword_507CC0_activ_ch = uActiveCharacter;
1927 dword_507CC0_activ_ch = uActiveCharacter; 1919 for ( pButton = pGUIWindow_CurrentMenu->pControlsHead; pButton; pButton = pButton->pNext )
1928 for ( pButton = pGUIWindow_CurrentMenu->pControlsHead; pButton; pButton = pButton->pNext ) 1920 {
1929 { 1921 if ( pButton->msg == UIMSG_InventoryLeftClick )
1930 if ( pButton->msg == UIMSG_InventoryLeftClick ) 1922 {
1931 { 1923 dword_50698C_uX = pButton->uX;
1932 dword_50698C_uX = pButton->uX; 1924 dword_506988_uY = pButton->uY;
1933 dword_506988_uY = pButton->uY; 1925 dword_506984_uZ = pButton->uZ;
1934 dword_506984_uZ = pButton->uZ; 1926 dword_506980_uW = pButton->uW;
1935 dword_506980_uW = pButton->uW; 1927 pButton->uW = 0;
1936 pButton->uW = 0; 1928 pButton->uZ = 0;
1937 pButton->uZ = 0; 1929 pButton->uY = 0;
1938 pButton->uY = 0; 1930 pButton->uX = 0;
1939 pButton->uX = 0; 1931 }
1940 } 1932 }
1941 } 1933 first_rows = 0;
1942 first_rows = 0; 1934 // a5 = pGUIWindow_CurrentMenu->uNumControls;
1943 // a5 = pGUIWindow_CurrentMenu->uNumControls; 1935 curr_player = &pParty->pPlayers[uActiveCharacter-1];
1944 curr_player = &pParty->pPlayers[uActiveCharacter-1]; 1936
1945 1937 uCurrFontHeght=pFontLucida->uFontHeight;
1946 uCurrFontHeght=pFontLucida->uFontHeight; 1938 current_Y = 2 *uCurrFontHeght + 13;
1947 current_Y = 2 *uCurrFontHeght + 13; 1939 for( i = 0; i < 9; ++i )
1948 for(i=0; i<9;++i) 1940 {
1949 { 1941 skill_id = pWeaponSkills[i];
1950 skill_id = pWeaponSkills[i]; 1942 if ( curr_player->pActiveSkills[skill_id] & 0x3F )
1951 if ( curr_player->pActiveSkills[skill_id] & 0x3F ) 1943 {
1952 { 1944 current_Y += uCurrFontHeght - 3;
1953 current_Y += uCurrFontHeght - 3; 1945 ++buttons_count;
1954 ++buttons_count; 1946 ++first_rows;
1955 ++first_rows; 1947 pGUIWindow_CurrentMenu->CreateButton(24, current_Y, 204, uCurrFontHeght - 3, 3, skill_id | 0x8000, UIMSG_SkillUp, skill_id, 0, "", 0, 0);
1956 pGUIWindow_CurrentMenu->CreateButton(24, current_Y, 204, uCurrFontHeght - 3, 3, skill_id | 0x8000, UIMSG_SkillUp, skill_id, 0, "", 0, 0); 1948 }
1957 } 1949 }
1958 } 1950 if ( !first_rows )
1959 if ( !first_rows ) 1951 current_Y += uCurrFontHeght - 3;
1960 current_Y += uCurrFontHeght - 3; 1952 current_Y += 2 * uCurrFontHeght - 6;
1961 current_Y += 2 * uCurrFontHeght - 6; 1953 for ( i = 0; i < 9; ++i )
1962 for(i=0; i<9;++i) 1954 {
1963 { 1955 skill_id = pMagicSkills[i];
1964 skill_id = pMagicSkills[i]; 1956 if ( curr_player->pActiveSkills[skill_id] & 0x3F && buttons_count < 15 )
1965 if ( curr_player->pActiveSkills[skill_id] & 0x3F && buttons_count < 15 ) 1957 {
1966 { 1958 current_Y += uCurrFontHeght - 3;
1967 current_Y += uCurrFontHeght - 3; 1959 ++buttons_count;
1968 ++buttons_count; 1960 pGUIWindow_CurrentMenu->CreateButton(24, current_Y, 204, uCurrFontHeght - 3, 3, skill_id | 0x8000, UIMSG_SkillUp, skill_id, 0, "", 0, 0);
1969 pGUIWindow_CurrentMenu->CreateButton(24, current_Y, 204, uCurrFontHeght - 3, 3, skill_id | 0x8000, UIMSG_SkillUp, skill_id, 0, "", 0, 0); 1961 }
1970 } 1962 }
1971 } 1963 first_rows = 0;
1972 first_rows = 0; 1964 current_Y = 2 * uCurrFontHeght + 13;
1973 current_Y = 2 * uCurrFontHeght + 13; 1965 for ( i = 0; i < 5; ++i )
1974 for(i=0; i<5;++i) 1966 {
1975 { 1967 skill_id = pArmorSkills[i];
1976 skill_id = pArmorSkills[i]; 1968 if ( curr_player->pActiveSkills[skill_id] & 0x3F )
1977 if ( curr_player->pActiveSkills[skill_id] & 0x3F ) 1969 {
1978 { 1970 current_Y+= uCurrFontHeght - 3;
1979 current_Y+= uCurrFontHeght - 3; 1971 ++buttons_count;
1980 ++buttons_count; 1972 ++first_rows;
1981 ++first_rows; 1973 pGUIWindow_CurrentMenu->CreateButton(246, current_Y, 204, uCurrFontHeght - 3, 3, skill_id | 0x8000, UIMSG_SkillUp, skill_id, 0, "", 0, 0);
1982 pGUIWindow_CurrentMenu->CreateButton(246, current_Y, 204, uCurrFontHeght - 3, 3, skill_id | 0x8000, UIMSG_SkillUp, skill_id, 0, "", 0, 0); 1974 }
1983 } 1975 }
1984 } 1976 if ( !first_rows )
1985 if ( !first_rows ) 1977 current_Y += uCurrFontHeght - 3;
1986 current_Y += uCurrFontHeght - 3; 1978 current_Y += 2 * uCurrFontHeght - 6;
1987 current_Y += 2 * uCurrFontHeght - 6; 1979 for ( i = 0; i < 12; ++i )
1988 for(i=0; i<12; ++i) 1980 {
1989 { 1981 skill_id = pMiscSkills[i];
1990 skill_id = pMiscSkills[i]; 1982 if ( curr_player->pActiveSkills[skill_id] & 0x3F )
1991 if ( curr_player->pActiveSkills[skill_id] & 0x3F ) 1983 {
1992 { 1984 current_Y += uCurrFontHeght - 3;
1993 current_Y += uCurrFontHeght - 3; 1985 ++buttons_count;
1994 ++buttons_count; 1986 pGUIWindow_CurrentMenu->CreateButton(246, current_Y, 204, uCurrFontHeght - 3, 3, skill_id | 0x8000, UIMSG_SkillUp, skill_id, 0, "", 0, 0);
1995 pGUIWindow_CurrentMenu->CreateButton(246, current_Y, 204, uCurrFontHeght - 3, 3, skill_id | 0x8000, UIMSG_SkillUp, skill_id, 0, "", 0, 0); 1987 }
1996 } 1988 }
1997 } 1989
1998 1990 if ( buttons_count )
1999 if ( buttons_count ) 1991 pGUIWindow_CurrentMenu->_41D08F_set_keyboard_control_group(buttons_count, 1, 0, pGUIWindow_CurrentMenu->uNumControls);
2000 pGUIWindow_CurrentMenu->_41D08F_set_keyboard_control_group(buttons_count, 1, 0, pGUIWindow_CurrentMenu->uNumControls); 1992 }
2001 }
2002
2003
2004 1993
2005 //----- (00418511) -------------------------------------------------------- 1994 //----- (00418511) --------------------------------------------------------
2006 void CharacterUI_StatsTab_Draw( Player *player ) 1995 void CharacterUI_StatsTab_Draw( Player *player )
2007 { 1996 {
2008 //Player *pPlayer; // edi@1 1997 int pY; // ST34_4@4
2009 //unsigned int v4; // eax@2 1998 char *pText; // eax@9
2010 int v7; // ebp@4 1999 const char *a2; // [sp+14h] [bp-Ch]@4
2011 int v8; // eax@4 2000
2012 unsigned int v9; // eax@4
2013 int v10; // ST34_4@4
2014 int v13; // ebp@4
2015 int v14; // eax@4
2016 unsigned int v15; // eax@4
2017 int v19; // ebp@4
2018 int v20; // eax@4
2019 unsigned int v21; // eax@4
2020 int v25; // ebp@4
2021 int v26; // eax@4
2022 unsigned int v27; // eax@4
2023 int v31; // ebp@4
2024 int v32; // eax@4
2025 unsigned int v33; // eax@4
2026 int v37; // ebp@4
2027 int v38; // eax@4
2028 unsigned int v39; // eax@4
2029 int v43; // ebp@4
2030 int v44; // eax@4
2031 unsigned int v45; // eax@4
2032 signed int v49; // eax@6
2033 unsigned int v50; // eax@6
2034 int v53; // eax@8
2035 unsigned int v54; // eax@8
2036 int v58; // ebp@8
2037 int v59; // eax@8
2038 unsigned int v60; // eax@8
2039 unsigned int v62; // eax@8
2040 signed int v64; // eax@8
2041 //unsigned __int8 v66; // al@8
2042 char *v67; // eax@9
2043 signed int v70; // ebp@11
2044 signed int v71; // eax@11
2045 unsigned int v72; // eax@11
2046 int v75; // ebp@13
2047 int v76; // eax@13
2048 unsigned int v77; // eax@13
2049 char *v78; // ecx@14
2050 unsigned int v81; // eax@16
2051 int v83; // eax@16
2052 char *v85; // eax@16
2053 int v87; // eax@16
2054 char *v89; // eax@16
2055 int v90; // eax@16
2056 unsigned int v92; // eax@19
2057 int v93; // eax@19
2058 unsigned int v95; // eax@22
2059 int v96; // eax@22
2060 unsigned int v98; // eax@25
2061 int v99; // eax@25
2062 unsigned int v101; // eax@27
2063 int v102; // eax@27
2064 unsigned int v104; // eax@30
2065 unsigned int v106; // eax@32
2066 int v107; // eax@33
2067 unsigned int v109; // eax@36
2068 unsigned int v111; // eax@38
2069 const char *a2; // [sp+14h] [bp-Ch]@4
2070 const char *a2a; // [sp+14h] [bp-Ch]@6
2071 const char *a2b; // [sp+14h] [bp-Ch]@11
2072 const char *a2c; // [sp+14h] [bp-Ch]@16
2073 const char *a2d; // [sp+14h] [bp-Ch]@19
2074 const char *a2e; // [sp+14h] [bp-Ch]@22
2075 const char *a2f; // [sp+14h] [bp-Ch]@25
2076 const char *a2g; // [sp+14h] [bp-Ch]@27
2077 const char *a2h; // [sp+14h] [bp-Ch]@33
2078 int v131; // [sp+18h] [bp-8h]@16
2079 int v132; // [sp+18h] [bp-8h]@19
2080 int v133; // [sp+18h] [bp-8h]@22
2081 int v134; // [sp+18h] [bp-8h]@25
2082 int v135; // [sp+18h] [bp-8h]@27
2083 int v136; // [sp+18h] [bp-8h]@33
2084
2085 //pPlayer = &pParty->pPlayers[uPlayerID-1];
2086 //pPlayer = player;
2087 pRenderer->DrawTextureIndexed(8, 8, pIcons_LOD->LoadTexturePtr("fr_stats", TEXTURE_16BIT_PALETTE)); 2001 pRenderer->DrawTextureIndexed(8, 8, pIcons_LOD->LoadTexturePtr("fr_stats", TEXTURE_16BIT_PALETTE));
2088 sprintf(pTmpBuf.data(), "\f%05d", ui_character_header_text_color); 2002 sprintf(pTmpBuf.data(), "\f%05d", ui_character_header_text_color);
2089 sprintfex(pTmpBuf2.data(), pGlobalTXT_LocalizationStrings[429], player->pName, pClassNames[player->classType]);//"^Pi[%s] %s" / "%s the %s" 2003 sprintfex(pTmpBuf2.data(), pGlobalTXT_LocalizationStrings[429], player->pName, pClassNames[player->classType]);//"^Pi[%s] %s" / "%s the %s"
2090 strcat(pTmpBuf.data(), pTmpBuf2.data()); 2004 strcat(pTmpBuf.data(), pTmpBuf2.data());
2091 sprintfex(pTmpBuf2.data(), "\f00000\r180%s: \f%05d%d\f00000\n\n\n", 2005 sprintfex(pTmpBuf2.data(), "\f00000\r180%s: \f%05d%d\f00000\n\n\n",
2093 player->uSkillPoints ? ui_character_bonus_text_color : ui_character_default_text_color, 2007 player->uSkillPoints ? ui_character_bonus_text_color : ui_character_default_text_color,
2094 player->uSkillPoints); 2008 player->uSkillPoints);
2095 strcat(pTmpBuf.data(), pTmpBuf2.data()); 2009 strcat(pTmpBuf.data(), pTmpBuf2.data());
2096 pGUIWindow_CurrentMenu->DrawText(pFontArrus, 26, 18, 0, pTmpBuf.data(), 0, 0, 0); 2010 pGUIWindow_CurrentMenu->DrawText(pFontArrus, 26, 18, 0, pTmpBuf.data(), 0, 0, 0);
2097 2011
2098 v10 = 53; 2012 //First column(Первая колонка)
2099 v7 = player->GetBaseStrength(); 2013 pY = 53;
2100 v8 = player->GetActualMight(); 2014 sprintf(pTmpBuf.data(), "%s\f%05u\r424%d\f00000 /\t185%d\n", pGlobalTXT_LocalizationStrings[144],
2101 v9 = UI_GetHealthManaStringColor(v8, v7); 2015 UI_GetHealthManaStringColor(player->GetActualMight(), player->GetBaseStrength()),
2102 sprintf(pTmpBuf.data(), "%s\f%05u\r424%d\f00000 /\t185%d\n", pGlobalTXT_LocalizationStrings[144], v9, v8, v7);//Might 2016 player->GetActualMight(), player->GetBaseStrength());//Might
2103 pGUIWindow_CurrentMenu->DrawText(pFontArrus, 26, v10, 0, pTmpBuf.data(), 0, 0, 0); 2017 pGUIWindow_CurrentMenu->DrawText(pFontArrus, 26, pY, 0, pTmpBuf.data(), 0, 0, 0);
2104 2018
2105 v10 += LOBYTE(pFontArrus->uFontHeight) - 2; 2019 pY += LOBYTE(pFontArrus->uFontHeight) - 2;
2106 v13 = player->GetBaseIntelligence(); 2020 sprintf(pTmpBuf.data(), "%s\f%05u\r424%d\f00000 /\t185%d\n", pGlobalTXT_LocalizationStrings[116],
2107 v14 = player->GetActualIntelligence(); 2021 UI_GetHealthManaStringColor(player->GetActualIntelligence(), player->GetBaseIntelligence()),
2108 v15 = UI_GetHealthManaStringColor(v14, v13); 2022 player->GetActualIntelligence(), player->GetBaseIntelligence());//Intellect
2109 sprintf(pTmpBuf.data(), "%s\f%05u\r424%d\f00000 /\t185%d\n", pGlobalTXT_LocalizationStrings[116], v15, v14, v13);//Intellect 2023 pGUIWindow_CurrentMenu->DrawText(pFontArrus, 26, pY, 0, pTmpBuf.data(), 0, 0, 0);
2110 pGUIWindow_CurrentMenu->DrawText(pFontArrus, 26, v10, 0, pTmpBuf.data(), 0, 0, 0); 2024
2111 2025 pY += LOBYTE(pFontArrus->uFontHeight) - 2;
2112 v10 += LOBYTE(pFontArrus->uFontHeight) - 2; 2026 sprintf(pTmpBuf.data(), "%s\f%05u\r424%d\f00000 /\t185%d\n", pGlobalTXT_LocalizationStrings[163],
2113 v19 = player->GetBaseWillpower(); 2027 UI_GetHealthManaStringColor(player->GetActualWillpower(), player->GetBaseWillpower()),
2114 v20 = player->GetActualWillpower(); 2028 player->GetActualWillpower(), player->GetBaseWillpower());//
2115 v21 = UI_GetHealthManaStringColor(v20, v19); 2029 pGUIWindow_CurrentMenu->DrawText(pFontArrus, 26, pY, 0, pTmpBuf.data(), 0, 0, 0);
2116 sprintf(pTmpBuf.data(), "%s\f%05u\r424%d\f00000 /\t185%d\n", pGlobalTXT_LocalizationStrings[163], v21, v20, v19);// 2030
2117 pGUIWindow_CurrentMenu->DrawText(pFontArrus, 26, v10, 0, pTmpBuf.data(), 0, 0, 0); 2031 pY += LOBYTE(pFontArrus->uFontHeight) - 2;
2118 2032 sprintf(pTmpBuf.data(), "%s\f%05u\r424%d\f00000 /\t185%d\n", pGlobalTXT_LocalizationStrings[75],
2119 v10 += LOBYTE(pFontArrus->uFontHeight) - 2; 2033 UI_GetHealthManaStringColor(player->GetActualEndurance(), player->GetBaseEndurance()),
2120 v25 = player->GetBaseEndurance(); 2034 player->GetActualEndurance(), player->GetBaseEndurance());//
2121 v26 = player->GetActualEndurance(); 2035 pGUIWindow_CurrentMenu->DrawText(pFontArrus, 26, pY, 0, pTmpBuf.data(), 0, 0, 0);
2122 v27 = UI_GetHealthManaStringColor(v26, v25); 2036
2123 sprintf(pTmpBuf.data(), "%s\f%05u\r424%d\f00000 /\t185%d\n", pGlobalTXT_LocalizationStrings[75], v27, v26, v25);// 2037 pY += LOBYTE(pFontArrus->uFontHeight) - 2;
2124 pGUIWindow_CurrentMenu->DrawText(pFontArrus, 26, v10, 0, pTmpBuf.data(), 0, 0, 0); 2038 sprintf(pTmpBuf.data(), "%s\f%05u\r424%d\f00000 /\t185%d\n", pGlobalTXT_LocalizationStrings[1],
2125 2039 UI_GetHealthManaStringColor(player->GetActualAccuracy(), player->GetBaseAccuracy()),
2126 v10 += LOBYTE(pFontArrus->uFontHeight) - 2; 2040 player->GetActualAccuracy(), player->GetBaseAccuracy());
2127 v31 = player->GetBaseAccuracy(); 2041 pGUIWindow_CurrentMenu->DrawText(pFontArrus, 26, pY, 0, pTmpBuf.data(), 0, 0, 0);
2128 v32 = player->GetActualAccuracy(); 2042
2129 v33 = UI_GetHealthManaStringColor(v32, v31); 2043 pY += LOBYTE(pFontArrus->uFontHeight) - 2;
2130 sprintf(pTmpBuf.data(), "%s\f%05u\r424%d\f00000 /\t185%d\n", pGlobalTXT_LocalizationStrings[1], v33, v32, v31); 2044 sprintf(pTmpBuf.data(), "%s\f%05u\r424%d\f00000 /\t185%d\n", pGlobalTXT_LocalizationStrings[211],
2131 pGUIWindow_CurrentMenu->DrawText(pFontArrus, 26, v10, 0, pTmpBuf.data(), 0, 0, 0); 2045 UI_GetHealthManaStringColor(player->GetActualSpeed(), player->GetBaseSpeed()),
2132 2046 player->GetActualSpeed(), player->GetBaseSpeed());
2133 v10 += LOBYTE(pFontArrus->uFontHeight) - 2; 2047 pGUIWindow_CurrentMenu->DrawText(pFontArrus, 26, pY, 0, pTmpBuf.data(), 0, 0, 0);
2134 v37 = player->GetBaseSpeed(); 2048
2135 v38 = player->GetActualSpeed(); 2049 pY += LOBYTE(pFontArrus->uFontHeight) - 2;
2136 v39 = UI_GetHealthManaStringColor(v38, v37); 2050 sprintf(pTmpBuf.data(), "%s\f%05u\r424%d\f00000 /\t185%d\n\n", pGlobalTXT_LocalizationStrings[136],
2137 sprintf(pTmpBuf.data(), "%s\f%05u\r424%d\f00000 /\t185%d\n", pGlobalTXT_LocalizationStrings[211], v39, v38, v37); 2051 UI_GetHealthManaStringColor(player->GetActualLuck(), player->GetBaseLuck()),
2138 pGUIWindow_CurrentMenu->DrawText(pFontArrus, 26, v10, 0, pTmpBuf.data(), 0, 0, 0); 2052 player->GetActualLuck(), player->GetBaseLuck());
2139 2053 pGUIWindow_CurrentMenu->DrawText(pFontArrus, 26, pY, 0, pTmpBuf.data(), 0, 0, 0);
2140 v10 += LOBYTE(pFontArrus->uFontHeight) - 2; 2054
2141 v43 = player->GetBaseLuck(); 2055 a2 = "%s\f%05u\r424%d\f00000 /\t185%d\n";
2142 v44 = player->GetActualLuck(); 2056 if ( player->GetMaxHealth() >= 1000 )
2143 v45 = UI_GetHealthManaStringColor(v44, v43); 2057 a2 = "%s\f%05u\r388%d\f00000 / %d\n";
2144 sprintf(pTmpBuf.data(), "%s\f%05u\r424%d\f00000 /\t185%d\n\n", pGlobalTXT_LocalizationStrings[136], v45, v44, v43); 2058 pY += 2 * LOBYTE(pFontArrus->uFontHeight) + 5;
2145 pGUIWindow_CurrentMenu->DrawText(pFontArrus, 26, v10, 0, pTmpBuf.data(), 0, 0, 0); 2059 sprintf(pTmpBuf.data(), a2, pGlobalTXT_LocalizationStrings[108],
2146 2060 UI_GetHealthManaStringColor(player->sHealth, player->GetMaxHealth()),
2147 a2 = "%s\f%05u\r424%d\f00000 /\t185%d\n"; 2061 player->sHealth, player->GetMaxHealth());
2148 v10 += 2 * LOBYTE(pFontArrus->uFontHeight) + 5; 2062 pGUIWindow_CurrentMenu->DrawText(pFontArrus, 26, pY, 0, pTmpBuf.data(), 0, 0, 0);
2149 if ( player->GetMaxHealth() >= 1000 ) 2063
2150 a2 = "%s\f%05u\r388%d\f00000 / %d\n"; 2064 a2 = "%s\f%05u\r424%d\f00000 /\t185%d\n";
2151 v49 = player->GetMaxHealth(); 2065 if ( player->GetMaxMana() >= 1000 )
2152 v50 = UI_GetHealthManaStringColor(player->sHealth, v49); 2066 a2 = "%s\f%05u\r388%d\f00000 / %d\n";
2153 sprintf(pTmpBuf.data(), a2, pGlobalTXT_LocalizationStrings[108], v50, player->sHealth, v49); 2067 pY += LOBYTE(pFontArrus->uFontHeight) - 2;
2154 pGUIWindow_CurrentMenu->DrawText(pFontArrus, 26, v10, 0, pTmpBuf.data(), 0, 0, 0); 2068 sprintf(pTmpBuf.data(), a2, pGlobalTXT_LocalizationStrings[212],
2155 2069 UI_GetHealthManaStringColor(player->sMana, player->GetMaxMana()),
2156 a2a = "%s\f%05u\r424%d\f00000 /\t185%d\n"; 2070 player->sMana, player->GetMaxMana());
2157 v10 += LOBYTE(pFontArrus->uFontHeight) - 2; 2071 pGUIWindow_CurrentMenu->DrawText(pFontArrus, 26, pY, 0, pTmpBuf.data(), 0, 0, 0);
2158 if ( player->GetMaxMana() >= 1000 ) 2072
2159 a2a = "%s\f%05u\r388%d\f00000 / %d\n"; 2073 pY += LOBYTE(pFontArrus->uFontHeight) - 2;
2160 v53 = player->GetMaxMana(); 2074 sprintf(pTmpBuf.data(), "%s\f%05u\r424%d\f00000 /\t185%d\n\n", pGlobalTXT_LocalizationStrings[12],
2161 v54 = UI_GetHealthManaStringColor(player->sMana, v53); 2075 UI_GetHealthManaStringColor(player->GetActualAC(), player->GetBaseAC()),
2162 sprintf(pTmpBuf.data(), a2a, pGlobalTXT_LocalizationStrings[212], v54, player->sMana, v53); 2076 player->GetActualAC(), player->GetBaseAC());
2163 pGUIWindow_CurrentMenu->DrawText(pFontArrus, 26, v10, 0, pTmpBuf.data(), 0, 0, 0); 2077 pGUIWindow_CurrentMenu->DrawText(pFontArrus, 26, pY, 0, pTmpBuf.data(), 0, 0, 0);
2164 2078
2165 v10 += LOBYTE(pFontArrus->uFontHeight) - 2; 2079 pY += 2 * LOBYTE(pFontArrus->uFontHeight) - 2;
2166 v58 = player->GetBaseAC(); 2080 sprintf(pTmpBuf.data(), "%s: \f%05d%s\n", pGlobalTXT_LocalizationStrings[47], GetConditionDrawColor(player->GetMajorConditionIdx()),
2167 v59 = player->GetActualAC(); 2081 aCharacterConditionNames[player->GetMajorConditionIdx()]);//Состояние
2168 v60 = UI_GetHealthManaStringColor(v59, v58); 2082 pGUIWindow_CurrentMenu->DrawTextInRect(pFontArrus, 26, pY, 0, pTmpBuf.data(), 226, 0);
2169 sprintf(pTmpBuf.data(), "%s\f%05u\r424%d\f00000 /\t185%d\n\n", pGlobalTXT_LocalizationStrings[12], v60, v59, v58); 2083
2170 pGUIWindow_CurrentMenu->DrawText(pFontArrus, 26, v10, 0, pTmpBuf.data(), 0, 0, 0); 2084 pY += LOBYTE(pFontArrus->uFontHeight) + - 1;
2171 2085 pText = pGlobalTXT_LocalizationStrings[153];//Нет
2172 v10 += 2 * LOBYTE(pFontArrus->uFontHeight) - 2; 2086 if (player->uQuickSpell)
2173 v62 = player->GetMajorConditionIdx(); 2087 pText = pSpellStats->pInfos[player->uQuickSpell].pShortName;
2174 v64 = GetConditionDrawColor(v62); 2088 sprintf(pTmpBuf.data(), "%s: %s", pGlobalTXT_LocalizationStrings[172], pText);//Б. применение
2175 sprintf(pTmpBuf.data(), "%s: \f%05d%s\n", pGlobalTXT_LocalizationStrings[47], v64, aCharacterConditionNames[v62]); 2089 pGUIWindow_CurrentMenu->DrawTextInRect(pFontArrus, 26, pY, 0, pTmpBuf.data(), 226, 0);
2176 pGUIWindow_CurrentMenu->DrawTextInRect(pFontArrus, 0x1Au, v10, 0, pTmpBuf.data(), 226, 0); 2090
2177 2091 //Second column (Вторая колонка)
2178 v10 += LOBYTE(pFontArrus->uFontHeight) + - 1; 2092 pY = 50;
2179 if (player->uQuickSpell) 2093 sprintf(pTmpBuf.data(), "%s\f%05u\t100%d\f00000 / %d\n", pGlobalTXT_LocalizationStrings[5],
2180 v67 = pSpellStats->pInfos[player->uQuickSpell].pShortName; 2094 UI_GetHealthManaStringColor(player->GetActualAge(), player->GetBaseAge()),
2181 else 2095 player->GetActualAge(), player->GetBaseAge());
2182 v67 = pGlobalTXT_LocalizationStrings[153]; 2096 pGUIWindow_CurrentMenu->DrawText(pFontArrus, 266, pY, 0, pTmpBuf.data(), 0, 0, 0);
2183 sprintf(pTmpBuf.data(), "%s: %s", pGlobalTXT_LocalizationStrings[172], v67); 2097
2184 pGUIWindow_CurrentMenu->DrawTextInRect(pFontArrus, 0x1Au, v10, 0, pTmpBuf.data(), 226, 0); 2098 a2 = "%s\f%05u\t100%d\f00000 / %d\n";
2185 2099 if ( player->GetBaseLevel() > 99 )
2186 v10 = 50; 2100 a2 = "%s\f%05u\t180%d\f00000 / %d\n";
2187 v70 = player->GetBaseAge(); 2101 pY += LOBYTE(pFontArrus->uFontHeight) - 2;
2188 v71 = player->GetActualAge(); 2102 sprintf(pTmpBuf.data(), a2, pGlobalTXT_LocalizationStrings[131],//Уров.
2189 v72 = UI_GetHealthManaStringColor(v71, v70); 2103 UI_GetHealthManaStringColor(player->GetActualLevel(), player->GetBaseLevel()),
2190 sprintf(pTmpBuf.data(), "%s\f%05u\t100%d\f00000 / %d\n", pGlobalTXT_LocalizationStrings[5], v72, v71, v70); 2104 player->GetActualLevel(), player->GetBaseLevel());
2191 pGUIWindow_CurrentMenu->DrawText(pFontArrus, 266, v10, 0, pTmpBuf.data(), 0, 0, 0); 2105 pGUIWindow_CurrentMenu->DrawText(pFontArrus, 266, pY, 0, pTmpBuf.data(), 0, 0, 0);
2192 2106
2193 a2b = "%s\f%05u\t100%d\f00000 / %d\n"; 2107 pY += LOBYTE(pFontArrus->uFontHeight) - 2;
2194 v10 += LOBYTE(pFontArrus->uFontHeight) - 2; 2108 pText = pGlobalTXT_LocalizationStrings[17]; // "Exp."
2195 if ( player->GetBaseLevel() > 99 ) 2109 if (player->uExperience <= 9999999)
2196 a2b = "%s\f%05u\t180%d\f00000 / %d\n"; 2110 pText = pGlobalTXT_LocalizationStrings[83]; // "Experience"
2197 v75 = player->GetBaseLevel(); 2111 sprintf(pTmpBuf.data(), "%s\r180\f%05d%lu\f00000\n\n", pText, player->GetExperienceDisplayColor(), LODWORD(player->uExperience));
2198 v76 = player->GetActualLevel(); 2112 pGUIWindow_CurrentMenu->DrawText(pFontArrus, 266, pY, 0, pTmpBuf.data(), 0, 0, 0);
2199 v77 = UI_GetHealthManaStringColor(v76, v75); 2113
2200 sprintf(pTmpBuf.data(), a2b, pGlobalTXT_LocalizationStrings[131], v77, v76, v75); 2114 pY += 2 * LOBYTE(pFontArrus->uFontHeight);
2201 pGUIWindow_CurrentMenu->DrawText(pFontArrus, 266, v10, 0, pTmpBuf.data(), 0, 0, 0); 2115 sprintf(pTmpBuf.data(), "%s\t100%+d\n", pGlobalTXT_LocalizationStrings[18], player->GetActualAttack(0));
2202 2116 pGUIWindow_CurrentMenu->DrawText(pFontArrus, 266, pY, 0, pTmpBuf.data(), 0, 0, 0);
2203 v10 += LOBYTE(pFontArrus->uFontHeight) - 2; 2117
2204 if (player->uExperience <= 9999999) 2118 pY += LOBYTE(pFontArrus->uFontHeight) - 2;
2205 v78 = pGlobalTXT_LocalizationStrings[83]; // "Experience" 2119 sprintf(pTmpBuf.data(), "%s\t100 %s\n", pGlobalTXT_LocalizationStrings[53], player->GetMeleeDamageString());
2206 else 2120 pGUIWindow_CurrentMenu->DrawText(pFontArrus, 266, pY, 0, pTmpBuf.data(), 0, 0, 0);
2207 v78 = pGlobalTXT_LocalizationStrings[17]; // "Exp." 2121
2208 v81 = player->GetExperienceDisplayColor(); 2122 pY += LOBYTE(pFontArrus->uFontHeight) - 2;
2209 sprintf(pTmpBuf.data(), "%s\r180\f%05d%lu\f00000\n\n", v78, v81, LODWORD(player->uExperience)); 2123 sprintf(pTmpBuf.data(), "%s\t100%+d\n", pGlobalTXT_LocalizationStrings[203], player->GetRangedAttack());
2210 pGUIWindow_CurrentMenu->DrawText(pFontArrus, 266, v10, 0, pTmpBuf.data(), 0, 0, 0); 2124 pGUIWindow_CurrentMenu->DrawText(pFontArrus, 266, pY, 0, pTmpBuf.data(), 0, 0, 0);
2211 2125
2212 v10 += 2 * LOBYTE(pFontArrus->uFontHeight); 2126 pY += LOBYTE(pFontArrus->uFontHeight) - 2;
2213 v83 = player->GetActualAttack(0); 2127 sprintf(pTmpBuf.data(), "%s\t100 %s\n\n", pGlobalTXT_LocalizationStrings[53], player->GetRangedDamageString());
2214 sprintf(pTmpBuf.data(), "%s\t100%+d\n", pGlobalTXT_LocalizationStrings[18], v83); 2128 pGUIWindow_CurrentMenu->DrawText(pFontArrus, 266, pY, 0, pTmpBuf.data(), 0, 0, 0);
2215 pGUIWindow_CurrentMenu->DrawText(pFontArrus, 266, v10, 0, pTmpBuf.data(), 0, 0, 0); 2129
2216 2130 a2 = format_4E2E10;
2217 v10 += LOBYTE(pFontArrus->uFontHeight) - 2; 2131 if ( player->GetActualResistance(CHARACTER_ATTRIBUTE_RESIST_FIRE) > 99 || player->GetBaseResistance(CHARACTER_ATTRIBUTE_RESIST_FIRE) > 99 )
2218 v85 = player->GetMeleeDamageString(); 2132 a2 = "%s\f%05u\t180%d\f00000 / %d\n";
2219 sprintf(pTmpBuf.data(), "%s\t100 %s\n", pGlobalTXT_LocalizationStrings[53], v85); 2133 pY += 2 * LOBYTE(pFontArrus->uFontHeight) - 4;
2220 pGUIWindow_CurrentMenu->DrawText(pFontArrus, 266, v10, 0, pTmpBuf.data(), 0, 0, 0); 2134 sprintf(pTmpBuf.data(), a2, pGlobalTXT_LocalizationStrings[87],
2221 2135 UI_GetHealthManaStringColor(player->GetActualResistance(CHARACTER_ATTRIBUTE_RESIST_FIRE), player->GetBaseResistance(CHARACTER_ATTRIBUTE_RESIST_FIRE)),
2222 v10 += LOBYTE(pFontArrus->uFontHeight) - 2; 2136 player->GetActualResistance(CHARACTER_ATTRIBUTE_RESIST_FIRE), player->GetBaseResistance(CHARACTER_ATTRIBUTE_RESIST_FIRE));
2223 v87 = player->GetRangedAttack(); 2137 pGUIWindow_CurrentMenu->DrawText(pFontArrus, 266, pY, 0, pTmpBuf.data(), 0, 0, 0);
2224 sprintf(pTmpBuf.data(), "%s\t100%+d\n", pGlobalTXT_LocalizationStrings[203], v87); 2138
2225 pGUIWindow_CurrentMenu->DrawText(pFontArrus, 266, v10, 0, pTmpBuf.data(), 0, 0, 0); 2139 a2 = format_4E2E10;
2226 2140 if ( player->GetActualResistance(CHARACTER_ATTRIBUTE_RESIST_AIR) > 99 || player->GetBaseResistance(CHARACTER_ATTRIBUTE_RESIST_AIR) > 99 )
2227 v10 += LOBYTE(pFontArrus->uFontHeight) - 2; 2141 a2 = "%s\f%05u\t180%d\f00000 / %d\n";
2228 v89 = player->GetRangedDamageString(); 2142 pY += LOBYTE(pFontArrus->uFontHeight) - 2;
2229 sprintf(pTmpBuf.data(), "%s\t100 %s\n\n", pGlobalTXT_LocalizationStrings[53], v89); 2143 sprintf(pTmpBuf.data(), a2, pGlobalTXT_LocalizationStrings[6],
2230 pGUIWindow_CurrentMenu->DrawText(pFontArrus, 266, v10, 0, pTmpBuf.data(), 0, 0, 0); 2144 UI_GetHealthManaStringColor(player->GetActualResistance(CHARACTER_ATTRIBUTE_RESIST_AIR), player->GetBaseResistance(CHARACTER_ATTRIBUTE_RESIST_AIR)),
2231 2145 player->GetActualResistance(CHARACTER_ATTRIBUTE_RESIST_AIR), player->GetBaseResistance(CHARACTER_ATTRIBUTE_RESIST_AIR));
2232 a2c = format_4E2E10; 2146 pGUIWindow_CurrentMenu->DrawText(pFontArrus, 266, pY, 0, pTmpBuf.data(), 0, 0, 0);
2233 v10 += 2 * LOBYTE(pFontArrus->uFontHeight) - 4; 2147
2234 v131 = player->GetActualResistance(CHARACTER_ATTRIBUTE_RESIST_FIRE); 2148 a2 = format_4E2E10;
2235 v90 = player->GetBaseResistance(CHARACTER_ATTRIBUTE_RESIST_FIRE); 2149 if ( player->GetActualResistance(CHARACTER_ATTRIBUTE_RESIST_WATER) > 99 || player->GetBaseResistance(CHARACTER_ATTRIBUTE_RESIST_WATER) > 99 )
2236 if ( v131 > 99 || v90 > 99 ) 2150 a2 = "%s\f%05u\t180%d\f00000 / %d\n";
2237 a2c = "%s\f%05u\t180%d\f00000 / %d\n"; 2151 pY += LOBYTE(pFontArrus->uFontHeight) - 2;
2238 v92 = UI_GetHealthManaStringColor(v131, v90); 2152 sprintf(pTmpBuf.data(), a2, pGlobalTXT_LocalizationStrings[240],
2239 sprintf(pTmpBuf.data(), a2c, pGlobalTXT_LocalizationStrings[87], v92, v131, v90); 2153 UI_GetHealthManaStringColor(player->GetActualResistance(CHARACTER_ATTRIBUTE_RESIST_WATER), player->GetBaseResistance(CHARACTER_ATTRIBUTE_RESIST_WATER)),
2240 pGUIWindow_CurrentMenu->DrawText(pFontArrus, 266, v10, 0, pTmpBuf.data(), 0, 0, 0); 2154 player->GetActualResistance(CHARACTER_ATTRIBUTE_RESIST_WATER), player->GetBaseResistance(CHARACTER_ATTRIBUTE_RESIST_WATER));
2241 2155 pGUIWindow_CurrentMenu->DrawText(pFontArrus, 266, pY, 0, pTmpBuf.data(), 0, 0, 0);
2242 a2d = format_4E2E10; 2156
2243 v10 += LOBYTE(pFontArrus->uFontHeight) - 2; 2157 a2 = format_4E2E10;
2244 v132 = player->GetActualResistance(CHARACTER_ATTRIBUTE_RESIST_AIR); 2158 if ( player->GetActualResistance(CHARACTER_ATTRIBUTE_RESIST_EARTH) > 99 )
2245 v93 = player->GetBaseResistance(CHARACTER_ATTRIBUTE_RESIST_AIR); 2159 a2 = "%s\f%05u\t180%d\f00000 / %d\n";
2246 if ( v132 > 99 || v93 > 99 ) 2160 pY += LOBYTE(pFontArrus->uFontHeight) - 2;
2247 a2d = "%s\f%05u\t180%d\f00000 / %d\n"; 2161 sprintf(pTmpBuf.data(), a2, pGlobalTXT_LocalizationStrings[70],
2248 v95 = UI_GetHealthManaStringColor(v132, v93); 2162 UI_GetHealthManaStringColor(player->GetActualResistance(CHARACTER_ATTRIBUTE_RESIST_EARTH), player->GetBaseResistance(CHARACTER_ATTRIBUTE_RESIST_EARTH)),
2249 sprintf(pTmpBuf.data(), a2d, pGlobalTXT_LocalizationStrings[6], v95, v132, v93); 2163 player->GetActualResistance(CHARACTER_ATTRIBUTE_RESIST_EARTH), player->GetBaseResistance(CHARACTER_ATTRIBUTE_RESIST_EARTH));
2250 pGUIWindow_CurrentMenu->DrawText(pFontArrus, 266, v10, 0, pTmpBuf.data(), 0, 0, 0); 2164 pGUIWindow_CurrentMenu->DrawText(pFontArrus, 266, pY, 0, pTmpBuf.data(), 0, 0, 0);
2251 2165
2252 a2e = format_4E2E10; 2166 a2 = format_4E2E10;
2253 v10 += LOBYTE(pFontArrus->uFontHeight) - 2; 2167 if ( player->GetActualResistance(CHARACTER_ATTRIBUTE_RESIST_MIND) > 99 || player->GetBaseResistance(CHARACTER_ATTRIBUTE_RESIST_MIND) > 99 )
2254 v133 = player->GetActualResistance(CHARACTER_ATTRIBUTE_RESIST_WATER); 2168 a2 = "%s\f%05u\t180%d\f00000 / %d\n";
2255 v96 = player->GetBaseResistance(CHARACTER_ATTRIBUTE_RESIST_WATER); 2169 pY += LOBYTE(pFontArrus->uFontHeight) - 2;
2256 if ( v133 > 99 || v96 > 99 ) 2170 sprintf(pTmpBuf.data(), a2, pGlobalTXT_LocalizationStrings[142],
2257 a2e = "%s\f%05u\t180%d\f00000 / %d\n"; 2171 UI_GetHealthManaStringColor(player->GetActualResistance(CHARACTER_ATTRIBUTE_RESIST_MIND), player->GetBaseResistance(CHARACTER_ATTRIBUTE_RESIST_MIND)),
2258 v98 = UI_GetHealthManaStringColor(v133, v96); 2172 player->GetActualResistance(CHARACTER_ATTRIBUTE_RESIST_MIND), player->GetBaseResistance(CHARACTER_ATTRIBUTE_RESIST_MIND));
2259 sprintf(pTmpBuf.data(), a2e, pGlobalTXT_LocalizationStrings[240], v98, v133, v96); 2173 if ( player->classType == PLAYER_CLASS_LICH && player->GetBaseResistance(CHARACTER_ATTRIBUTE_RESIST_MIND) == 200 )
2260 pGUIWindow_CurrentMenu->DrawText(pFontArrus, 266, v10, 0, pTmpBuf.data(), 0, 0, 0); 2174 sprintf(pTmpBuf.data(), format_4E2E00, pGlobalTXT_LocalizationStrings[142],
2261 2175 UI_GetHealthManaStringColor(player->GetActualResistance(CHARACTER_ATTRIBUTE_RESIST_MIND), 200), pGlobalTXT_LocalizationStrings[625]);
2262 a2f = format_4E2E10; 2176 pGUIWindow_CurrentMenu->DrawText(pFontArrus, 266, pY, 0, pTmpBuf.data(), 0, 0, 0);
2263 v10 += LOBYTE(pFontArrus->uFontHeight) - 2; 2177
2264 v134 = player->GetActualResistance(CHARACTER_ATTRIBUTE_RESIST_EARTH); 2178 a2 = format_4E2E10;
2265 v99 = player->GetBaseResistance(CHARACTER_ATTRIBUTE_RESIST_EARTH); 2179 if ( player->GetActualResistance(CHARACTER_ATTRIBUTE_RESIST_BODY) > 99 || player->GetBaseResistance(CHARACTER_ATTRIBUTE_RESIST_BODY) > 99 )
2266 if ( v134 > 99 ) 2180 a2 = "%s\f%05u\t180%d\f00000 / %d\n";
2267 a2f = "%s\f%05u\t180%d\f00000 / %d\n"; 2181 pY += LOBYTE(pFontArrus->uFontHeight) - 2;
2268 v101 = UI_GetHealthManaStringColor(v134, v99); 2182 sprintf(pTmpBuf.data(), a2, pGlobalTXT_LocalizationStrings[29],
2269 sprintf(pTmpBuf.data(), a2f, pGlobalTXT_LocalizationStrings[70], v101, v134, v99); 2183 UI_GetHealthManaStringColor(player->GetActualResistance(CHARACTER_ATTRIBUTE_RESIST_BODY), player->GetBaseResistance(CHARACTER_ATTRIBUTE_RESIST_BODY)),
2270 pGUIWindow_CurrentMenu->DrawText(pFontArrus, 266, v10, 0, pTmpBuf.data(), 0, 0, 0); 2184 player->GetActualResistance(CHARACTER_ATTRIBUTE_RESIST_BODY), player->GetBaseResistance(CHARACTER_ATTRIBUTE_RESIST_BODY));
2271 2185 if ( player->classType == PLAYER_CLASS_LICH && player->GetBaseResistance(CHARACTER_ATTRIBUTE_RESIST_BODY) == 200 )
2272 a2g = format_4E2E10; 2186 sprintf(pTmpBuf.data(), format_4E2E00, pGlobalTXT_LocalizationStrings[29],
2273 v10 += LOBYTE(pFontArrus->uFontHeight) - 2; 2187 UI_GetHealthManaStringColor(player->GetActualResistance(CHARACTER_ATTRIBUTE_RESIST_BODY), 200), pGlobalTXT_LocalizationStrings[625]);
2274 v135 = player->GetActualResistance(CHARACTER_ATTRIBUTE_RESIST_MIND); 2188 pGUIWindow_CurrentMenu->DrawText(pFontArrus, 266, pY, 0, pTmpBuf.data(), 0, 0, 0);
2275 v102 = player->GetBaseResistance(CHARACTER_ATTRIBUTE_RESIST_MIND);
2276 if ( v135 > 99 || v102 > 99 )
2277 a2g = "%s\f%05u\t180%d\f00000 / %d\n";
2278 v104 = UI_GetHealthManaStringColor(v135, v102);
2279 sprintf(pTmpBuf.data(), a2g, pGlobalTXT_LocalizationStrings[142], v104, v135, v102);
2280 if ( player->classType == PLAYER_CLASS_LICH && v102 == 200 )
2281 {
2282 v106 = UI_GetHealthManaStringColor(v135, 200);
2283 sprintf(pTmpBuf.data(), format_4E2E00, pGlobalTXT_LocalizationStrings[142], v106, pGlobalTXT_LocalizationStrings[625]);
2284 }
2285 pGUIWindow_CurrentMenu->DrawText(pFontArrus, 266, v10, 0, pTmpBuf.data(), 0, 0, 0);
2286
2287 a2h = format_4E2E10;
2288 v10 += LOBYTE(pFontArrus->uFontHeight) - 2;
2289 v136 = player->GetActualResistance(CHARACTER_ATTRIBUTE_RESIST_BODY);
2290 v107 = player->GetBaseResistance(CHARACTER_ATTRIBUTE_RESIST_BODY);
2291 if ( v136 > 99 || v107 > 99 )
2292 a2h = "%s\f%05u\t180%d\f00000 / %d\n";
2293 v109 = UI_GetHealthManaStringColor(v136, v107);
2294 sprintf(pTmpBuf.data(), a2h, pGlobalTXT_LocalizationStrings[29], v109, v136, v107);
2295 if ( player->classType == PLAYER_CLASS_LICH && v107 == 200 )
2296 {
2297 v111 = UI_GetHealthManaStringColor(v136, 200);
2298 sprintf(pTmpBuf.data(), format_4E2E00, pGlobalTXT_LocalizationStrings[29], v111, pGlobalTXT_LocalizationStrings[625]);
2299 }
2300 pGUIWindow_CurrentMenu->DrawText(pFontArrus, 266, v10, 0, pTmpBuf.data(), 0, 0, 0);
2301 } 2189 }
2302 2190
2303 bool awardSort (int i,int j) { 2191 bool awardSort (int i, int j)
2304 if (pAwards[i].uPriority == 0) //none 2192 {
2305 { 2193 if (pAwards[i].uPriority == 0) //none
2306 return false; 2194 return false;
2307 } 2195 else if (pAwards[j].uPriority == 0)
2308 else if (pAwards[j].uPriority == 0) 2196 return true;
2309 { 2197 else if(pAwards[i].uPriority == 1) //fines,arena stuff,etc
2310 return true; 2198 return false;
2311 } 2199 else if(pAwards[j].uPriority == 1)
2312 else if(pAwards[i].uPriority == 1) //fines,arena stuff,etc 2200 return true;
2313 { 2201 else if(pAwards[i].uPriority == 5) //joined guilds
2314 return false; 2202 return false;
2315 } 2203 else if(pAwards[j].uPriority == 5)
2316 else if(pAwards[j].uPriority == 1) 2204 return true;
2317 { 2205 else
2318 return true; 2206 return (pAwards[i].uPriority < pAwards[j].uPriority);
2319 }
2320 else if(pAwards[i].uPriority == 5) //joined guilds
2321 {
2322 return false;
2323 }
2324 else if(pAwards[j].uPriority == 5)
2325 {
2326 return true;
2327 }
2328 else
2329 {
2330 return (pAwards[i].uPriority<pAwards[j].uPriority);
2331 }
2332 } 2207 }
2333 2208
2334 //----- (00419100) -------------------------------------------------------- 2209 //----- (00419100) --------------------------------------------------------
2335 void FillAwardsData() 2210 void FillAwardsData()
2336 { 2211 {
2337 Player* pPlayer = pPlayers[uActiveCharacter]; 2212 Player* pPlayer = pPlayers[uActiveCharacter];
2338 2213
2339 memset(achieved_awards.data(), 0, 4000); 2214 memset(achieved_awards.data(), 0, 4000);
2340 num_achieved_awards = 0; 2215 num_achieved_awards = 0;
2341 2216
2342 memset(pTmpBuf2.data(), 0, 0x7D0u); 2217 memset(pTmpBuf2.data(), 0, 0x7D0u);
2343 BtnDown_flag = 0; 2218 BtnDown_flag = 0;
2344 BtnUp_flag = 0; 2219 BtnUp_flag = 0;
2345 books_page_number = 0; 2220 books_page_number = 0;
2346 books_primary_item_per_page = 0; 2221 books_primary_item_per_page = 0;
2347 for (int i = 1; i < 105; ++i) 2222 for ( int i = 1; i < 105; ++i )
2348 { 2223 {
2349 if ( _449B57_test_bit(pPlayer->_achieved_awards_bits, i) && pAwards[i].pText ) 2224 if ( _449B57_test_bit(pPlayer->_achieved_awards_bits, i) && pAwards[i].pText )
2350 { 2225 achieved_awards[num_achieved_awards++] = (AwardType)i;
2351 achieved_awards[num_achieved_awards++] = (AwardType)i; 2226 }
2352 } 2227 full_num_items_in_book = num_achieved_awards;
2353 } 2228 num_achieved_awards = 0;
2354 full_num_items_in_book = num_achieved_awards; 2229
2355 num_achieved_awards = 0; 2230 //sort awards index
2356 2231
2357 //sort awards index 2232 if (full_num_items_in_book>0)
2358 2233 {
2359 if (full_num_items_in_book>0) 2234 for (int i = 0; i< full_num_items_in_book; ++i)
2360 { 2235 achieved_awards[full_num_items_in_book+i] = (AwardType)(rand()%16);
2361 for (int i = 0; i< full_num_items_in_book; ++i) 2236 for (int i = 1; i< full_num_items_in_book; ++i)
2362 achieved_awards[full_num_items_in_book+i] = (AwardType)(rand()%16); 2237 {
2363 for (int i = 1; i< full_num_items_in_book; ++i) 2238 for (int j = i; j< full_num_items_in_book; ++j)
2364 { 2239 {
2365 for (int j = i; j< full_num_items_in_book; ++j) 2240 AwardType tmp;
2366 { 2241 if (pAwards[achieved_awards[j]].uPriority < pAwards[achieved_awards[i]].uPriority)
2367 AwardType tmp; 2242 {
2368 if (pAwards[achieved_awards[j]].uPriority < pAwards[achieved_awards[i]].uPriority) 2243 tmp= achieved_awards[j];
2369 { 2244 achieved_awards[j] = achieved_awards[i];
2370 tmp= achieved_awards[j]; 2245 achieved_awards[i] = tmp;
2371 achieved_awards[j] = achieved_awards[i]; 2246 }
2372 achieved_awards[i] = tmp; 2247 }
2373 } 2248 }
2374 } 2249 }
2375 }
2376 }
2377
2378 2250
2379 // if (full_num_items_in_book > 0) 2251 // if (full_num_items_in_book > 0)
2380 /* { 2252 /* {
2381 std::stable_sort(achieved_awards.begin(), achieved_awards.end(), awardSort); 2253 std::stable_sort(achieved_awards.begin(), achieved_awards.end(), awardSort);
2382 }*/ 2254 }*/
2383 } 2255 }
2384
2385 2256
2386 //----- (0043EF2B) -------------------------------------------------------- 2257 //----- (0043EF2B) --------------------------------------------------------
2387 void WetsuitOn( unsigned int uPlayerID ) 2258 void WetsuitOn( unsigned int uPlayerID )
2388 { 2259 {
2389 CHARACTER_RACE player_race; // edi@2 2260 CHARACTER_RACE player_race; // edi@2
2390 signed int player_sex; // eax@2 2261 signed int player_sex; // eax@2
2391 int texture_num; // ecx@5 2262 int texture_num; // ecx@5
2392 char pContainer[20]; // [sp+4h] [bp-1Ch]@7 2263 char pContainer[20]; // [sp+4h] [bp-1Ch]@7
2393 2264
2394 if ( uPlayerID> 0 ) 2265 if ( uPlayerID> 0 )
2395 { 2266 {
2396 player_race = pPlayers[uPlayerID]->GetRace(); 2267 player_race = pPlayers[uPlayerID]->GetRace();
2397 player_sex = pPlayers[uPlayerID]->GetSexByVoice(); 2268 player_sex = pPlayers[uPlayerID]->GetSexByVoice();
2398 if ( player_race == CHARACTER_RACE_DWARF ) 2269 if ( player_race == CHARACTER_RACE_DWARF )
2399 texture_num = (player_sex != 0) + 3; 2270 texture_num = (player_sex != 0) + 3;
2400 else 2271 else
2401 texture_num = (player_sex != 0) + 1; 2272 texture_num = (player_sex != 0) + 1;
2402 wsprintfA(pContainer, "pc23v%dBod", texture_num); 2273 wsprintfA(pContainer, "pc23v%dBod", texture_num);
2403 papredoll_dbods[uPlayerID - 1] = pIcons_LOD->LoadTexture(pContainer, TEXTURE_16BIT_PALETTE); 2274 papredoll_dbods[uPlayerID - 1] = pIcons_LOD->LoadTexture(pContainer, TEXTURE_16BIT_PALETTE);
2404 wsprintfA(pContainer, "pc23v%dlad", texture_num); 2275 wsprintfA(pContainer, "pc23v%dlad", texture_num);
2405 papredoll_dlads[uPlayerID - 1] = pIcons_LOD->LoadTexture(pContainer, TEXTURE_16BIT_PALETTE); 2276 papredoll_dlads[uPlayerID - 1] = pIcons_LOD->LoadTexture(pContainer, TEXTURE_16BIT_PALETTE);
2406 wsprintfA(pContainer, "pc23v%dlau", texture_num); 2277 wsprintfA(pContainer, "pc23v%dlau", texture_num);
2407 papredoll_dlaus[uPlayerID - 1] = pIcons_LOD->LoadTexture(pContainer, TEXTURE_16BIT_PALETTE); 2278 papredoll_dlaus[uPlayerID - 1] = pIcons_LOD->LoadTexture(pContainer, TEXTURE_16BIT_PALETTE);
2408 wsprintfA(pContainer, "pc23v%drh", texture_num); 2279 wsprintfA(pContainer, "pc23v%drh", texture_num);
2409 papredoll_drhs[uPlayerID - 1] = pIcons_LOD->LoadTexture(pContainer, TEXTURE_16BIT_PALETTE); 2280 papredoll_drhs[uPlayerID - 1] = pIcons_LOD->LoadTexture(pContainer, TEXTURE_16BIT_PALETTE);
2410 wsprintfA(pContainer, "pc23v%dlh", texture_num); 2281 wsprintfA(pContainer, "pc23v%dlh", texture_num);
2411 papredoll_dlhs[uPlayerID - 1] = pIcons_LOD->LoadTexture(pContainer, TEXTURE_16BIT_PALETTE); 2282 papredoll_dlhs[uPlayerID - 1] = pIcons_LOD->LoadTexture(pContainer, TEXTURE_16BIT_PALETTE);
2412 wsprintfA(pContainer, "pc23v%dlhu", texture_num); 2283 wsprintfA(pContainer, "pc23v%dlhu", texture_num);
2413 papredoll_dlhus[uPlayerID - 1] = pIcons_LOD->LoadTexture(pContainer, TEXTURE_16BIT_PALETTE); 2284 papredoll_dlhus[uPlayerID - 1] = pIcons_LOD->LoadTexture(pContainer, TEXTURE_16BIT_PALETTE);
2414 2285
2415 if ( pPlayers[uPlayerID]->uCurrentFace == 12 || pPlayers[uPlayerID]->uCurrentFace == 13 ) 2286 if ( pPlayers[uPlayerID]->uCurrentFace == 12 || pPlayers[uPlayerID]->uCurrentFace == 13 )
2416 papredoll_dbrds[pPlayers[uPlayerID]->uCurrentFace] = 0; 2287 papredoll_dbrds[pPlayers[uPlayerID]->uCurrentFace] = 0;
2417 2288 papredoll_flying_feet[pPlayers[uPlayerID]->uCurrentFace] = 0;
2418 papredoll_flying_feet[pPlayers[uPlayerID]->uCurrentFace] = 0; 2289 IsPlayerWearingWatersuit[uPlayerID] = 1;
2419 IsPlayerWearingWatersuit[uPlayerID] = 1; 2290 }
2420 } 2291 }
2421 }
2422 2292
2423 //----- (0043F0BD) -------------------------------------------------------- 2293 //----- (0043F0BD) --------------------------------------------------------
2424 void WetsuitOff( unsigned int uPlayerID ) 2294 void WetsuitOff( unsigned int uPlayerID )
2425 { 2295 {
2426 char pContainer[20]; // [sp+0h] [bp-18h]@4 2296 char pContainer[20]; // [sp+0h] [bp-18h]@4
2427 2297
2428 if (uPlayerID > 0 ) 2298 if (uPlayerID > 0 )
2429 { 2299 {
2430 papredoll_dbods[uPlayerID - 1] = pIcons_LOD->LoadTexture(dbod_texnames_by_face[pPlayers[uPlayerID]->uCurrentFace], TEXTURE_16BIT_PALETTE); 2300 papredoll_dbods[uPlayerID - 1] = pIcons_LOD->LoadTexture(dbod_texnames_by_face[pPlayers[uPlayerID]->uCurrentFace], TEXTURE_16BIT_PALETTE);
2431 papredoll_dlads[uPlayerID - 1] = pIcons_LOD->LoadTexture(dlad_texnames_by_face[pPlayers[uPlayerID]->uCurrentFace], TEXTURE_16BIT_PALETTE); 2301 papredoll_dlads[uPlayerID - 1] = pIcons_LOD->LoadTexture(dlad_texnames_by_face[pPlayers[uPlayerID]->uCurrentFace], TEXTURE_16BIT_PALETTE);
2432 papredoll_dlaus[uPlayerID - 1] = pIcons_LOD->LoadTexture(dlau_texnames_by_face[pPlayers[uPlayerID]->uCurrentFace], TEXTURE_16BIT_PALETTE); 2302 papredoll_dlaus[uPlayerID - 1] = pIcons_LOD->LoadTexture(dlau_texnames_by_face[pPlayers[uPlayerID]->uCurrentFace], TEXTURE_16BIT_PALETTE);
2433 papredoll_drhs [uPlayerID - 1] = pIcons_LOD->LoadTexture(drh_texnames_by_face [pPlayers[uPlayerID]->uCurrentFace], TEXTURE_16BIT_PALETTE); 2303 papredoll_drhs [uPlayerID - 1] = pIcons_LOD->LoadTexture(drh_texnames_by_face [pPlayers[uPlayerID]->uCurrentFace], TEXTURE_16BIT_PALETTE);
2434 papredoll_dlhs [uPlayerID - 1] = pIcons_LOD->LoadTexture(dlh_texnames_by_face [pPlayers[uPlayerID]->uCurrentFace], TEXTURE_16BIT_PALETTE); 2304 papredoll_dlhs [uPlayerID - 1] = pIcons_LOD->LoadTexture(dlh_texnames_by_face [pPlayers[uPlayerID]->uCurrentFace], TEXTURE_16BIT_PALETTE);
2435 papredoll_dlhus[uPlayerID - 1] = pIcons_LOD->LoadTexture(dlhu_texnames_by_face[pPlayers[uPlayerID]->uCurrentFace], TEXTURE_16BIT_PALETTE); 2305 papredoll_dlhus[uPlayerID - 1] = pIcons_LOD->LoadTexture(dlhu_texnames_by_face[pPlayers[uPlayerID]->uCurrentFace], TEXTURE_16BIT_PALETTE);
2436 2306
2437 if ( pPlayers[uPlayerID]->uCurrentFace == 12 || pPlayers[uPlayerID]->uCurrentFace == 13 ) 2307 if ( pPlayers[uPlayerID]->uCurrentFace == 12 || pPlayers[uPlayerID]->uCurrentFace == 13 )
2438 { 2308 {
2439 wsprintfA(pContainer, "pc%02dbrd", pPlayers[uPlayerID]->uCurrentFace + 1); 2309 wsprintfA(pContainer, "pc%02dbrd", pPlayers[uPlayerID]->uCurrentFace + 1);
2440 papredoll_dbrds[pPlayers[uPlayerID]->uCurrentFace] = pIcons_LOD->LoadTexture(pContainer, TEXTURE_16BIT_PALETTE); 2310 papredoll_dbrds[pPlayers[uPlayerID]->uCurrentFace] = pIcons_LOD->LoadTexture(pContainer, TEXTURE_16BIT_PALETTE);
2441 } 2311 }
2442 wsprintfA(pContainer, "item281pc%02d", pPlayers[uPlayerID]->uCurrentFace + 1); 2312 wsprintfA(pContainer, "item281pc%02d", pPlayers[uPlayerID]->uCurrentFace + 1);
2443 papredoll_flying_feet[pPlayers[uPlayerID]->uCurrentFace] = pIcons_LOD->LoadTexture(pContainer, TEXTURE_16BIT_PALETTE); 2313 papredoll_flying_feet[pPlayers[uPlayerID]->uCurrentFace] = pIcons_LOD->LoadTexture(pContainer, TEXTURE_16BIT_PALETTE);
2444 IsPlayerWearingWatersuit[uPlayerID] = 0; 2314 IsPlayerWearingWatersuit[uPlayerID] = 0;
2445 } 2315 }
2446 } 2316 }
2317
2447 //----- (00468F8A) -------------------------------------------------------- 2318 //----- (00468F8A) --------------------------------------------------------
2448 void OnPaperdollLeftClick() 2319 void OnPaperdollLeftClick()
2449 { 2320 {
2450 int v1; // ecx@1 2321 int v1; // ecx@1
2451 unsigned int v2; // edi@1 2322 unsigned int v2; // edi@1
2452 unsigned int v3; // edx@4 2323 unsigned int v3; // edx@4
2453 unsigned int pSkillType; // esi@5 2324 unsigned int pSkillType; // esi@5
2454 unsigned __int16 v5; // ax@7 2325 unsigned __int16 v5; // ax@7
2455 unsigned int v6; // edi@19 2326 //unsigned int v6; // edi@19
2456 int v7; // esi@27 2327 int v7; // esi@27
2457 int v8; // eax@29 2328 int v8; // eax@29
2458 int v9; // edx@32 2329 //int v9; // edx@32
2459 int v10; // esi@34 2330 int v10; // esi@34
2460 int v11; // eax@34 2331 //int v11; // eax@34
2461 int v12; // esi@38 2332 int v12; // esi@38
2462 int v13; // eax@38 2333 int v13; // eax@38
2463 char v14; // zf@38 2334 char v14; // zf@38
2464 int v15; // esi@42 2335 int v15; // esi@42
2465 int v16; // eax@42 2336 int v16; // eax@42
2490 unsigned int v48; // [sp+30h] [bp-1Ch]@88 2361 unsigned int v48; // [sp+30h] [bp-1Ch]@88
2491 unsigned int v49; // [sp+34h] [bp-18h]@57 2362 unsigned int v49; // [sp+34h] [bp-18h]@57
2492 unsigned int v50; // [sp+38h] [bp-14h]@50 2363 unsigned int v50; // [sp+38h] [bp-14h]@50
2493 int v51; // [sp+3Ch] [bp-10h]@1 2364 int v51; // [sp+3Ch] [bp-10h]@1
2494 int v52; // [sp+40h] [bp-Ch]@5 2365 int v52; // [sp+40h] [bp-Ch]@5
2495 //int v53; // [sp+44h] [bp-8h]@1 2366 ITEM_EQUIP_TYPE pEquipType;
2496 //unsigned int v54; // [sp+48h] [bp-4h]@1
2497 2367
2498 v51 = 0; 2368 v51 = 0;
2499 _this.Reset(); 2369 _this.Reset();
2500 //v0 = pPlayers[uActiveCharacter]; 2370 //v0 = pPlayers[uActiveCharacter];
2501 v1 = pPlayers[uActiveCharacter]->pEquipment.uMainHand; 2371 v1 = pPlayers[uActiveCharacter]->pEquipment.uMainHand;
2505 if ( v1 && pItemsTable->pItems[*(int *)&pPlayers[uActiveCharacter]->pInventoryItemList[v1 - 1]].uEquipType == 1 ) 2375 if ( v1 && pItemsTable->pItems[*(int *)&pPlayers[uActiveCharacter]->pInventoryItemList[v1 - 1]].uEquipType == 1 )
2506 v51 = v1; 2376 v51 = v1;
2507 v3 = pParty->pPickedItem.uItemID; 2377 v3 = pParty->pPickedItem.uItemID;
2508 if ( pParty->pPickedItem.uItemID ) 2378 if ( pParty->pPickedItem.uItemID )
2509 { 2379 {
2510 v52 = pItemsTable->pItems[pParty->pPickedItem.uItemID].uEquipType; 2380 pEquipType = pItemsTable->pItems[pParty->pPickedItem.uItemID].uEquipType;
2511 pSkillType = pItemsTable->pItems[pParty->pPickedItem.uItemID].uSkillType; 2381 pSkillType = pItemsTable->pItems[pParty->pPickedItem.uItemID].uSkillType;
2512 if ( pSkillType == 4 ) 2382 if ( pSkillType == 4 )
2513 { 2383 {
2514 if ( v2 ) 2384 if ( v2 )
2515 { 2385 {
2546 { 2416 {
2547 pPlayers[uActiveCharacter]->EquipBody((ITEM_EQUIP_TYPE)3); 2417 pPlayers[uActiveCharacter]->EquipBody((ITEM_EQUIP_TYPE)3);
2548 WetsuitOn(uActiveCharacter); 2418 WetsuitOn(uActiveCharacter);
2549 return; 2419 return;
2550 } 2420 }
2551 v6 = v52; 2421 //v6 = v52;
2552 switch ( v52 ) 2422 switch ( pEquipType )
2553 { 2423 {
2554 case 2u: 2424 case EQUIP_BOW:
2555 case 3u: 2425 case EQUIP_ARMOUR:
2556 case 5u: 2426 case EQUIP_HELMET:
2557 case 6u: 2427 case EQUIP_BELT:
2558 case 7u: 2428 case EQUIP_CLOAK:
2559 case 8u: 2429 case EQUIP_GAUNTLETS:
2560 case 9u: 2430 case EQUIP_BOOTS:
2561 case 0xBu: 2431 case EQUIP_AMULET:
2562 if ( !pPlayers[uActiveCharacter]->HasSkill(pSkillType) ) 2432 if ( !pPlayers[uActiveCharacter]->HasSkill(pSkillType) )
2563 { 2433 {
2564 pPlayers[uActiveCharacter]->PlaySound(SPEECH_39, 0); 2434 pPlayers[uActiveCharacter]->PlaySound(SPEECH_39, 0);
2565 return; 2435 return;
2566 } 2436 }
2567 if ( sub_43EE77_ProbablyIfUnderwaterSuitIsEquipped(uActiveCharacter) && (v6 != 3 || bUnderwater) ) 2437 if ( sub_43EE77_ProbablyIfUnderwaterSuitIsEquipped(uActiveCharacter) && (pEquipType != EQUIP_ARMOUR || bUnderwater) )
2568 { 2438 {
2569 pAudioPlayer->PlaySound(SOUND_27, 0, 0, -1, 0, 0, 0, 0); 2439 pAudioPlayer->PlaySound(SOUND_27, 0, 0, -1, 0, 0, 0, 0);
2570 return; 2440 return;
2571 } 2441 }
2572 pPlayers[uActiveCharacter]->EquipBody((ITEM_EQUIP_TYPE)v6); 2442 pPlayers[uActiveCharacter]->EquipBody(pEquipType);
2573 if ( pParty->pPickedItem.uItemID == ITEM_WETSUIT ) 2443 if ( pParty->pPickedItem.uItemID == ITEM_WETSUIT )
2574 WetsuitOff(uActiveCharacter); 2444 WetsuitOff(uActiveCharacter);
2575 return; 2445 return;
2576 case 0xAu: 2446
2447 case EQUIP_RING://Кольца
2577 if ( sub_43EE77_ProbablyIfUnderwaterSuitIsEquipped(uActiveCharacter) ) 2448 if ( sub_43EE77_ProbablyIfUnderwaterSuitIsEquipped(uActiveCharacter) )
2578 { 2449 {
2579 pAudioPlayer->PlaySound(SOUND_27, 0, 0, -1, 0, 0, 0, 0); 2450 pAudioPlayer->PlaySound(SOUND_27, 0, 0, -1, 0, 0, 0, 0);
2580 return; 2451 return;
2581 } 2452 }
2582 v52 = 10; 2453 //слоты для колец
2583 v7 = (int)&pPlayers[uActiveCharacter]->pEquipment.uRings; 2454 v7 = 0;
2584 while ( 1 ) 2455 for ( v52 = 10; (signed int)v52 < 16; ++v52 )
2585 { 2456 {
2586 if ( !*(int *)v7 ) 2457 if ( !pPlayers[uActiveCharacter]->pEquipment.uRings[v7] )
2587 { 2458 {
2588 v8 = pPlayers[uActiveCharacter]->FindFreeInventoryListSlot(); 2459 v8 = pPlayers[uActiveCharacter]->FindFreeInventoryListSlot();
2589 if ( v8 >= 0 ) 2460 if ( v8 >= 0 )
2590 { 2461 {
2591 v9 = v52; 2462 pParty->pPickedItem.uBodyAnchor = v52 + 1;
2592 pParty->pPickedItem.uBodyAnchor = v52 + 1; 2463 memcpy(&pPlayers[uActiveCharacter]->pInventoryItemList[v8], &pParty->pPickedItem, sizeof(pPlayers[uActiveCharacter]->pInventoryItemList[v8]));
2593 memcpy(&pPlayers[uActiveCharacter]->pInventoryItemList[v8], &pParty->pPickedItem, sizeof(pPlayers[uActiveCharacter]->pInventoryItemList[v8])); 2464 pPlayers[uActiveCharacter]->pEquipment.uRings[v7] = v8 + 1;
2594 *(&pPlayers[uActiveCharacter]->pEquipment.uShield + v9) = v8 + 1; 2465 pMouse->RemoveHoldingItem();
2595 pMouse->RemoveHoldingItem();
2596 break; 2466 break;
2597 } 2467 }
2598 } 2468 }
2599 ++v52; 2469 v7++;
2600 v7 += 4; 2470 }
2601 if ( (signed int)v52 > 15 ) 2471 if ( v52 == 16 )//замещение последнего кольца
2602 break;
2603 }
2604 if ( v52 == 16 )
2605 { 2472 {
2606 v52 = pPlayers[uActiveCharacter]->pEquipment.uRings[6] - 1; 2473 v52 = pPlayers[uActiveCharacter]->pEquipment.uRings[6] - 1;
2607 memcpy(&_this, &pParty->pPickedItem, sizeof(_this)); 2474 memcpy(&_this, &pParty->pPickedItem, sizeof(_this));
2608 v10 = (int)((char *)pPlayers[uActiveCharacter] + 36 * v52); 2475 v10 = (int)((char *)pPlayers[uActiveCharacter] + 36 * v52);
2609 *(char *)(v10 + 556) = 0; 2476 *(char *)(v10 + 556) = 0;
2610 pParty->pPickedItem.Reset(); 2477 pParty->pPickedItem.Reset();
2611 pParty->SetHoldingItem((ItemGen *)(v10 + 532)); 2478 pParty->SetHoldingItem((ItemGen *)(v10 + 532));
2612 _this.uBodyAnchor = 16; 2479 _this.uBodyAnchor = 16;
2613 v11 = v52 + 1;
2614 memcpy((void *)(v10 + 532), &_this, 0x24u); 2480 memcpy((void *)(v10 + 532), &_this, 0x24u);
2615 pPlayers[uActiveCharacter]->pEquipment.uRings[6] = v11; 2481 pPlayers[uActiveCharacter]->pEquipment.uRings[6] = v52 + 1;
2616 } 2482 }
2617 return; 2483 return;
2618 case 4u: 2484
2485 case EQUIP_SHIELD://Щит
2619 if ( sub_43EE77_ProbablyIfUnderwaterSuitIsEquipped(uActiveCharacter) ) 2486 if ( sub_43EE77_ProbablyIfUnderwaterSuitIsEquipped(uActiveCharacter) )
2620 { 2487 {
2621 pAudioPlayer->PlaySound(SOUND_27, 0, 0, -1, 0, 0, 0, 0); 2488 pAudioPlayer->PlaySound(SOUND_27, 0, 0, -1, 0, 0, 0, 0);
2622 return; 2489 return;
2623 } 2490 }
2624 if ( !pPlayers[uActiveCharacter]->HasSkill(pSkillType) ) 2491 if ( !pPlayers[uActiveCharacter]->HasSkill(pSkillType) )
2625 { 2492 {
2626 pPlayers[uActiveCharacter]->PlaySound(SPEECH_39, 0); 2493 pPlayers[uActiveCharacter]->PlaySound(SPEECH_39, 0);
2627 return; 2494 return;
2628 } 2495 }
2666 memcpy(&pPlayers[uActiveCharacter]->pInventoryItemList[v52], &_this, sizeof(pPlayers[uActiveCharacter]->pInventoryItemList[v52])); 2533 memcpy(&pPlayers[uActiveCharacter]->pInventoryItemList[v52], &_this, sizeof(pPlayers[uActiveCharacter]->pInventoryItemList[v52]));
2667 pPlayers[uActiveCharacter]->pEquipment.uShield = v16; 2534 pPlayers[uActiveCharacter]->pEquipment.uShield = v16;
2668 } 2535 }
2669 pPlayers[uActiveCharacter]->pEquipment.uMainHand = 0; 2536 pPlayers[uActiveCharacter]->pEquipment.uMainHand = 0;
2670 return; 2537 return;
2671 case 0u: 2538 case EQUIP_OFF_HAND:
2672 case 0xCu: 2539 case EQUIP_WAND:
2673 if ( sub_43EE77_ProbablyIfUnderwaterSuitIsEquipped(uActiveCharacter) 2540 if ( sub_43EE77_ProbablyIfUnderwaterSuitIsEquipped(uActiveCharacter)
2674 && pParty->pPickedItem.uItemID != 64 2541 && pParty->pPickedItem.uItemID != 64
2675 && pParty->pPickedItem.uItemID != 65 ) 2542 && pParty->pPickedItem.uItemID != 65 )
2676 { 2543 {
2677 pAudioPlayer->PlaySound(SOUND_27, 0, 0, -1, 0, 0, 0, 0); 2544 pAudioPlayer->PlaySound(SOUND_27, 0, 0, -1, 0, 0, 0, 0);
2703 *(char *)(v20 + 556) = 0; 2570 *(char *)(v20 + 556) = 0;
2704 pParty->pPickedItem.Reset(); 2571 pParty->pPickedItem.Reset();
2705 pParty->SetHoldingItem((ItemGen *)(v20 + 532)); 2572 pParty->SetHoldingItem((ItemGen *)(v20 + 532));
2706 _this.uBodyAnchor = 1; 2573 _this.uBodyAnchor = 1;
2707 v21 = v2 + 1; 2574 v21 = v2 + 1;
2708 v14 = v52 == 12; 2575 v14 = pEquipType == 12;
2709 memcpy((void *)(v20 + 532), &_this, 0x24u); 2576 memcpy((void *)(v20 + 532), &_this, 0x24u);
2710 pPlayers[uActiveCharacter]->pEquipment.uShield = v21; 2577 pPlayers[uActiveCharacter]->pEquipment.uShield = v21;
2711 if ( !v14 ) 2578 if ( !v14 )
2712 return; 2579 return;
2713 v22 = _this.uItemID; 2580 v22 = _this.uItemID;
2725 pParty->pPickedItem.uBodyAnchor = 1; 2592 pParty->pPickedItem.uBodyAnchor = 1;
2726 v50 = (unsigned int)&pPlayers[uActiveCharacter]->pInventoryItemList[v23]; 2593 v50 = (unsigned int)&pPlayers[uActiveCharacter]->pInventoryItemList[v23];
2727 memcpy(&pPlayers[uActiveCharacter]->pInventoryItemList[v23], &pParty->pPickedItem, sizeof(pPlayers[uActiveCharacter]->pInventoryItemList[v23])); 2594 memcpy(&pPlayers[uActiveCharacter]->pInventoryItemList[v23], &pParty->pPickedItem, sizeof(pPlayers[uActiveCharacter]->pInventoryItemList[v23]));
2728 pPlayers[uActiveCharacter]->pEquipment.uShield = v23 + 1; 2595 pPlayers[uActiveCharacter]->pEquipment.uShield = v23 + 1;
2729 pMouse->RemoveHoldingItem(); 2596 pMouse->RemoveHoldingItem();
2730 if ( v52 != 12 ) 2597 if ( pEquipType != 12 )
2731 return; 2598 return;
2732 v22 = *(int *)v50; 2599 v22 = *(int *)v50;
2733 v50 = v22; 2600 v50 = v22;
2734 if ( v50 ) 2601 if ( v50 )
2735 { 2602 {
2748 pParty->pPickedItem.uBodyAnchor = 2; 2615 pParty->pPickedItem.uBodyAnchor = 2;
2749 v50 = (unsigned int)&pPlayers[uActiveCharacter]->pInventoryItemList[v26]; 2616 v50 = (unsigned int)&pPlayers[uActiveCharacter]->pInventoryItemList[v26];
2750 memcpy(&pPlayers[uActiveCharacter]->pInventoryItemList[v26], &pParty->pPickedItem, sizeof(pPlayers[uActiveCharacter]->pInventoryItemList[v26])); 2617 memcpy(&pPlayers[uActiveCharacter]->pInventoryItemList[v26], &pParty->pPickedItem, sizeof(pPlayers[uActiveCharacter]->pInventoryItemList[v26]));
2751 pPlayers[uActiveCharacter]->pEquipment.uMainHand = v26 + 1; 2618 pPlayers[uActiveCharacter]->pEquipment.uMainHand = v26 + 1;
2752 pMouse->RemoveHoldingItem(); 2619 pMouse->RemoveHoldingItem();
2753 if ( v52 != 12 ) 2620 if ( pEquipType != 12 )
2754 return; 2621 return;
2755 v22 = *(int *)v50; 2622 v22 = *(int *)v50;
2756 v50 = v22; 2623 v50 = v22;
2757 if ( v50 ) 2624 if ( v50 )
2758 { 2625 {
2767 *(char *)(v24 + 556) = 0; 2634 *(char *)(v24 + 556) = 0;
2768 pParty->pPickedItem.Reset(); 2635 pParty->pPickedItem.Reset();
2769 pParty->SetHoldingItem((ItemGen *)(v24 + 532)); 2636 pParty->SetHoldingItem((ItemGen *)(v24 + 532));
2770 _this.uBodyAnchor = 2; 2637 _this.uBodyAnchor = 2;
2771 v25 = v1 + 1; 2638 v25 = v1 + 1;
2772 v14 = v52 == 12; 2639 v14 = pEquipType == 12;
2773 memcpy((void *)(v24 + 532), &_this, 0x24u); 2640 memcpy((void *)(v24 + 532), &_this, 0x24u);
2774 pPlayers[uActiveCharacter]->pEquipment.uMainHand = v25; 2641 pPlayers[uActiveCharacter]->pEquipment.uMainHand = v25;
2775 if ( v14 ) 2642 if ( v14 )
2776 v50 = _this.uItemID; 2643 v50 = _this.uItemID;
2777 if ( v51 ) 2644 if ( v51 )
2780 { 2647 {
2781 __debugbreak(); // looks like offset in player's inventory and wand_lut much like case in 0042ECB5 2648 __debugbreak(); // looks like offset in player's inventory and wand_lut much like case in 0042ECB5
2782 stru_A750F8[uActiveCharacter - 1]._494836( *((int *)&pSpellDatas[66].uNormalLevelRecovery + v50), uActiveCharacter - 1 + 9); 2649 stru_A750F8[uActiveCharacter - 1]._494836( *((int *)&pSpellDatas[66].uNormalLevelRecovery + v50), uActiveCharacter - 1 + 9);
2783 } 2650 }
2784 break; 2651 break;
2785 case 1u: 2652 case EQUIP_MAIN_HAND:
2786 if ( sub_43EE77_ProbablyIfUnderwaterSuitIsEquipped(uActiveCharacter) ) 2653 if ( sub_43EE77_ProbablyIfUnderwaterSuitIsEquipped(uActiveCharacter) )
2787 { 2654 {
2788 pAudioPlayer->PlaySound(SOUND_27, 0, 0, -1, 0, 0, 0, 0); 2655 pAudioPlayer->PlaySound(SOUND_27, 0, 0, -1, 0, 0, 0, 0);
2789 return; 2656 return;
2790 } 2657 }
2856 v36 = v34 - 1; 2723 v36 = v34 - 1;
2857 v37 = (int)((char *)pPlayers[uActiveCharacter] + 36 * v36); 2724 v37 = (int)((char *)pPlayers[uActiveCharacter] + 36 * v36);
2858 v50 = v37; 2725 v50 = v37;
2859 v38 = (ItemGen *)(v37 + 532); 2726 v38 = (ItemGen *)(v37 + 532);
2860 v14 = v38->uItemID == ITEM_WETSUIT; 2727 v14 = v38->uItemID == ITEM_WETSUIT;
2861 v52 = pItemsTable->pItems[v38->uItemID].uEquipType; 2728 pEquipType = pItemsTable->pItems[v38->uItemID].uEquipType;
2862 if ( v14 ) 2729 if ( v14 )
2863 { 2730 {
2864 if ( bUnderwater ) 2731 if ( bUnderwater )
2865 { 2732 {
2866 pAudioPlayer->PlaySound(SOUND_27, 0, 0, -1, 0, 0, 0, 0); 2733 pAudioPlayer->PlaySound(SOUND_27, 0, 0, -1, 0, 0, 0, 0);
2870 } 2737 }
2871 if ( unk_50C9A0 ) 2738 if ( unk_50C9A0 )
2872 { 2739 {
2873 *((char *)pGUIWindow_Settings->ptr_1C + 8) &= 0x7Fu; 2740 *((char *)pGUIWindow_Settings->ptr_1C + 8) &= 0x7Fu;
2874 *((short *)pGUIWindow_Settings->ptr_1C + 2) = uActiveCharacter - 1; 2741 *((short *)pGUIWindow_Settings->ptr_1C + 2) = uActiveCharacter - 1;
2875 v39 = v52; 2742 v39 = pEquipType;
2876 *((int *)pGUIWindow_Settings->ptr_1C + 3) = v36; 2743 *((int *)pGUIWindow_Settings->ptr_1C + 3) = v36;
2877 *((short *)pGUIWindow_Settings->ptr_1C + 3) = v39; 2744 *((short *)pGUIWindow_Settings->ptr_1C + 3) = v39;
2878 ptr_50C9A4 = v38; 2745 ptr_50C9A4 = v38;
2879 unk_50C9A0 = 0; 2746 unk_50C9A0 = 0;
2880 if ( pMessageQueue_50CBD0->uNumMessages ) 2747 if ( pMessageQueue_50CBD0->uNumMessages )
2904 _a->Reset(); 2771 _a->Reset();
2905 pPlayers[uActiveCharacter]->pEquipment.uBow = 0; 2772 pPlayers[uActiveCharacter]->pEquipment.uBow = 0;
2906 } 2773 }
2907 } 2774 }
2908 } 2775 }
2776
2909 //----- (004196A0) -------------------------------------------------------- 2777 //----- (004196A0) --------------------------------------------------------
2910 void CharacterUI_ReleaseButtons() 2778 void CharacterUI_ReleaseButtons()
2911 { 2779 {
2912 GUIButton *i; // esi@2 2780 GUIButton *i; // esi@2
2913 GUIButton *j; // esi@7 2781 GUIButton *j; // esi@7