Mercurial > mm7
diff Actor.cpp @ 1861:a86c60679949
changing most of party arrays to std::arrays, some minor cleanups in actor.cpp
author | Grumpy7 |
---|---|
date | Mon, 14 Oct 2013 06:32:30 +0200 |
parents | 3186f469323a |
children | a2bdc17ffd2f |
line wrap: on
line diff
--- a/Actor.cpp Mon Oct 14 03:22:34 2013 +0200 +++ b/Actor.cpp Mon Oct 14 06:32:30 2013 +0200 @@ -200,7 +200,7 @@ } //----- (00404AC7) -------------------------------------------------------- -void __fastcall Actor::AI_SpellAttack(unsigned int uActorID, AIDirection *pDir, int uSpellID, int a4, unsigned int uSkillLevel) +void Actor::AI_SpellAttack(unsigned int uActorID, AIDirection *pDir, int uSpellID, int a4, unsigned int uSkillLevel) { Actor *actorPtr; // esi@1 unsigned int realPoints; // edi@1 @@ -749,14 +749,15 @@ v2 = (a1->pMonsterInfo.uID - 1) / 3 + 1; if ( !v3 ) v3 = (a2->pMonsterInfo.uID - 1) / 3 + 1; - if ( (signed int)v2 >= 39 && (signed int)v2 <= 44 && (signed int)v3 >= 39 && (signed int)v3 <= 44 - || (signed int)v2 >= 45 && (signed int)v2 <= 50 && (signed int)v3 >= 45 && (signed int)v3 <= 50 - || (signed int)v2 >= 51 && (signed int)v2 <= 62 && (signed int)v3 >= 51 && (signed int)v3 <= 62 - || (signed int)v2 >= 78 && (signed int)v2 <= 83 && (signed int)v3 >= 78 && (signed int)v3 <= 83 ) - result = 1; + if ( v2 >= 39 && v2 <= 44 && v3 >= 39 && v3 <= 44 + || v2 >= 45 && v2 <= 50 && v3 >= 45 && v3 <= 50 + || v2 >= 51 && v2 <= 62 && v3 >= 51 && v3 <= 62 + || v2 >= 78 && v2 <= 83 && v3 >= 78 && v3 <= 83 + || v2 == v3 + ) + return true; else - result = v2 == v3; - return result; + return false; } //----- (0043AC45) -------------------------------------------------------- @@ -766,13 +767,15 @@ int v5; // ST1C_4@8 int v6; // eax@8 - auto victim = &pActors[uActorID]; + int x = 0; BYTE2(x) |= 8u; + int y = 0; y |= 0x80000; + Actor* victim = &pActors[uActorID]; if ( a2 == 1 ) - BYTE2(victim->uAttributes) |= 8u; + victim->uAttributes |= 0x80000; for (uint i = 0; i < uNumActors; ++i) { - auto actor = &pActors[i]; + Actor* actor = &pActors[i]; if (!actor->CanAct() || i == uActorID) continue; @@ -785,7 +788,8 @@ { actor->pMonsterInfo.uHostilityType = MonsterInfo::Hostility_Long; if ( a2 == 1 ) - BYTE2(actor->uAttributes) |= 8u; + actor->uAttributes |= 0x80000; + } } }