# HG changeset patch # User Grumpy7 # Date 1387499319 -3600 # Node ID 16f5a7ca289a77d7da831bbfecdd2abb8c536965 # Parent 85e9766d6124322f663e2dc6c7bc556e4d7af2ef# Parent b52c09e01e7ece3678623695412a5d2c6b72eea2 Merge diff -r b52c09e01e7e -r 16f5a7ca289a Spells.cpp --- a/Spells.cpp Fri Dec 20 00:37:39 2013 +0600 +++ b/Spells.cpp Fri Dec 20 01:28:39 2013 +0100 @@ -412,17 +412,17 @@ test= tolower(test_string[j]); switch (test) { - case 109: - pSpellDatas[i].field_12|=1; + case 'm': + pSpellDatas[i].stats|=1; break; - case 101: - pSpellDatas[i].field_12|=2; + case 'e': + pSpellDatas[i].stats|=2; break; - case 99: - pSpellDatas[i].field_12|=4; + case 'c': + pSpellDatas[i].stats|=4; break; - case 120: - pSpellDatas[i].field_12|=8; + case 'x': + pSpellDatas[i].stats|=8; break; } } @@ -1163,16 +1163,9 @@ pAudioPlayer->PlaySound((SoundID)word_4EE088_sound_ids[uSpellID], 0, 0, fromx, fromy, 0, 0, 0); } //----- (00427769) -------------------------------------------------------- -bool __fastcall sub_427769_spell(unsigned int uSpellID) +bool sub_427769_isSpellQuickCastableOnShiftClick(unsigned int uSpellID) { - bool result; // eax@2 - - __debugbreak(); // wut is dat? - if ( pSpellDatas[uSpellID].field_12 & 0xC ) - result = 1; - else - result = 0; - return result; + return ( pSpellDatas[uSpellID].stats & 0xC ); } //----- (0043AFE3) -------------------------------------------------------- int __fastcall _43AFE3_calc_spell_damage(int a1, int a2, signed int a3, int a4) diff -r b52c09e01e7e -r 16f5a7ca289a Spells.h --- a/Spells.h Fri Dec 20 00:37:39 2013 +0600 +++ b/Spells.h Fri Dec 20 01:28:39 2013 +0100 @@ -242,7 +242,7 @@ }; }; __int16 field_10; - __int16 field_12; + __int16 stats; // char field_12; // char field_13; // __int16 field_14; diff -r b52c09e01e7e -r 16f5a7ca289a Viewport.cpp --- a/Viewport.cpp Fri Dec 20 00:37:39 2013 +0600 +++ b/Viewport.cpp Fri Dec 20 01:28:39 2013 +0100 @@ -487,7 +487,7 @@ pParty->uFlags |= PARTY_FLAGS_1_FALLING; return; } - if ( uActiveCharacter && sub_427769_spell(pPlayers[uActiveCharacter]->uQuickSpell)) + if ( uActiveCharacter && sub_427769_isSpellQuickCastableOnShiftClick(pPlayers[uActiveCharacter]->uQuickSpell)) pMessageQueue_50CBD0->AddMessage(UIMSG_CastQuickSpell, 0, 0); } return; diff -r b52c09e01e7e -r 16f5a7ca289a mm7_data.h --- a/mm7_data.h Fri Dec 20 00:37:39 2013 +0600 +++ b/mm7_data.h Fri Dec 20 01:28:39 2013 +0100 @@ -1108,7 +1108,7 @@ bool PortalFrustrum(int pNumVertices, struct BspRenderer_PortalViewportData *a2, struct BspRenderer_PortalViewportData *near_portal, int uFaceID); int ODM_NearClip(unsigned int uVertexID); // idb int ODM_FarClip(unsigned int uNumVertices); -bool __fastcall sub_427769_spell(unsigned int uSpellID); +bool sub_427769_isSpellQuickCastableOnShiftClick(unsigned int uSpellID); void _42777D_CastSpell_UseWand_ShootArrow(int a1, unsigned int uPlayerID, unsigned int a4, __int16 a5, int a6); void _42ECB5_PlayerAttacksActor(); void InitializeTurnBasedAnimations(void *);