Mercurial > mm7
comparison Engine/MapInfo.cpp @ 2566:30eb6dcac768
big spell fx overhaul
author | a.parshin |
---|---|
date | Wed, 20 May 2015 21:05:07 +0200 |
parents | a902abdfc7f2 |
children | d569340b05ff |
comparison
equal
deleted
inserted
replaced
2565:117c219bf913 | 2566:30eb6dcac768 |
---|---|
437 return sub_450521_ProllyDropItemAt(v13, v22 % 27 + 20, v21, v20, v19, 0); | 437 return sub_450521_ProllyDropItemAt(v13, v22 % 27 + 20, v21, v20, v19, 0); |
438 } | 438 } |
439 if ( a2->uIndex == 1 ) | 439 if ( a2->uIndex == 1 ) |
440 { | 440 { |
441 v14 = rand() % 51 + 50; | 441 v14 = rand() % 51 + 50; |
442 a1a.stru_24.uItemID = 197; | 442 a1a.containing_item.uItemID = 197; |
443 v34 = v14; | 443 v34 = v14; |
444 } | 444 } |
445 else if ( a2->uIndex == 2 ) | 445 else if ( a2->uIndex == 2 ) |
446 { | 446 { |
447 v14 = rand() % 101 + 100; | 447 v14 = rand() % 101 + 100; |
448 a1a.stru_24.uItemID = 197; | 448 a1a.containing_item.uItemID = 197; |
449 v34 = v14; | 449 v34 = v14; |
450 } | 450 } |
451 else if ( a2->uIndex == 3 ) | 451 else if ( a2->uIndex == 3 ) |
452 { | 452 { |
453 v14 = rand() % 301 + 200; | 453 v14 = rand() % 301 + 200; |
454 a1a.stru_24.uItemID = 198; | 454 a1a.containing_item.uItemID = 198; |
455 v34 = v14; | 455 v34 = v14; |
456 } | 456 } |
457 else if ( a2->uIndex == 4 ) | 457 else if ( a2->uIndex == 4 ) |
458 { | 458 { |
459 v14 = rand() % 501 + 500; | 459 v14 = rand() % 501 + 500; |
460 a1a.stru_24.uItemID = 198; | 460 a1a.containing_item.uItemID = 198; |
461 v34 = v14; | 461 v34 = v14; |
462 } | 462 } |
463 else if ( a2->uIndex == 5 ) | 463 else if ( a2->uIndex == 5 ) |
464 { | 464 { |
465 v14 = rand() % 1001 + 1000; | 465 v14 = rand() % 1001 + 1000; |
466 a1a.stru_24.uItemID = 199; | 466 a1a.containing_item.uItemID = 199; |
467 v34 = v14; | 467 v34 = v14; |
468 } | 468 } |
469 else if ( a2->uIndex == 6 ) | 469 else if ( a2->uIndex == 6 ) |
470 { | 470 { |
471 v14 = rand() % 3001 + 2000; | 471 v14 = rand() % 3001 + 2000; |
472 a1a.stru_24.uItemID = 199; | 472 a1a.containing_item.uItemID = 199; |
473 v34 = v14; | 473 v34 = v14; |
474 } | 474 } |
475 v15 = 0; | 475 v15 = 0; |
476 v16 = pItemsTable->pItems[a1a.stru_24.uItemID].uSpriteID; | 476 v16 = pItemsTable->pItems[a1a.containing_item.uItemID].uSpriteID; |
477 a1a.uType = pItemsTable->pItems[a1a.stru_24.uItemID].uSpriteID; | 477 a1a.uType = (SPRITE_OBJECT_TYPE)pItemsTable->pItems[a1a.containing_item.uItemID].uSpriteID; |
478 v18 = 0; | 478 v18 = 0; |
479 for( int i = 0; i < pObjectList->uNumObjects; i++ ) | 479 for( int i = 0; i < pObjectList->uNumObjects; i++ ) |
480 { | 480 { |
481 if ( pObjectList->pObjects[i].uObjectID == v16 ) | 481 if ( pObjectList->pObjects[i].uObjectID == v16 ) |
482 { | 482 { |
483 v18 = i; | 483 v18 = i; |
484 break; | 484 break; |
485 } | 485 } |
486 } | 486 } |
487 a1a.stru_24.SetIdentified(); | 487 a1a.containing_item.SetIdentified(); |
488 a1a.uObjectDescID = v18; | 488 a1a.uObjectDescID = v18; |
489 a1a.stru_24.uSpecEnchantmentType = v34; | 489 a1a.containing_item.uSpecEnchantmentType = v34; |
490 } | 490 } |
491 else | 491 else |
492 { | 492 { |
493 result = a1a.stru_24.GenerateArtifact(); | 493 result = a1a.containing_item.GenerateArtifact(); |
494 if ( !result ) | 494 if ( !result ) |
495 return result; | 495 return result; |
496 v23 = 0; | 496 v23 = 0; |
497 v24 = pItemsTable->pItems[a1a.stru_24.uItemID].uSpriteID; | 497 v24 = pItemsTable->pItems[a1a.containing_item.uItemID].uSpriteID; |
498 a1a.uType = pItemsTable->pItems[a1a.stru_24.uItemID].uSpriteID; | 498 a1a.uType = (SPRITE_OBJECT_TYPE)pItemsTable->pItems[a1a.containing_item.uItemID].uSpriteID; |
499 v26 = 0; | 499 v26 = 0; |
500 for( int i = 0; i < pObjectList->uNumObjects; i++ ) | 500 for( int i = 0; i < pObjectList->uNumObjects; i++ ) |
501 { | 501 { |
502 if( v24 == pObjectList->pObjects[i].uObjectID ) | 502 if( v24 == pObjectList->pObjects[i].uObjectID ) |
503 { | 503 { |
504 v26 = i; | 504 v26 = i; |
505 break; | 505 break; |
506 } | 506 } |
507 } | 507 } |
508 a1a.uObjectDescID = v26; | 508 a1a.uObjectDescID = v26; |
509 a1a.stru_24.Reset(); | 509 a1a.containing_item.Reset(); |
510 } | 510 } |
511 a1a.vPosition.y = a2->vPosition.y; | 511 a1a.vPosition.y = a2->vPosition.y; |
512 a1a.uAttributes = 0; | 512 a1a.uAttributes = 0; |
513 a1a.uSoundID = 0; | 513 a1a.uSoundID = 0; |
514 a1a.uFacing = 0; | 514 a1a.uFacing = 0; |