Mercurial > mm7
diff Engine/Objects/Actor.cpp @ 2566:30eb6dcac768
big spell fx overhaul
author | a.parshin |
---|---|
date | Wed, 20 May 2015 21:05:07 +0200 |
parents | b8a56afc6ba1 |
children | d569340b05ff |
line wrap: on
line diff
--- a/Engine/Objects/Actor.cpp Wed May 20 15:12:33 2015 +0200 +++ b/Engine/Objects/Actor.cpp Wed May 20 21:05:07 2015 +0200 @@ -278,9 +278,9 @@ case SPELL_LIGHT_LIGHT_BOLT: case SPELL_DARK_TOXIC_CLOUD: case SPELL_DARK_DRAGON_BREATH: - a1.uType = stru_4E3ACC[uSpellID].uType; + a1.uType = spell_sprite_mapping[uSpellID].uSpriteType; a1.uObjectDescID = GetObjDescId(uSpellID); - a1.stru_24.Reset(); + a1.containing_item.Reset(); a1.spell_id = uSpellID; a1.spell_level = uSkillLevel; a1.vPosition.x = actorPtr->vPosition.x; @@ -358,8 +358,8 @@ v32 = stru_5C6E00->Atan2(spellnumb, (int)v28); pitch = stru_5C6E00->Atan2(v31, (int)spellnumc); } - a1.stru_24.Reset(); - a1.uType = stru_4E3ACC[uSpellID].uType; + a1.containing_item.Reset(); + a1.uType = spell_sprite_mapping[uSpellID].uSpriteType; a1.uObjectDescID = GetObjDescId(uSpellID); a1.spell_level = uSkillLevel; a1.vPosition.x = pParty->vPosition.x; @@ -403,11 +403,11 @@ else v10 = 3; spellnuma = (signed int)(60 * stru_5C6E00->uIntegerDoublePi) / 360; - a1.uType = stru_4E3ACC[uSpellID].uType; + a1.uType = spell_sprite_mapping[uSpellID].uSpriteType; v118 = (signed int)(60 * stru_5C6E00->uIntegerDoublePi) / 360 / (v10 - 1); a1.uObjectDescID = GetObjDescId(uSpellID); - a1.stru_24.Reset(); + a1.containing_item.Reset(); a1.spell_id = SPELL_AIR_SPARKS; a1.spell_level = uSkillLevel; a1.vPosition.x = actorPtr->vPosition.x; @@ -615,10 +615,10 @@ v70 = 3; spellnume = (signed int)(60 * stru_5C6E00->uIntegerDoublePi) / 360; - a1.uType = stru_4E3ACC[uSpellID].uType; + a1.uType = spell_sprite_mapping[uSpellID].uSpriteType; v116 = (signed int)(60 * stru_5C6E00->uIntegerDoublePi) / 360 / (v70 - 1); a1.uObjectDescID = GetObjDescId(uSpellID); - a1.stru_24.Reset(); + a1.containing_item.Reset(); a1.spell_id = uSpellID; a1.spell_level = uSkillLevel; a1.vPosition.x = actorPtr->vPosition.x; @@ -677,7 +677,7 @@ { for (unsigned int i = 0; i < pObjectList->uNumObjects; i++) { - if (stru_4E3ACC[spellId].uType == pObjectList->pObjects[i].uObjectID) + if (spell_sprite_mapping[spellId].uSpriteType == pObjectList->pObjects[i].uObjectID) { return i; break; @@ -758,40 +758,40 @@ switch ( type ) { case 1: - a1.uType = 545; + a1.uType = SPRITE_PROJECTILE_545; break; case 2: - a1.uType = 550; + a1.uType = SPRITE_PROJECTILE_550; break; case 3: - a1.uType = 510; + a1.uType = SPRITE_PROJECTILE_510; break; case 4: - a1.uType = 500; + a1.uType = SPRITE_PROJECTILE_500; break; case 5: - a1.uType = 515; + a1.uType = SPRITE_PROJECTILE_515; break; case 6: - a1.uType = 505; + a1.uType = SPRITE_PROJECTILE_505; break; case 7: - a1.uType = 530; + a1.uType = SPRITE_PROJECTILE_530; break; case 8: - a1.uType = 525; + a1.uType = SPRITE_PROJECTILE_525; break; case 9: - a1.uType = 520; + a1.uType = SPRITE_PROJECTILE_520; break; case 10: - a1.uType = 535; + a1.uType = SPRITE_PROJECTILE_535; break; case 11: - a1.uType = 540; + a1.uType = SPRITE_PROJECTILE_540; break; case 13: - a1.uType = 555; + a1.uType = SPRITE_PROJECTILE_555; break; default: return; @@ -811,7 +811,7 @@ Error("Item not found"); return; } - a1.stru_24.Reset(); + a1.containing_item.Reset(); a1.spell_id = 0; a1.vPosition.x = pActors[uActorID].vPosition.x; a1.vPosition.y = pActors[uActorID].vPosition.y; @@ -862,9 +862,9 @@ { SpriteObject a1; // [sp+Ch] [bp-78h]@1 - a1.uType = 600; + a1.uType = SPRITE_600; a1.uObjectDescID = GetObjDescId(a1.uType); - a1.stru_24.Reset(); + a1.containing_item.Reset(); a1.spell_id = 0; a1.spell_level = 0; a1.spell_skill = 0; @@ -1986,15 +1986,17 @@ if (rand() % 100 < 20 && drop.uItemID != 0) { - SpriteObject::sub_42F7EB_DropItemAt(pItemsTable->pItems[drop.uItemID].uSpriteID, - actor->vPosition.x, - actor->vPosition.y, - actor->vPosition.z + 16, - rand() % 200 + 200, - 1, - 1, - 0, - &drop); + SpriteObject::sub_42F7EB_DropItemAt( + (SPRITE_OBJECT_TYPE)pItemsTable->pItems[drop.uItemID].uSpriteID, + actor->vPosition.x, + actor->vPosition.y, + actor->vPosition.z + 16, + rand() % 200 + 200, + 1, + 1, + 0, + &drop + ); } if (actor->pMonsterInfo.uSpecialAbilityType == MONSTER_SPECIAL_ABILITY_EXPLODE) @@ -3608,7 +3610,7 @@ if ( pMonster->pActorBuffs[ACTOR_BUFF_SHIELD].uExpireTime > 0 ) uDamageAmount /= 2; IsAdditionalDamagePossible = true; - if ( projectileSprite->stru_24.uItemID != 0 && projectileSprite->stru_24.uSpecEnchantmentType == 3 ) //of carnage + if (projectileSprite->containing_item.uItemID != 0 && projectileSprite->containing_item.uSpecEnchantmentType == 3) //of carnage { attackElement = DMGT_FIRE; } @@ -3641,7 +3643,7 @@ { if ( projectileSprite ) { - a4 = projectileSprite->stru_24._439DF3_get_additional_damage((int*)&attackElement, &isLifeStealing); + a4 = projectileSprite->containing_item._439DF3_get_additional_damage((int*)&attackElement, &isLifeStealing); if ( isLifeStealing && pMonster->sCurrentHP > 0 ) { player->sHealth += v61 / 5;