comparison Actor.cpp @ 303:3dcc9d945eeb

DamageMonsterFromParty
author Nomad
date Tue, 19 Feb 2013 15:39:50 +0200
parents 0ea5fbd16edb
children cc8e4dc397ec 72faa54ff319
comparison
equal deleted inserted replaced
296:af7e848d6def 303:3dcc9d945eeb
295 v3 = this->uAIState; 295 v3 = this->uAIState;
296 return (v2 | v1 | v3 == Dying | v3 == Dead | v3 == Removed | v3 == Summoned | v3 == Disabled) == 0; 296 return (v2 | v1 | v3 == Dying | v3 == Dead | v3 == Removed | v3 == Summoned | v3 == Disabled) == 0;
297 } 297 }
298 298
299 //----- (004089C7) -------------------------------------------------------- 299 //----- (004089C7) --------------------------------------------------------
300 bool Actor::IsAlive() 300 bool Actor::IsNotAlive()
301 { 301 {
302 signed int v1; // esi@1 302 signed int v1; // esi@1
303 unsigned __int16 v2; // ax@3 303 //unsigned __int16 v2; // ax@3
304 304
305 v1 = 0; 305 v1 = 0;
306 if ( (signed __int64)this->pActorBuffs[5].uExpireTime > 0 ) 306 if (pActorBuffs[5].uExpireTime)
307 v1 = 1; 307 v1 = 1;
308 v2 = this->uAIState; 308 //v2 = this->uAIState;
309 return (v1 | (v2 == Dying) | (v2 == Dead) | (v2 == Removed) | (v2 == Summoned) | (v2 == Disabled)) != 0; 309 return (v1 | (uAIState == Dying) | (uAIState == Dead) | (uAIState == Removed) | (uAIState == Summoned) | (uAIState == Disabled)) != 0;
310 } 310 }
311 311
312 //----- (004086E9) -------------------------------------------------------- 312 //----- (004086E9) --------------------------------------------------------
313 void Actor::SetRandomGoldIfTheresNoItem() 313 void Actor::SetRandomGoldIfTheresNoItem()
314 { 314 {
587 a1.uSoundID = 0; 587 a1.uSoundID = 0;
588 a1.uAttributes = 0; 588 a1.uAttributes = 0;
589 a1.uSectorID = pIndoor->GetSector(v13, v14, v15); 589 a1.uSectorID = pIndoor->GetSector(v13, v14, v15);
590 v18 = 8 * LODWORD(v120); 590 v18 = 8 * LODWORD(v120);
591 LOBYTE(v18) = 8 * LOBYTE(v120) | AI_OBJECT_ACTOR; 591 LOBYTE(v18) = 8 * LOBYTE(v120) | AI_OBJECT_ACTOR;
592 a1.field_58 = v18; 592 a1.field_58_pid = v18;
593 a1.uSpriteFrameID = 0; 593 a1.uSpriteFrameID = 0;
594 a1.field_5C = 0; 594 a1.field_5C = 0;
595 a1.field_60_distance_related_prolly_lod = 3; 595 a1.field_60_distance_related_prolly_lod = 3;
596 v19 = spellnuma / -2; 596 v19 = spellnuma / -2;
597 a1a = spellnuma / 2; 597 a1a = spellnuma / 2;
670 v88 = pIndoor->GetSector(v83, v84, v85); 670 v88 = pIndoor->GetSector(v83, v84, v85);
671 v89 = v86->uDistance; 671 v89 = v86->uDistance;
672 a1.uSectorID = v88; 672 a1.uSectorID = v88;
673 LODWORD(v119) = v89; 673 LODWORD(v119) = v89;
674 v90 = 8 * LODWORD(v120); 674 v90 = 8 * LODWORD(v120);
675 LOBYTE(v90) = 8 * LOBYTE(v120) | 3; 675 LOBYTE(v90) = 8 * LOBYTE(v120) | OBJECT_Actor;
676 a1.uSpriteFrameID = 0; 676 a1.uSpriteFrameID = 0;
677 a1.field_58 = v90; 677 a1.field_58_pid = v90;
678 a1.field_5C = 0; 678 a1.field_5C = 0;
679 a1.field_60_distance_related_prolly_lod = 3; 679 a1.field_60_distance_related_prolly_lod = 3;
680 if ( (double)v89 >= 307.2 ) 680 if ( (double)v89 >= 307.2 )
681 { 681 {
682 if ( v89 >= 1024 ) 682 if ( v89 >= 1024 )
807 a1.field_48 = 9; 807 a1.field_48 = 9;
808 a1.field_50 = 0; 808 a1.field_50 = 0;
809 a1.uAttributes = 0; 809 a1.uAttributes = 0;
810 a1.uSectorID = 0; 810 a1.uSectorID = 0;
811 a1.uSpriteFrameID = 0; 811 a1.uSpriteFrameID = 0;
812 a1.field_58 = v116; 812 a1.field_58_pid = v116;
813 a1.field_5C = 0; 813 a1.field_5C = 0;
814 a1.field_60_distance_related_prolly_lod = stru_50C198._427546(v30 + 2500); 814 a1.field_60_distance_related_prolly_lod = stru_50C198._427546(v30 + 2500);
815 a1.uFacing = v32; 815 a1.uFacing = v32;
816 a1.uSoundID = 0; 816 a1.uSoundID = 0;
817 v35 = v117->uDistance; 817 v35 = v117->uDistance;
1359 a1.uFacing = v77; 1359 a1.uFacing = v77;
1360 a1.uSoundID = 0; 1360 a1.uSoundID = 0;
1361 a1.uAttributes = 0; 1361 a1.uAttributes = 0;
1362 a1.uSectorID = pIndoor->GetSector(v73, v74, v75); 1362 a1.uSectorID = pIndoor->GetSector(v73, v74, v75);
1363 v78 = 8 * LODWORD(v120); 1363 v78 = 8 * LODWORD(v120);
1364 LOBYTE(v78) = 8 * LOBYTE(v120) | 3; 1364 LOBYTE(v78) = 8 * LOBYTE(v120) | OBJECT_Actor;
1365 a1.field_58 = v78; 1365 a1.field_58_pid = v78;
1366 a1.uSpriteFrameID = 0; 1366 a1.uSpriteFrameID = 0;
1367 a1.field_5C = 0; 1367 a1.field_5C = 0;
1368 a1.field_60_distance_related_prolly_lod = 3; 1368 a1.field_60_distance_related_prolly_lod = 3;
1369 a1c = spellnume / -2; 1369 a1c = spellnume / -2;
1370 if ( spellnume / -2 > spellnume / 2 ) 1370 if ( spellnume / -2 > spellnume / 2 )
1577 v11 = v4->uDistance; 1577 v11 = v4->uDistance;
1578 a1.uSectorID = v10; 1578 a1.uSectorID = v10;
1579 v12 = 8 * v15; 1579 v12 = 8 * v15;
1580 LOBYTE(v12) = 8 * v15 | AI_OBJECT_ACTOR; 1580 LOBYTE(v12) = 8 * v15 | AI_OBJECT_ACTOR;
1581 a1.uSpriteFrameID = 0; 1581 a1.uSpriteFrameID = 0;
1582 a1.field_58 = v12; 1582 a1.field_58_pid = v12;
1583 a1.field_5C = 0; 1583 a1.field_5C = 0;
1584 if ( (double)v11 >= 307.2 ) 1584 if ( (double)v11 >= 307.2 )
1585 { 1585 {
1586 if ( v11 >= 1024 ) 1586 if ( v11 >= 1024 )
1587 { 1587 {
1681 a1.vPosition.z = v6; 1681 a1.vPosition.z = v6;
1682 a1.uSoundID = 0; 1682 a1.uSoundID = 0;
1683 a1.uAttributes = 0; 1683 a1.uAttributes = 0;
1684 a1.uSectorID = pIndoor->GetSector(v5, a1.vPosition.y, v6); 1684 a1.uSectorID = pIndoor->GetSector(v5, a1.vPosition.y, v6);
1685 v7 = 8 * v10; 1685 v7 = 8 * v10;
1686 LOBYTE(v7) = 8 * v10 | 3; 1686 LOBYTE(v7) = 8 * v10 | OBJECT_Actor;
1687 a1.uSpriteFrameID = 0; 1687 a1.uSpriteFrameID = 0;
1688 a1.field_58 = v7; 1688 a1.field_58_pid = v7;
1689 a1.field_5C = 0; 1689 a1.field_5C = 0;
1690 a1.field_60_distance_related_prolly_lod = 3; 1690 a1.field_60_distance_related_prolly_lod = 3;
1691 a1.field_61 = 4; 1691 a1.field_61 = 4;
1692 return a1.Create(0, 0, 0, 0); 1692 return a1.Create(0, 0, 0, 0);
1693 } 1693 }
3866 ++v7; 3866 ++v7;
3867 v5 = v26++ + 1; 3867 v5 = v26++ + 1;
3868 continue; 3868 continue;
3869 } 3869 }
3870 } 3870 }
3871 else if ( v7->IsAlive() == 1 ) 3871 else if (v7->IsNotAlive())
3872 { 3872 {
3873 v24 = v4; 3873 v24 = v4;
3874 v3->uLastCharacterIDToHit = v4; 3874 v3->uLastCharacterIDToHit = v4;
3875 v10 = v3->GetActorsRelation(v7); 3875 v10 = v3->GetActorsRelation(v7);
3876 if ( v10 == v4 ) 3876 if ( v10 == v4 )