Mercurial > mm7
comparison Actor.cpp @ 1877:bed4532cfe59
Actor::StealFrom changed signature to void, minor cleanup
author | Grumpy7 |
---|---|
date | Thu, 17 Oct 2013 09:10:18 +0200 |
parents | 2070d01ccfae |
children | 6ffa3228eaf7 |
comparison
equal
deleted
inserted
replaced
1876:2070d01ccfae | 1877:bed4532cfe59 |
---|---|
1464 || (signed int)v1 >= 51 && (signed int)v1 <= 62 | 1464 || (signed int)v1 >= 51 && (signed int)v1 <= 62 |
1465 || (signed int)v1 >= 78 && (signed int)v1 <= 83; | 1465 || (signed int)v1 >= 78 && (signed int)v1 <= 83; |
1466 } | 1466 } |
1467 | 1467 |
1468 //----- (0042EBEE) -------------------------------------------------------- | 1468 //----- (0042EBEE) -------------------------------------------------------- |
1469 bool Actor::StealFrom(unsigned int uActorID) | 1469 void Actor::StealFrom( unsigned int uActorID ) |
1470 { | 1470 { |
1471 unsigned int v1; // esi@1 | |
1472 Player *pPlayer; // edi@1 | 1471 Player *pPlayer; // edi@1 |
1473 bool result; // eax@1 | |
1474 int v4; // ebx@2 | 1472 int v4; // ebx@2 |
1475 unsigned int v5; // eax@2 | 1473 unsigned int v5; // eax@2 |
1476 DDM_DLV_Header *v6; // esi@4 | 1474 DDM_DLV_Header *v6; // esi@4 |
1477 unsigned int v7; // [sp+8h] [bp-4h]@1 | |
1478 int v8; // [sp+8h] [bp-4h]@6 | 1475 int v8; // [sp+8h] [bp-4h]@6 |
1479 | 1476 |
1480 v1 = uActiveCharacter; | |
1481 v7 = uActorID; | |
1482 pPlayer = &pParty->pPlayers[uActiveCharacter-1]; | 1477 pPlayer = &pParty->pPlayers[uActiveCharacter-1]; |
1483 result = pPlayer->CanAct(); | 1478 if ( pPlayer->CanAct() ) |
1484 if ( result ) | |
1485 { | 1479 { |
1486 CastSpellInfoHelpers::_427D48(); | 1480 CastSpellInfoHelpers::_427D48(); |
1487 v4 = 0; | 1481 v4 = 0; |
1488 v5 = pMapStats->GetMapInfo(pCurrentMapName); | 1482 v5 = pMapStats->GetMapInfo(pCurrentMapName); |
1489 if ( v5 ) | 1483 if ( v5 ) |
1490 v4 = pMapStats->pInfos[v5]._steal_perm; | 1484 v4 = pMapStats->pInfos[v5]._steal_perm; |
1491 v6 = &pOutdoor->ddm; | 1485 v6 = &pOutdoor->ddm; |
1492 if ( uCurrentlyLoadedLevelType != LEVEL_Outdoor) | 1486 if ( uCurrentlyLoadedLevelType != LEVEL_Outdoor) |
1493 v6 = &pIndoor->dlv; | 1487 v6 = &pIndoor->dlv; |
1494 pPlayer->StealFromActor(v7, v4, v6->uReputation++); | 1488 pPlayer->StealFromActor(uActorID, v4, v6->uReputation++); |
1495 v8 = pPlayer->GetAttackRecoveryTime(0); | 1489 v8 = pPlayer->GetAttackRecoveryTime(0); |
1496 if ( v8 < 30 ) | 1490 if ( v8 < 30 ) |
1497 v8 = 30; | 1491 v8 = 30; |
1498 if ( !pParty->bTurnBasedModeOn ) | 1492 if ( !pParty->bTurnBasedModeOn ) |
1499 pPlayer->SetRecoveryTime((signed __int64)(flt_6BE3A4_debug_recmod1 * (double)v8 * 2.133333333333333)); | 1493 pPlayer->SetRecoveryTime((int)(flt_6BE3A4_debug_recmod1 * v8 * 2.133333333333333)); |
1500 pTurnEngine->ApplyPlayerAction(); | 1494 pTurnEngine->ApplyPlayerAction(); |
1501 result = 1; | 1495 } |
1502 } | 1496 return; |
1503 return result; | |
1504 } | 1497 } |
1505 | 1498 |
1506 //----- (00403A60) -------------------------------------------------------- | 1499 //----- (00403A60) -------------------------------------------------------- |
1507 void Actor::AI_SpellAttack2(unsigned int uActorID, signed int edx0, AIDirection *pDir) | 1500 void Actor::AI_SpellAttack2(unsigned int uActorID, signed int edx0, AIDirection *pDir) |
1508 { | 1501 { |