Mercurial > mm7
diff CastSpellInfo.cpp @ 1682:3c451fd02fcf
OnInventoryLeftClick cleanup
author | Grumpy7 |
---|---|
date | Fri, 20 Sep 2013 10:23:54 +0200 |
parents | 7182930263b3 |
children | 8251e59fd7c1 |
line wrap: on
line diff
--- a/CastSpellInfo.cpp Thu Sep 19 08:26:28 2013 +0200 +++ b/CastSpellInfo.cpp Fri Sep 20 10:23:54 2013 +0200 @@ -1020,9 +1020,9 @@ break; } - dword_50C9D0 = 113; - dword_50C9D4 = 0; - dword_50C9D8 = 1; + _50C9D0_AfterEnchClickEventId = 113; + _50C9D4_AfterEnchClickEventSecondParam = 0; + _50C9D8_AfterEnchClickEventTimeout = 1; ShowStatusBarString(pGlobalTXT_LocalizationStrings[428], 2); // Spell failed pAudioPlayer->PlaySound(SOUND_PlayerCantCastSpell, 0, 0, -1, 0, 0, 0, 0); @@ -1886,9 +1886,9 @@ if ( pItemsTable->pItems[v240->uItemID].uEquipType != 12 || v240->uAttributes & 2 ) { - dword_50C9D0 = 113; - dword_50C9D4 = 0; - dword_50C9D8 = 1; + _50C9D0_AfterEnchClickEventId = 113; + _50C9D4_AfterEnchClickEventSecondParam = 0; + _50C9D8_AfterEnchClickEventTimeout = 1; ShowStatusBarString(pGlobalTXT_LocalizationStrings[428], 2); // Spell failed pAudioPlayer->PlaySound(SOUND_PlayerCantCastSpell, 0, 0, -1, 0, 0, 0, 0); @@ -1919,9 +1919,9 @@ if ( uNewCharges <= 0 ) { v240 = 0; - dword_50C9D0 = 113; - dword_50C9D4 = 0; - dword_50C9D8 = 1; + _50C9D0_AfterEnchClickEventId = 113; + _50C9D4_AfterEnchClickEventSecondParam = 0; + _50C9D8_AfterEnchClickEventTimeout = 1; ShowStatusBarString(pGlobalTXT_LocalizationStrings[428], 2u); pAudioPlayer->PlaySound(SOUND_PlayerCantCastSpell, 0, 0, -1, 0, 0, 0, 0); pCastSpell->uSpellID = 0; @@ -1936,7 +1936,7 @@ case SPELL_WATER_ENCHANT_ITEM: { if ( !pPlayer->CanCastSpell(uRequiredMana) ) - break; + break; uRequiredMana = 0; amount = 10 * v2; v730 = 1; @@ -3650,9 +3650,9 @@ || (v591 = _v732->uEquipType) != 0 && v591 != 1 && v591 != 2 || pItemsTable->IsMaterialNonCommon(_v733) ) { - dword_50C9D0 = 113; - dword_50C9D4 = 0; - dword_50C9D8 = 1; + _50C9D0_AfterEnchClickEventId = 113; + _50C9D4_AfterEnchClickEventSecondParam = 0; + _50C9D8_AfterEnchClickEventTimeout = 1; ShowStatusBarString(pGlobalTXT_LocalizationStrings[428], 2); // Spell failed pAudioPlayer->PlaySound(SOUND_PlayerCantCastSpell, 0, 0, -1, 0, 0, 0, 0); @@ -4102,7 +4102,7 @@ pGUIWindow_Settings = 0; pMouse->SetCursorBitmap("MICON1"); GameUI_Footer_TimeLeft = 0; - unk_50C9A0 = 0; + _50C9A0_IsEnchantingInProgress = 0; back_to_game(); } } @@ -4329,7 +4329,7 @@ pGUIWindow_Settings = nullptr; pMouse->SetCursorBitmap("MICON1"); GameUI_Footer_TimeLeft = 0; - unk_50C9A0 = 0; + _50C9A0_IsEnchantingInProgress = 0; back_to_game(); } } @@ -4377,7 +4377,7 @@ if ( !pIcons_LOD->uNumPrevLoadedFiles ) pIcons_LOD->uNumPrevLoadedFiles = pIcons_LOD->uNumLoadedFiles; pGUIWindow_Settings = pCastSpellInfo[result].GetCastSpellInInventoryWindow(); - unk_50C9A0 = 1; + _50C9A0_IsEnchantingInProgress = 1; some_active_character = uActiveCharacter; sub_421B2C_PlaceInInventory_or_DropPickedItem(); return;