comparison Actor.cpp @ 1449:27b7ee003c7c

Merge
author Gloval
date Tue, 06 Aug 2013 00:56:33 +0400
parents 5a5d0c713d47 204cce84300b
children 8ff3c675a726
comparison
equal deleted inserted replaced
1448:5a5d0c713d47 1449:27b7ee003c7c
3039 } 3039 }
3040 3040
3041 //----- (00402CED) -------------------------------------------------------- 3041 //----- (00402CED) --------------------------------------------------------
3042 void Actor::PlaySound(unsigned int uActorID, unsigned int uSoundID) 3042 void Actor::PlaySound(unsigned int uActorID, unsigned int uSoundID)
3043 { 3043 {
3044 Actor *v2; // eax@1 3044 //Actor *v2; // eax@1
3045 unsigned __int16 v3; // dx@1 3045 unsigned __int16 v3; // dx@1
3046 int v4; // eax@3 3046 int v4; // eax@3
3047 int v5; // eax@4 3047 int v5; // eax@4
3048 unsigned int v6; // eax@6 3048 unsigned int v6; // eax@6
3049 //signed int v7; // eax@12 3049 //signed int v7; // eax@12
3051 signed int v9; // [sp-14h] [bp-18h]@10 3051 signed int v9; // [sp-14h] [bp-18h]@10
3052 int v10; // [sp-10h] [bp-14h]@10 3052 int v10; // [sp-10h] [bp-14h]@10
3053 unsigned int v11; // [sp-Ch] [bp-10h]@10 3053 unsigned int v11; // [sp-Ch] [bp-10h]@10
3054 int v12; // [sp-8h] [bp-Ch]@10 3054 int v12; // [sp-8h] [bp-Ch]@10
3055 3055
3056 v2 = &pActors[uActorID]; 3056 //v2 = &pActors[uActorID];
3057 v3 = v2->pSoundSampleIDs[uSoundID]; 3057 v3 = pActors[uActorID].pSoundSampleIDs[uSoundID];
3058 if ( v3 ) 3058 if ( v3 )
3059 { 3059 {
3060 if ( (signed __int64)v2->pActorBuffs[3].uExpireTime <= 0 ) 3060 if ( (signed __int64)pActors[uActorID].pActorBuffs[3].uExpireTime <= 0 )
3061 { 3061 {
3062 v12 = 0; 3062 v12 = 0;
3063
3064 v8 = -1; 3063 v8 = -1;
3065 } 3064 }
3066 else 3065 else
3067 { 3066 {
3068 v4 = v2->pActorBuffs[3].uPower - 2; 3067 v4 = pActors[uActorID].pActorBuffs[3].uPower - 2;
3069 if ( v4 ) 3068 if ( v4 )
3070 { 3069 {
3071 v5 = v4 - 1; 3070 v5 = v4 - 1;
3072 if ( v5 ) 3071 if ( v5 )
3073 { 3072 {
3084 else 3083 else
3085 { 3084 {
3086 v6 = 33075; 3085 v6 = 33075;
3087 } 3086 }
3088 v12 = v6; 3087 v12 = v6;
3089
3090 v8 = 0; 3088 v8 = 0;
3091 } 3089 }
3092 pAudioPlayer->PlaySound((SoundID)(signed __int16)v3, PID(OBJECT_Actor, uActorID), 0, v8, 0, 0, 0, v12); 3090 pAudioPlayer->PlaySound((SoundID)(signed __int16)v3, PID(OBJECT_Actor, uActorID), 0, v8, 0, 0, 0, v12);
3093 } 3091 }
3094 } 3092 }
5049 //v51 = (unsigned __int64 *)player->pEquipment.uMainHand; 5047 //v51 = (unsigned __int64 *)player->pEquipment.uMainHand;
5050 int main_hand_idx = player->pEquipment.uMainHand; 5048 int main_hand_idx = player->pEquipment.uMainHand;
5051 v59 = 1; 5049 v59 = 1;
5052 if ( player->HasItemEquipped(EQUIP_MAIN_HAND) ) 5050 if ( player->HasItemEquipped(EQUIP_MAIN_HAND) )
5053 { 5051 {
5054 auto main_hand_skill = pItemsTable->pItems[player->pInventoryItems[main_hand_idx - 1].uItemID].uSkillType; 5052 auto main_hand_skill = pItemsTable->pItems[player->pInventoryItemList[main_hand_idx - 1].uItemID].uSkillType;
5055 //v55 = pItemsTable->pItems[player->pInventoryItems[main_hand_idx - 1].uItemID].uSkillType; 5053 //v55 = pItemsTable->pItems[player->pInventoryItems[main_hand_idx - 1].uItemID].uSkillType;
5056 //v28 = SkillToMastery(player->pActiveSkills[v55]); 5054 //v28 = SkillToMastery(player->pActiveSkills[v55]);
5057 auto main_hand_mastery = SkillToMastery(player->pActiveSkills[main_hand_skill]); 5055 auto main_hand_mastery = SkillToMastery(player->pActiveSkills[main_hand_skill]);
5058 //uDamageAmount = v28; 5056 //uDamageAmount = v28;
5059 switch (main_hand_skill) 5057 switch (main_hand_skill)
5258 v57 = &player->pEquipment; 5256 v57 = &player->pEquipment;
5259 do 5257 do
5260 { 5258 {
5261 if ( player->HasItemEquipped((ITEM_EQUIP_TYPE)v59) ) 5259 if ( player->HasItemEquipped((ITEM_EQUIP_TYPE)v59) )
5262 { 5260 {
5263 auto _s = (ItemGen *)&player->pInventoryItems[v57->uShield - 1]; 5261 auto _s = (ItemGen *)&player->pInventoryItemList[v57->uShield - 1];
5264 a4 = _s->_439DF3_get_additional_damage(&a2, &v62); 5262 a4 = _s->_439DF3_get_additional_damage(&a2, &v62);
5265 if ( v62 && pMonster->sCurrentHP > 0 ) 5263 if ( v62 && pMonster->sCurrentHP > 0 )
5266 { 5264 {
5267 player->sHealth += v61 / 5; 5265 player->sHealth += v61 / 5;
5268 if ( player->sHealth > player->GetMaxHealth() ) 5266 if ( player->sHealth > player->GetMaxHealth() )