# HG changeset patch # User zipi # Date 1369666678 -3600 # Node ID 79010db96adef92a38c50c1e30d4f1ce6029d34e # Parent 3e5d70cfe20ede693696f5e5acb29b67160610b6 some spell fixes diff -r 3e5d70cfe20e -r 79010db96ade mm7_6.cpp --- a/mm7_6.cpp Mon May 27 12:45:17 2013 +0200 +++ b/mm7_6.cpp Mon May 27 15:57:58 2013 +0100 @@ -2560,7 +2560,7 @@ int v505; // eax@943 int v507; // edi@944 signed int v509; // eax@944 - signed int v510; // edi@944 + //signed int v510; // edi@944 Actor *v518; // edx@957 __int16 v519; // cx@958 int v531; // eax@982 @@ -5627,7 +5627,7 @@ pGame->GetStru6()->FadeScreen__like_Turn_Undead_and_mb_Armageddon(0xAFF0Au, 0xC0u); v505 = sub_46A6AC((int)dword_50BF30, 100, 4096); ++pSpellSprite.uType; - signed int _v733 = v505; + //signed int _v733 = v505; v688.x = 0; v688.y = 0; v688.z = 0; @@ -5644,23 +5644,17 @@ pSpellSprite.spell_caster_pid = PID(OBJECT_Player, pCastSpell->uPlayerID); pSpellSprite.uSoundID = LOWORD(pCastSpell->sound_id); a2 = 0; - if ( _v733 > 0 ) - { - do - { - v507 = dword_50BF30[a2]; - pSpellSprite.vPosition.x = pActors[v507].vPosition.x; - pSpellSprite.vPosition.y = pActors[v507].vPosition.y; - pSpellSprite.vPosition.z = pActors[v507].vPosition.z - (unsigned int)(signed __int64)((double)pActors[v507].uActorHeight * unk_4D8548); - pSpellSprite.spell_target_pid = PID(OBJECT_Actor, dword_50BF30[a2]); - v509 = pSpellSprite.Create(0, 0, 0, 0); - v510 = a2; - DamageMonsterFromParty(PID(OBJECT_Item, v509), dword_50BF30[a2], &v688); - a2 = v510 + 1; - } - while ( v510 + 1 < _v733 ); - } - for ( a2 = 0; a2 < _v733; ++a2 ) + for ( a2 = 0; a2 < v505; ++a2 ) + { + v507 = dword_50BF30[a2]; + pSpellSprite.vPosition.x = pActors[v507].vPosition.x; + pSpellSprite.vPosition.y = pActors[v507].vPosition.y; + pSpellSprite.vPosition.z = pActors[v507].vPosition.z - (unsigned int)(signed __int64)((double)pActors[v507].uActorHeight * unk_4D8548); + pSpellSprite.spell_target_pid = PID(OBJECT_Actor, dword_50BF30[a2]); + v509 = pSpellSprite.Create(0, 0, 0, 0); + DamageMonsterFromParty(PID(OBJECT_Item, v509), dword_50BF30[a2], &v688); + } + for ( a2 = 0; a2 < v505; ++a2 ) { pActor = &pActors[dword_50BF30[a2]]; pSpellSprite.vPosition.x = pActor->vPosition.x; diff -r 3e5d70cfe20e -r 79010db96ade stru6.cpp --- a/stru6.cpp Mon May 27 12:45:17 2013 +0200 +++ b/stru6.cpp Mon May 27 15:57:58 2013 +0100 @@ -878,6 +878,7 @@ if ( result < 545 ) { __debugbreak(); // find out what kind of spells are these + // when summoned light elemental attacks result -= 500; switch ( result )