# HG changeset patch # User Gloval # Date 1369166954 -14400 # Node ID 9408f98f49292c229fd1595a2118c7cd4c6a34e1 # Parent f93d173371130dd3e975b3446aba68350225a657 use item cleaned diff -r f93d17337113 -r 9408f98f4929 Player.cpp --- a/Player.cpp Tue May 21 14:34:14 2013 +0200 +++ b/Player.cpp Wed May 22 00:09:14 2013 +0400 @@ -4531,31 +4531,25 @@ //----- (0048EA46) -------------------------------------------------------- int Player::_48EA46_calc_special_bonus_by_items(int a2) { - int v3; // esi@1 - int v4; // edx@2 - int v5; // eax@3 - char *v6; // eax@4 - - v3 = 0; - while ( 1 ) - { - if ( !HasItemEquipped((ITEM_EQUIP_TYPE)v3) ) - goto LABEL_11; - v5 = pEquipment.pIndices[v3] - 1; - if ( a2 != 17 ) - { - if ( a2 != 24 || this->pInventoryItems[v5].uSpecEnchantmentType != 24 ) - goto LABEL_11; - return 5; - } - v6 = (char *)this + 36 * v5; - if ( *((int *)v6 + 133) == 533 || *((int *)v6 + 136) == 17 ) - return 50; -LABEL_11: - ++v3; - if ( (signed int)v3 >= 16 ) - return 0; - } + int inv_indx; // eax@3 + + for (int i=EQUIP_OFF_HAND; ibTurnBasedModeOn == 1 && (pTurnEngine->field_4 == 1 || pTurnEngine->field_4 == 3) ) return; - v4 = 0; if ( pItemsTable->pItems[pParty->pPickedItem.uItemID].uEquipType == EQUIP_REAGENT ) { if ( pParty->pPickedItem.uItemID == 160 ) @@ -6940,13 +6884,33 @@ else { v68 = pParty->pPickedItem.GetDisplayName(); - v58 = pGlobalTXT_LocalizationStrings[36];//"%s can not be used that way" - sprintfex(pTmpBuf, v58, v68); + sprintfex(pTmpBuf, pGlobalTXT_LocalizationStrings[36], v68);//"%s can not be used that way" ShowStatusBarString(pTmpBuf, 2); pAudioPlayer->PlaySound((SoundID)27, 0, 0, -1, 0, 0, 0, 0); return; } - goto LABEL_173; + pAudioPlayer->PlaySound((SoundID)211, 0, 0, -1, 0, 0, 0, 0); + + if ( pGUIWindow_CurrentMenu && pGUIWindow_CurrentMenu->eWindowType != WINDOW_null) + { + pMessageQueue_50CBD0->AddMessage(UIMSG_Escape, 0, 0); + } + if ( v73 ) + { + if ( pParty->bTurnBasedModeOn ) + { + pParty->pTurnBasedPlayerRecoveryTimes[player_num-1] = 100; + thisb->SetRecoveryTime(100); + pTurnEngine->_40471C(); + } + else + { + thisb->SetRecoveryTime((signed __int64)(flt_6BE3A4_debug_recmod1 * 213.3333333333333)); + } + } + pMouse->RemoveHoldingItem(); + return; + } if ( pItemsTable->pItems[pParty->pPickedItem.uItemID].uEquipType == EQUIP_POTION ) @@ -7008,13 +6972,13 @@ v3->PlaySound(SPEECH_36, 0); break; case 231: //Preservation - v50 = 3 * LOWORD(pParty->pPickedItem.uEnchantmentType); + v50 = 3 * pParty->pPickedItem.uEnchantmentType; v28 = (signed __int64)((double)(230400 * pParty->pPickedItem.uEnchantmentType) * 0.033333335); v3->pPlayerBuffs[11].Apply(pParty->uTimePlayed + v28, 0, v50, 0, 0); v3->PlaySound(SPEECH_36, 0); break; case 232: //Shield - v50 = 3 * LOWORD(pParty->pPickedItem.uEnchantmentType); + v50 = 3 * pParty->pPickedItem.uEnchantmentType; v28 = (signed __int64)((double)(230400 * pParty->pPickedItem.uEnchantmentType) * 0.033333335); v3->pPlayerBuffs[13].Apply(pParty->uTimePlayed + v28, 0, v50, 0, 0); v3->PlaySound(SPEECH_36, 0); @@ -7041,37 +7005,37 @@ v3->PlaySound(SPEECH_36, 0); break; case 240: //Might Boost - v50 = 3 * LOWORD(pParty->pPickedItem.uEnchantmentType); + v50 = 3 * pParty->pPickedItem.uEnchantmentType; v28 = (signed __int64)((double)(230400 * pParty->pPickedItem.uEnchantmentType) * 0.033333335); v3->pPlayerBuffs[19].Apply(pParty->uTimePlayed + v28, 0, v50, 0, 0); v3->PlaySound(SPEECH_36, 0); break; case 241: //Intellect Boost - v50 = 3 * LOWORD(pParty->pPickedItem.uEnchantmentType); + v50 = 3 * pParty->pPickedItem.uEnchantmentType; v28 = (signed __int64)((double)(230400 * pParty->pPickedItem.uEnchantmentType) * 0.033333335); v3->pPlayerBuffs[17].Apply(pParty->uTimePlayed + v28, 0, v50, 0, 0); v3->PlaySound(SPEECH_36, 0); break; case 242: //Personality Boost - v50 = 3 * LOWORD(pParty->pPickedItem.uEnchantmentType); + v50 = 3 * pParty->pPickedItem.uEnchantmentType; v28 = (signed __int64)((double)(230400 * pParty->pPickedItem.uEnchantmentType) * 0.033333335); v3->pPlayerBuffs[20].Apply(pParty->uTimePlayed + v28, 0, v50, 0, 0); v3->PlaySound(SPEECH_36, 0); break; case 243://Endurance Boost - v50 = 3 * LOWORD(pParty->pPickedItem.uEnchantmentType); + v50 = 3 * pParty->pPickedItem.uEnchantmentType; v28 = (signed __int64)((double)(230400 * pParty->pPickedItem.uEnchantmentType) * 0.033333335); v3->pPlayerBuffs[16].Apply(pParty->uTimePlayed + v28, 0, v50, 0, 0); v3->PlaySound(SPEECH_36, 0); break; case 244: //Speed Boost - v50 = 3 * LOWORD(pParty->pPickedItem.uEnchantmentType); + v50 = 3 * pParty->pPickedItem.uEnchantmentType; v28 = (signed __int64)((double)(230400 * pParty->pPickedItem.uEnchantmentType) * 0.033333335); v3->pPlayerBuffs[21].Apply(pParty->uTimePlayed + v28, 0, v50, 0, 0); v3->PlaySound(SPEECH_36, 0); break; case 245: //Accuracy Boost - v50 = 3 * LOWORD(pParty->pPickedItem.uEnchantmentType); + v50 = 3 * pParty->pPickedItem.uEnchantmentType; v28 = (signed __int64)((double)(230400 * pParty->pPickedItem.uEnchantmentType) * 0.033333335); v3->pPlayerBuffs[15].Apply(pParty->uTimePlayed + v28, 0, v50, 0, 0); v3->PlaySound(SPEECH_36, 0); @@ -7104,43 +7068,43 @@ v3->PlaySound(SPEECH_36, 0); break; case 255: //Luck Boost - v50 = 3 * LOWORD(pParty->pPickedItem.uEnchantmentType); + v50 = 3 * pParty->pPickedItem.uEnchantmentType; v28 = (signed __int64)((double)(230400 * pParty->pPickedItem.uEnchantmentType) * 0.033333335); v3->pPlayerBuffs[18].Apply(pParty->uTimePlayed + v28, 0, v50, 0, 0); v3->PlaySound(SPEECH_36, 0); break; case 256: //Fire Resistance - v50 = 3 * LOWORD(pParty->pPickedItem.uEnchantmentType); + v50 = 3 * pParty->pPickedItem.uEnchantmentType; v28 = (signed __int64)((double)(230400 * pParty->pPickedItem.uEnchantmentType) * 0.033333335); v3->pPlayerBuffs[5].Apply(pParty->uTimePlayed + v28, 0, v50, 0, 0); v3->PlaySound(SPEECH_36, 0); - goto LABEL_173; + break; case 257: //Air Resistance - v50 = 3 * LOWORD(pParty->pPickedItem.uEnchantmentType); + v50 = 3 * pParty->pPickedItem.uEnchantmentType; v28 = (signed __int64)((double)(230400 * pParty->pPickedItem.uEnchantmentType) * 0.033333335); v3->pPlayerBuffs[0].Apply(pParty->uTimePlayed + v28, 0, v50, 0, 0); v3->PlaySound(SPEECH_36, 0); break; case 258: //Water Resistance - v50 = 3 * LOWORD(pParty->pPickedItem.uEnchantmentType); + v50 = 3 * pParty->pPickedItem.uEnchantmentType; v28 = (signed __int64)((double)(230400 * pParty->pPickedItem.uEnchantmentType) * 0.033333335); v3->pPlayerBuffs[22].Apply(pParty->uTimePlayed + v28, 0, v50, 0, 0); v3->PlaySound(SPEECH_36, 0); break; case 259: //Earth Resistance - v50 = 3 * LOWORD(pParty->pPickedItem.uEnchantmentType); + v50 = 3 * pParty->pPickedItem.uEnchantmentType; v28 = (signed __int64)((double)(230400 * pParty->pPickedItem.uEnchantmentType) * 0.033333335); v3->pPlayerBuffs[3].Apply(pParty->uTimePlayed + v28, 0, v50, 0, 0); v3->PlaySound(SPEECH_36, 0); break; case 260: //Mind Resistance - v50 = 3 * LOWORD(pParty->pPickedItem.uEnchantmentType); + v50 = 3 * pParty->pPickedItem.uEnchantmentType; v28 = (signed __int64)((double)(230400 * pParty->pPickedItem.uEnchantmentType) * 0.033333335); v3->pPlayerBuffs[9].Apply(pParty->uTimePlayed + v28, 0, v50, 0, 0); v3->PlaySound(SPEECH_36, 0); break; case 261: //Body Resistance - v50 = 3 * LOWORD(pParty->pPickedItem.uEnchantmentType); + v50 = 3 * pParty->pPickedItem.uEnchantmentType; v28 = (signed __int64)((double)(230400 * pParty->pPickedItem.uEnchantmentType) * 0.033333335); v3->pPlayerBuffs[2].Apply(pParty->uTimePlayed + v28, 0, v50, 0, 0); v3->PlaySound(SPEECH_36, 0); @@ -7212,15 +7176,37 @@ default: v68 = pParty->pPickedItem.GetDisplayName(); - v58 = pGlobalTXT_LocalizationStrings[36]; //"%s can not be used that way" - sprintfex(pTmpBuf, v58, v68); + sprintfex(pTmpBuf, pGlobalTXT_LocalizationStrings[36], v68);//"%s can not be used that way" ShowStatusBarString(pTmpBuf, 2u); pAudioPlayer->PlaySound((SoundID)27, 0, 0, -1, 0, 0, 0, 0); return; - + } + pAudioPlayer->PlaySound((SoundID)210, 0, 0, -1, 0, 0, 0, 0); + if ( pGUIWindow_CurrentMenu && pGUIWindow_CurrentMenu->eWindowType != WINDOW_null) + { + if ( !v73 ) + { + pMouse->RemoveHoldingItem(); + return; + } + pMessageQueue_50CBD0->AddMessage(UIMSG_Escape, 0, 0); } - // pParty->pPlayers[player_num-1].SetCondition(Condition_Poison1, 1); - goto LABEL_173; + if ( v73 ) + { + if ( pParty->bTurnBasedModeOn ) + { + pParty->pTurnBasedPlayerRecoveryTimes[player_num-1] = 100; + thisb->SetRecoveryTime(100); + pTurnEngine->_40471C(); + } + else + { + thisb->SetRecoveryTime((signed __int64)(flt_6BE3A4_debug_recmod1 * 213.3333333333333)); + } + } + pMouse->RemoveHoldingItem(); + return; + } @@ -7233,39 +7219,16 @@ if ( !pParty->pPlayers[player_num-1].CanAct() ) { - v68 = aCharacterConditionNames[v3->GetMajorConditionIdx()]; - v58 = pGlobalTXT_LocalizationStrings[382]; - sprintfex(pTmpBuf, v58, v68); - v23 = pTmpBuf; - - ShowStatusBarString(v23, 2u); - v4 = 0; - v61 = v4; - v52 = v4; - v48 = v4; - v45 = v4; - v43 = -1; - v41 = v4; - v39 = v4; - v37 = (SoundID)27; - pAudioPlayer->PlaySound(v37, v39, v41, v43, v45, v48, v52, v61); + sprintfex(pTmpBuf, pGlobalTXT_LocalizationStrings[382], v68); + ShowStatusBarString(pTmpBuf, 2u); + pAudioPlayer->PlaySound((SoundID)27, 0, 0, -1, 0, 0, 0, 0); return; } if ( bUnderwater == 1 ) { - v23 = pGlobalTXT_LocalizationStrings[652]; //"You can not do that while you are underwater!" - ShowStatusBarString(v23, 2u); - v4 = 0; - v61 = v4; - v52 = v4; - v48 = v4; - v45 = v4; - v43 = -1; - v41 = v4; - v39 = v4; - v37 = (SoundID)27; - pAudioPlayer->PlaySound(v37, v39, v41, v43, v45, v48, v52, v61); + ShowStatusBarString(pGlobalTXT_LocalizationStrings[652], 2u);//"You can not do that while you are underwater!" + pAudioPlayer->PlaySound((SoundID)27, 0, 0, -1, 0, 0, 0, 0); return; } dword_50C9AC = 1; @@ -7301,143 +7264,70 @@ if ( v72 ) { v66 = pParty->pPickedItem.GetDisplayName(); - v57 = pGlobalTXT_LocalizationStrings[380];//"You already know the %s spell" -LABEL_72: - sprintf(pTmpBuf, v57, v66); + sprintfex(pTmpBuf, pGlobalTXT_LocalizationStrings[380], v66);//"You already know the %s spell" ShowStatusBarString(pTmpBuf, 2u); -LABEL_92: - v61 = v4; - v52 = v4; - v48 = v4; - v45 = v4; - v43 = -1; - v41 = v4; - v39 = v4; - v37 = (SoundID)27; -LABEL_93: - v14 = pAudioPlayer; -LABEL_63: - pAudioPlayer->PlaySound(v37, v39, v41, v43, v45, v48, v52, v61); + pAudioPlayer->PlaySound((SoundID)27, 0, 0, -1, 0, 0, 0, 0); return; } if ( !pParty->pPlayers[player_num-1].CanAct() ) { v66 = aCharacterConditionNames[v3->GetMajorConditionIdx()]; - v57 = pGlobalTXT_LocalizationStrings[382];//"That player is %s" - sprintf(pTmpBuf, v57, v66); + sprintfex(pTmpBuf, pGlobalTXT_LocalizationStrings[382], v66);//"That player is %s" ShowStatusBarString(pTmpBuf, 2u); - v61 = v4; - v52 = v4; - v48 = v4; - v45 = v4; - v43 = -1; - v41 = v4; - v39 = v4; - v37 = (SoundID)27; - v14 = pAudioPlayer; - pAudioPlayer->PlaySound(v37, v39, v41, v43, v45, v48, v52, v61); + pAudioPlayer->PlaySound((SoundID)27, 0, 0, -1, 0, 0, 0, 0); return; } v16 = v15 % 11 + 1; v17 = v3->pActiveSkills[v15 / 11 + 12]; - v75 = v16; v18 = SkillToMastery(v17) - 1; - if ( v18 ) + switch (v18) + { + case 0: v67 = 4; break; + case 1: v67 = 7; break; + case 2: v67 = 10; break; + case 3: v67 = 11; break; + default: + v67 = player_num; + } + + if ( v16 > v67 || !v17 ) { - v19 = v18 - 1; - if ( v19 ) + v22 = pParty->pPickedItem.GetDisplayName(); + sprintfex(pTmpBuf, pGlobalTXT_LocalizationStrings[381], v22); //"You don't have the skill to learn %s" + ShowStatusBarString(pTmpBuf, 2u); + v3->PlaySound((PlayerSpeech)20, 0); + return; + } + // v72 = 1; + v3->PlaySound(SPEECH_21, 0); + v73 = 0; + + + if ( pGUIWindow_CurrentMenu && pGUIWindow_CurrentMenu->eWindowType != WINDOW_null) + { + if ( !v73 ) { - v20 = v19 - 1; - if ( v20 ) - { - if ( v20 != 1 ) - { - v21 = player_num; -LABEL_83: - if ( v75 > v21 || !v17 ) - { - v22 = pParty->pPickedItem.GetDisplayName(); - sprintfex(pTmpBuf, pGlobalTXT_LocalizationStrings[381], v22); - ShowStatusBarString(pTmpBuf, 2u); - v3->PlaySound((PlayerSpeech)20, 0); - return; - } - v72 = 1; - v3->PlaySound(SPEECH_21, 0); - v73 = 0; -LABEL_173: - v36 = pItemsTable->pItems[pParty->pPickedItem.uItemID].uEquipType; - if ( v36 == EQUIP_POTION ) - { - v71 = 0; - v60 = 0; - v51 = 0; - v47 = 0; - v44 = -1; - v42 = 0; - v40 = 0; - v38 = (SoundID)210; - } - else - { - if ( v36 != EQUIP_REAGENT ) - { -LABEL_178: - if ( pGUIWindow_CurrentMenu && pGUIWindow_CurrentMenu->eWindowType != WINDOW_null) - { - if ( !v73 ) - { - pMouse->RemoveHoldingItem(); - return; - } - pMessageQueue_50CBD0->AddMessage(UIMSG_Escape, 0, 0); - } - if ( v73 ) - { - if ( pParty->bTurnBasedModeOn ) - { - *(&pParty->field_16140 + player_num) = 100; - thisb->SetRecoveryTime(100); - pTurnEngine->_40471C(); - } - else - { - thisb->SetRecoveryTime((signed __int64)(flt_6BE3A4_debug_recmod1 * 213.3333333333333)); - } - } - pMouse->RemoveHoldingItem(); - return; - } - v71 = 0; - v60 = 0; - v51 = 0; - v47 = 0; - v44 = -1; - v42 = 0; - v40 = 0; - v38 = (SoundID)211; - } - pAudioPlayer->PlaySound(v38, v40, v42, v44, v47, v51, v60, v71); - goto LABEL_178; - } - v67 = 11; - } - else - { - v67 = 10; - } + pMouse->RemoveHoldingItem(); + return; + } + pMessageQueue_50CBD0->AddMessage(UIMSG_Escape, 0, 0); + } + if ( v73 ) + { + if ( pParty->bTurnBasedModeOn ) + { + pParty->pTurnBasedPlayerRecoveryTimes[player_num-1] = 100; + thisb->SetRecoveryTime(100); + pTurnEngine->_40471C(); } else { - v67 = 7; + thisb->SetRecoveryTime((signed __int64)(flt_6BE3A4_debug_recmod1 * 213.3333333333333)); } } - else - { - v67 = 4; - } - v21 = v67; - goto LABEL_83; + pMouse->RemoveHoldingItem(); + return; + } if ( pItemsTable->pItems[pParty->pPickedItem.uItemID].uEquipType == EQUIP_MESSAGE_SCROLL ) @@ -7446,30 +7336,13 @@ if ( pParty->pPlayers[player_num-1].CanAct() ) { CreateMsgScrollWindow(pParty->pPickedItem.uItemID); - v65 = 0; - v56 = SPEECH_37; -LABEL_67: - v3->PlaySound((PlayerSpeech)v56, v65); + v3->PlaySound(SPEECH_37, 0); return; } -LABEL_89: v68 = aCharacterConditionNames[v3->GetMajorConditionIdx()]; - v58 = pGlobalTXT_LocalizationStrings[382]; -LABEL_90: - sprintfex(pTmpBuf, v58, v68); - v23 = pTmpBuf; -LABEL_91: - ShowStatusBarString(v23, 2u); - v4 = 0; - v61 = v4; - v52 = v4; - v48 = v4; - v45 = v4; - v43 = -1; - v41 = v4; - v39 = v4; - v37 = (SoundID)27; - pAudioPlayer->PlaySound(v37, v39, v41, v43, v45, v48, v52, v61); + sprintfex(pTmpBuf, pGlobalTXT_LocalizationStrings[382], v68); + ShowStatusBarString(pTmpBuf, 2u); + pAudioPlayer->PlaySound((SoundID)27, 0, 0, -1, 0, 0, 0, 0); return; } else @@ -7478,90 +7351,54 @@ { thisa = pParty->uCurrentMonthWeek + 1; if ( pParty->uCurrentMonth >= 7 ) - v74 = 0; + v74 = NULL; else v74 = aAttributeNames[pParty->uCurrentMonth]; switch ( pParty->uCurrentMonth ) { case 0: - v6 = pParty->uCurrentMonthWeek + 1; v3->uMight += thisa; - v62 = pGlobalTXT_LocalizationStrings[121]; //"Permanent" - v53 = v74; - v49 = v6; - sprintf(pTmpBuf, "+%u %s %s", v49, v53, v62); + sprintf(pTmpBuf, "+%u %s %s", thisa, v74, pGlobalTXT_LocalizationStrings[121]);//"Permanent" break; case 1: - v6 = pParty->uCurrentMonthWeek + 1; v3->uIntelligence += thisa; - v62 = pGlobalTXT_LocalizationStrings[121]; - v53 = v74; - v49 = v6; - sprintf(pTmpBuf, "+%u %s %s", v49, v53, v62); + sprintf(pTmpBuf, "+%u %s %s", thisa, v74, pGlobalTXT_LocalizationStrings[121]);//"Permanent" break; case 2: - v6 = pParty->uCurrentMonthWeek + 1; v3->uWillpower += thisa; - v62 = pGlobalTXT_LocalizationStrings[121]; - v53 = v74; - v49 = v6; - sprintf(pTmpBuf, "+%u %s %s", v49, v53, v62); + sprintf(pTmpBuf, "+%u %s %s", thisa, v74, pGlobalTXT_LocalizationStrings[121]);//"Permanent" break; case 3: - v6 = pParty->uCurrentMonthWeek + 1; v3->uEndurance += thisa; - v62 = pGlobalTXT_LocalizationStrings[121]; - v53 = v74; - v49 = v6; - sprintf(pTmpBuf, "+%u %s %s", v49, v53, v62); + sprintf(pTmpBuf, "+%u %s %s", thisa, v74, pGlobalTXT_LocalizationStrings[121]);//"Permanent" break; case 4: - v6 = pParty->uCurrentMonthWeek + 1; v3->uAccuracy += thisa; - v62 = pGlobalTXT_LocalizationStrings[121]; - v53 = v74; - v49 = v6; - sprintf(pTmpBuf, "+%u %s %s", v49, v53, v62); + sprintf(pTmpBuf, "+%u %s %s", thisa, v74, pGlobalTXT_LocalizationStrings[121]);//"Permanent" break; case 5: - v6 = pParty->uCurrentMonthWeek + 1; v3->uSpeed += thisa; - v62 = pGlobalTXT_LocalizationStrings[121]; - v53 = v74; - v49 = v6; - sprintf(pTmpBuf, "+%u %s %s", v49, v53, v62); + sprintf(pTmpBuf, "+%u %s %s", thisa, v74, pGlobalTXT_LocalizationStrings[121]);//"Permanent" break; case 6: - v6 = pParty->uCurrentMonthWeek + 1; v3->uLuck += thisa; - v62 = pGlobalTXT_LocalizationStrings[121]; - v53 = v74; - v49 = v6; - sprintf(pTmpBuf, "+%u %s %s", v49, v53, v62); + sprintf(pTmpBuf, "+%u %s %s", thisa, v74, pGlobalTXT_LocalizationStrings[121]);//"Permanent" break; case 7: party_finds_gold(1000 * thisa, 0); - v63 = pGlobalTXT_LocalizationStrings[97];//"Gold" - v54 = 1000 * thisa; - sprintf(pTmpBuf, "+%u %s", v54, v63); + sprintf(pTmpBuf, "+%u %s", 1000 * thisa, pGlobalTXT_LocalizationStrings[97]);//"Gold" break; case 8: Party::GiveFood(5 * thisa); - v63 = pGlobalTXT_LocalizationStrings[653]; //"Food" - v54 = 5 * thisa; - sprintf(pTmpBuf, "+%u %s", v54, v63); + sprintf(pTmpBuf, "+%u %s",5 * thisa , pGlobalTXT_LocalizationStrings[653]);//"Food" break; case 9u: - v63 = pGlobalTXT_LocalizationStrings[LOCSTR_SKILL_POINTS]; v3->uSkillPoints += 2 * thisa; - v54 = 2 * thisa; - sprintf(pTmpBuf, "+%u %s", v54, v63); + sprintf(pTmpBuf, "+%u %s", 2 * thisa, pGlobalTXT_LocalizationStrings[LOCSTR_SKILL_POINTS]); break; case 10: - v63 = pGlobalTXT_LocalizationStrings[LOCSTR_EXPIRIENCE]; - v54 = 2500 * thisa; v3->uExperience += 2500 * thisa; - sprintf(pTmpBuf, "+%u %s", v54, v63); + sprintf(pTmpBuf, "+%u %s", 2500 * thisa, pGlobalTXT_LocalizationStrings[LOCSTR_EXPIRIENCE]); break; case 11: v8 = rand() % 6; @@ -7592,10 +7429,7 @@ v13 = pGlobalTXT_LocalizationStrings[29]; break; } - v62 = pGlobalTXT_LocalizationStrings[121]; - v53 = v13; - v49 = thisa; - sprintf(pTmpBuf, "+%u %s %s", v49, v53, v62); + sprintf(pTmpBuf, "+%u %s %s", thisa, v13, pGlobalTXT_LocalizationStrings[121]); break; } @@ -7603,7 +7437,7 @@ pMouse->RemoveHoldingItem(); pGame->pStru6Instance->SetPlayerBuffAnim(0x97u, player_num - 1); v3->PlaySound(SPEECH_93, 0); - pAudioPlayer->PlaySound((SoundID)(SOUND_Bell|0x2), 0, 0, -1, 0, 0, 0, 0); + pAudioPlayer->PlaySound((SoundID)219, 0, 0, -1, 0, 0, 0, 0); if ( pParty->uDaysPlayed == 6 || pParty->uDaysPlayed == 20 ) { v3->SetCondition(Condition_Eradicated, 0); @@ -7642,11 +7476,10 @@ pAudioPlayer->PlaySound((SoundID)135, 0, 0, -1, 0, 0, 0, 0); return; } - else if ( pParty->pPickedItem.uItemID == 646 ) + else if ( pParty->pPickedItem.uItemID == 646 ) //Horseshoe { pGame->pStru6Instance->SetPlayerBuffAnim(0x97u, player_num - 1); - v5 = 8 * player_num + 392; - LOBYTE(v5) = PID(OBJECT_Player,player_num - 120); + v5 = PID(OBJECT_Player,player_num + 49); pAudioPlayer->PlaySound(SOUND_20001, v5, 0, -1, 0, 0, 0, 0); v3->AddVariable(VAR_NumSkillPoints, 2); } @@ -7659,24 +7492,12 @@ { v68 = pParty->pPickedItem.GetDisplayName(); - v58 = pGlobalTXT_LocalizationStrings[36]; - sprintfex(pTmpBuf, v58, v68); - v23 = pTmpBuf; - ShowStatusBarString(v23, 2u); - v4 = 0; - v61 = v4; - v52 = v4; - v48 = v4; - v45 = v4; - v43 = -1; - v41 = v4; - v39 = v4; - v37 = (SoundID)27; - pAudioPlayer->PlaySound(v37, v39, v41, v43, v45, v48, v52, v61); + sprintfex(pTmpBuf, pGlobalTXT_LocalizationStrings[36],v68);//"%s can not be used that way" + ShowStatusBarString(pTmpBuf, 2u); + pAudioPlayer->PlaySound((SoundID)27, 0, 0, -1, 0, 0, 0, 0); return; } - -LABEL_187: + pMouse->RemoveHoldingItem(); return; }