Mercurial > mm7
comparison mm7_5.cpp @ 898:10fa7dad1391
DrawPaperdoll clean
author | Ritor1 |
---|---|
date | Mon, 15 Apr 2013 16:36:56 +0600 |
parents | abf7b7d2c8f7 |
children | 393a83dcc359 |
comparison
equal
deleted
inserted
replaced
897:d3228f46ef68 | 898:10fa7dad1391 |
---|---|
3857 if ( (signed int)pUIMessageType > UIMSG_PlayerCreationChangeName ) | 3857 if ( (signed int)pUIMessageType > UIMSG_PlayerCreationChangeName ) |
3858 { | 3858 { |
3859 if ( pUIMessageType == UIMSG_PlayerCreationClickPlus ) | 3859 if ( pUIMessageType == UIMSG_PlayerCreationClickPlus ) |
3860 { | 3860 { |
3861 GUIWindow::Create(613, 393, 0, 0, (enum WindowType)90, (int)pPlayerCreationUI_BtnPlus, 1); | 3861 GUIWindow::Create(613, 393, 0, 0, (enum WindowType)90, (int)pPlayerCreationUI_BtnPlus, 1); |
3862 (&pPlayer[uPlayerCreationUI_SelectedCharacter])->IncreaseAttribute( | 3862 pPlayer[uPlayerCreationUI_SelectedCharacter].IncreaseAttribute((pGUIWindow_CurrentMenu->pCurrentPosActiveItem - pGUIWindow_CurrentMenu->pStartingPosActiveItem) % 7); |
3863 (pGUIWindow_CurrentMenu->pCurrentPosActiveItem - pGUIWindow_CurrentMenu->pStartingPosActiveItem) % 7); | |
3864 pAudioPlayer->PlaySound((SoundID)20, 0, 0, -1, 0, 0, 0, 0); | 3863 pAudioPlayer->PlaySound((SoundID)20, 0, 0, -1, 0, 0, 0, 0); |
3865 continue; | 3864 continue; |
3866 } | 3865 } |
3867 if ( pUIMessageType == UIMSG_PlayerCreationClickMinus ) | 3866 if ( pUIMessageType == UIMSG_PlayerCreationClickMinus ) |
3868 { | 3867 { |
3869 GUIWindow::Create(523, 393, 0, 0, (enum WindowType)90, (int)pPlayerCreationUI_BtnMinus, 1); | 3868 GUIWindow::Create(523, 393, 0, 0, (enum WindowType)90, (int)pPlayerCreationUI_BtnMinus, 1); |
3870 (&pPlayer[uPlayerCreationUI_SelectedCharacter])->DecreaseAttribute( | 3869 pPlayer[uPlayerCreationUI_SelectedCharacter].DecreaseAttribute((pGUIWindow_CurrentMenu->pCurrentPosActiveItem - pGUIWindow_CurrentMenu->pStartingPosActiveItem) % 7); |
3871 (pGUIWindow_CurrentMenu->pCurrentPosActiveItem - pGUIWindow_CurrentMenu->pStartingPosActiveItem) % 7); | |
3872 pAudioPlayer->PlaySound((SoundID)23, 0, 0, -1, 0, 0, 0, 0); | 3870 pAudioPlayer->PlaySound((SoundID)23, 0, 0, -1, 0, 0, 0, 0); |
3873 continue; | 3871 continue; |
3874 } | 3872 } |
3875 if ( pUIMessageType == UIMSG_PlayerCreationSelectActiveSkill ) | 3873 if ( pUIMessageType == UIMSG_PlayerCreationSelectActiveSkill ) |
3876 { | 3874 { |
5004 v57 = &player->pEquipment; | 5002 v57 = &player->pEquipment; |
5005 do | 5003 do |
5006 { | 5004 { |
5007 if ( player->HasItemEquipped((ITEM_EQUIP_TYPE)v59) ) | 5005 if ( player->HasItemEquipped((ITEM_EQUIP_TYPE)v59) ) |
5008 { | 5006 { |
5009 auto _s = (ItemGen *)&player->pInventoryItems[v57->uOffHand-1]; | 5007 auto _s = (ItemGen *)&player->pInventoryItems[v57->uShield - 1]; |
5010 a4 = _s->_439DF3_get_additional_damage(&a2, &v62); | 5008 a4 = _s->_439DF3_get_additional_damage(&a2, &v62); |
5011 if ( v62 && pMonster->sCurrentHP > 0 ) | 5009 if ( v62 && pMonster->sCurrentHP > 0 ) |
5012 { | 5010 { |
5013 player->sHealth += v61 / 5; | 5011 player->sHealth += v61 / 5; |
5014 if ( player->sHealth > player->GetMaxHealth() ) | 5012 if ( player->sHealth > player->GetMaxHealth() ) |
5246 if ( v5 != 1 | 5244 if ( v5 != 1 |
5247 || (v6 = &pParty->pPlayers[a4], v7 = &pActors[v4], | 5245 || (v6 = &pParty->pPlayers[a4], v7 = &pActors[v4], |
5248 v75 = v6->sHealth, | 5246 v75 = v6->sHealth, |
5249 !stru_50C198.ActorHitOrMiss(v7, v6)) ) | 5247 !stru_50C198.ActorHitOrMiss(v7, v6)) ) |
5250 return; | 5248 return; |
5251 v8 = v6->pEquipment.uBody; | 5249 v8 = v6->pEquipment.uArmor; |
5252 if ( !v8 | 5250 if ( !v8 |
5253 || (v9 = (char *)v6 + 36 * v8, v9[516] & 2) | 5251 || (v9 = (char *)v6 + 36 * v8, v9[516] & 2) |
5254 || (v10 = pItemsTable->pItems[*((int *)v9 + 124)].uSkillType, v10 < 10) | 5252 || (v10 = pItemsTable->pItems[*((int *)v9 + 124)].uSkillType, v10 < 10) |
5255 || v10 > 11 ) | 5253 || v10 > 11 ) |
5256 { | 5254 { |
5484 if ( v45->HasEnchantedItemEquipped(36) ) | 5482 if ( v45->HasEnchantedItemEquipped(36) ) |
5485 v77 >>= 1; | 5483 v77 >>= 1; |
5486 if ( v45->HasEnchantedItemEquipped(69) ) | 5484 if ( v45->HasEnchantedItemEquipped(69) ) |
5487 v77 >>= 1; | 5485 v77 >>= 1; |
5488 if ( v45->HasItemEquipped(EQUIP_ARMOUR) | 5486 if ( v45->HasItemEquipped(EQUIP_ARMOUR) |
5489 && *(_DWORD *)&v45->pInventoryItems[v45->pEquipment.uBody-1] == 504 ) | 5487 && *(_DWORD *)&v45->pInventoryItems[v45->pEquipment.uArmor-1] == 504 ) |
5490 v77 >>= 1; | 5488 v77 >>= 1; |
5491 v75 = 0; | 5489 v75 = 0; |
5492 v47 = (int)&v45->pEquipment; | 5490 v47 = (int)&v45->pEquipment; |
5493 do | 5491 do |
5494 { | 5492 { |
6350 while ( 1 ) | 6348 while ( 1 ) |
6351 { | 6349 { |
6352 result = sub_43EE15_player_has_item(v5, *pPlayers, 0); | 6350 result = sub_43EE15_player_has_item(v5, *pPlayers, 0); |
6353 if ( !result ) | 6351 if ( !result ) |
6354 break; | 6352 break; |
6355 result = v6->pEquipment.uBody; | 6353 result = v6->pEquipment.uArmor; |
6356 if ( !result ) | 6354 if ( !result ) |
6357 break; | 6355 break; |
6358 result *= 9; | 6356 result *= 9; |
6359 if ( *(int *)&v6->spellbook.pDarkSpellbook.bIsSpellAvailable[4 * result + 5] != v5 ) | 6357 if ( *(int *)&v6->spellbook.pDarkSpellbook.bIsSpellAvailable[4 * result + 5] != v5 ) |
6360 break; | 6358 break; |
6365 } | 6363 } |
6366 goto LABEL_6; | 6364 goto LABEL_6; |
6367 } | 6365 } |
6368 result = sub_43EE15_player_has_item(604u, ::pPlayers[a1], 0); | 6366 result = sub_43EE15_player_has_item(604u, ::pPlayers[a1], 0); |
6369 if ( !result | 6367 if ( !result |
6370 || (result = v2->pEquipment.uBody) == 0 | 6368 || (result = v2->pEquipment.uArmor) == 0 |
6371 || (result *= 9, *(int *)&v2->spellbook.pDarkSpellbook.bIsSpellAvailable[4 * result + 5] != v3) ) | 6369 || (result *= 9, *(int *)&v2->spellbook.pDarkSpellbook.bIsSpellAvailable[4 * result + 5] != v3) ) |
6372 { | 6370 { |
6373 LABEL_6: | 6371 LABEL_6: |
6374 LOBYTE(result) = 0; | 6372 LOBYTE(result) = 0; |
6375 return result; | 6373 return result; |
10780 case WINDOW_17: | 10778 case WINDOW_17: |
10781 { | 10779 { |
10782 sub_4606FE(); | 10780 sub_4606FE(); |
10783 break; | 10781 break; |
10784 } | 10782 } |
10785 case WINDOW_1F: | 10783 case WINDOW_CastSpell_InInventory: |
10786 { | 10784 { |
10787 pRenderer->ClearZBuffer(0, 479); | 10785 pRenderer->ClearZBuffer(0, 479); |
10788 draw_leather(); | 10786 draw_leather(); |
10789 CharacterUI_InventoryTab_Draw(uActiveCharacter, 1); | 10787 CharacterUI_InventoryTab_Draw(uActiveCharacter, 1); |
10790 CharacterUI_DrawPaperdoll(uActiveCharacter); | 10788 CharacterUI_DrawPaperdoll(uActiveCharacter); |