comparison mm7_6.cpp @ 89:98cd93e14777

pointer fixes
author zipi
date Wed, 06 Feb 2013 21:19:42 +0000
parents 1faa29fd4c2d
children d61f6bc04bf2
comparison
equal deleted inserted replaced
88:7bdf8f1150eb 89:98cd93e14777
1292 1292
1293 1293
1294 //----- (004269A2) -------------------------------------------------------- 1294 //----- (004269A2) --------------------------------------------------------
1295 int __fastcall sub_4269A2_GivePartyExp(unsigned int a1) 1295 int __fastcall sub_4269A2_GivePartyExp(unsigned int a1)
1296 { 1296 {
1297 unsigned __int64 v1; // qax@1 1297 //unsigned __int64 v1; // qax@1
1298 Player *v1;
1299 int v1b;
1298 signed int v2; // ecx@1 1300 signed int v2; // ecx@1
1299 int *v3; // esi@1 1301 int *v3; // esi@1
1300 bool v4; // edi@6 1302 bool v4; // edi@6
1301 int *v5; // edi@10 1303 int *v5; // edi@10
1302 Player *v6; // esi@10 1304 Player *v6; // esi@10
1303 int v7; // eax@13 1305 int v7; // eax@13
1304 unsigned __int8 v8; // cf@13 1306 unsigned __int8 v8; // cf@13
1305 int v10; // [sp+Ch] [bp-14h]@1 1307 int v10[4]; // [sp+Ch] [bp-14h]@1
1306 int v11; // [sp+1Ch] [bp-4h]@10 1308 int v11; // [sp+1Ch] [bp-4h]@10
1307 1309
1308 v1 = __PAIR__((int)((char *)&pParty + 2620), a1); 1310 //v1 = __PAIR__((int)((char *)&pParty + 2620), a1);
1311 v1 = pParty->pPlayers;
1312 v1b = a1;
1309 v2 = 0; 1313 v2 = 0;
1310 v3 = &v10; 1314 v3 = v10;
1311 do 1315 do
1312 { 1316 {
1313 v4 = !(*(int *)(HIDWORD(v1) - 4) | *(int *)(HIDWORD(v1) - 8)) 1317 /*v4 = !(*(int *)(HIDWORD(v1) - 4) | *(int *)(HIDWORD(v1) - 8))
1314 && !*(int *)HIDWORD(v1) 1318 && !*(int *)HIDWORD(v1)
1315 && !*(_QWORD *)(HIDWORD(v1) + 8) 1319 && !*(_QWORD *)(HIDWORD(v1) + 8)
1316 && !*(_QWORD *)(HIDWORD(v1) + 16); 1320 && !*(_QWORD *)(HIDWORD(v1) + 16);*/
1321 v4 = !(HIDWORD(v1->pConditions[13]) | LODWORD(v1->pConditions[13]))
1322 && !v1->pConditions[14]
1323 && !v1->pConditions[15]
1324 && !v1->pConditions[16];
1317 *v3 = v4; 1325 *v3 = v4;
1318 HIDWORD(v1) += 6972; 1326 //HIDWORD(v1) += 6972;
1327 ++v1;
1319 v2 += v4; 1328 v2 += v4;
1320 ++v3; 1329 ++v3;
1321 } 1330 }
1322 while ( SHIDWORD(v1) < (signed int)&pParty->pHirelings[1].field_24 ); 1331 while ( v1 <= &pParty->pPlayers[3] );
1323 if ( v2 ) 1332 if ( v2 )
1324 { 1333 {
1325 LODWORD(v1) = (signed int)v1 / v2; 1334 v1b = v1b / v2;
1326 v5 = &v10; 1335 v5 = v10;
1327 v6 = pParty->pPlayers;//[0].uExperience; 1336 v6 = pParty->pPlayers;//[0].uExperience;
1328 v11 = v1; 1337 v11 = v1b;
1329 do 1338 do
1330 { 1339 {
1331 if ( *v5 ) 1340 if ( *v5 )
1332 { 1341 {
1333 if ( v11 ) 1342 if ( v11 )
1334 { 1343 {
1335 LOBYTE(v7) = v6->GetLearningPercent(); 1344 LOBYTE(v7) = v6->GetLearningPercent();
1336 v1 = v11 + v11 * v7 / 100; 1345 v1b = v11 + v11 * v7 / 100;
1337 v8 = __CFADD__((int)v1, LODWORD(v6->uExperience)); 1346 //v8 = __CFADD__((int)v1, LODWORD(v6->uExperience));
1338 LODWORD(v6->uExperience) += v1; 1347 //need review
1339 HIDWORD(v6->uExperience) += HIDWORD(v1) + v8; 1348 LODWORD(v6->uExperience) += v1b;
1349 //HIDWORD(v6->uExperience) += HIDWORD(v1) + v8;
1340 if ( v6->uExperience > 4000000000i64 ) 1350 if ( v6->uExperience > 4000000000i64 )
1341 { 1351 {
1342 HIDWORD(v6->uExperience) = 0; 1352 HIDWORD(v6->uExperience) = 0;
1343 LODWORD(v6->uExperience) = -294967296; 1353 LODWORD(v6->uExperience) = -294967296;
1344 } 1354 }
1347 ++v6; 1357 ++v6;
1348 ++v5; 1358 ++v5;
1349 } 1359 }
1350 while ( v6 <= &pParty->pPlayers[3] ); 1360 while ( v6 <= &pParty->pPlayers[3] );
1351 } 1361 }
1352 return v1; 1362 return v1b;
1353 } 1363 }
1354 1364
1355 //----- (00426A5A) -------------------------------------------------------- 1365 //----- (00426A5A) --------------------------------------------------------
1356 void stru319::LootActor(Actor *pActor) 1366 void stru319::LootActor(Actor *pActor)
1357 { 1367 {
1718 int stru319::_427102(Actor *pActor, signed int a2) 1728 int stru319::_427102(Actor *pActor, signed int a2)
1719 { 1729 {
1720 unsigned __int8 v3; // cf@11 1730 unsigned __int8 v3; // cf@11
1721 unsigned __int8 v4; // zf@11 1731 unsigned __int8 v4; // zf@11
1722 SpellBuff *v6; // ecx@46 1732 SpellBuff *v6; // ecx@46
1723 char *v7; // esi@49 1733 Player *v7; // esi@49
1724 signed int v8; // edx@50 1734 signed int v8; // edx@50
1725 char *v9; // ecx@50 1735 SpellBuff *v9; // ecx@50
1726 1736
1727 if ( a2 > 73 ) 1737 if ( a2 > 73 )
1728 { 1738 {
1729 if ( a2 == 77 ) 1739 if ( a2 == 77 )
1730 { 1740 {
1736 { 1746 {
1737 v6 = pParty->pPartyBuffs; 1747 v6 = pParty->pPartyBuffs;
1738 while ( (signed __int64)v6->uExpireTime <= 0 ) 1748 while ( (signed __int64)v6->uExpireTime <= 0 )
1739 { 1749 {
1740 ++v6; 1750 ++v6;
1741 if ( (signed int)v6 >= (signed int)pParty->pPlayers ) 1751 if ( v6 > &pParty->pPartyBuffs[19] )
1742 { 1752 {
1743 v7 = (char *)pParty->pPlayers[0].pPlayerBuffs; 1753 v7 = pParty->pPlayers;//[0].pPlayerBuffs;
1744 LABEL_50:
1745 v8 = 0; 1754 v8 = 0;
1746 v9 = v7; 1755 v9 = v7->pPlayerBuffs;
1747 while ( *(_QWORD *)v9 <= 0i64 ) 1756 while ( v9->uExpireTime <= 0i64 )
1748 { 1757 {
1749 ++v8; 1758 ++v8;
1750 v9 += 16; 1759 ++v9;
1751 if ( v8 >= 24 ) 1760 if ( v8 >= 24 )
1752 { 1761 {
1753 v7 += 6972; 1762 ++v7;
1754 if ( (signed int)v7 < (signed int)&pParty->field_871C[464] ) 1763 if ( v7 <= &pParty->pPlayers[3] )
1755 goto LABEL_50; 1764 {
1756 return 0; 1765 v8 = 0;
1766 v9 = v7->pPlayerBuffs;
1767 }
1768 else
1769 return 0;
1757 } 1770 }
1758 } 1771 }
1759 return 1; 1772 return 1;
1760 } 1773 }
1761 } 1774 }
1800 return 1; 1813 return 1;
1801 if ( SHIDWORD(pActor->pActorBuffs[21].uExpireTime) > 0 ) 1814 if ( SHIDWORD(pActor->pActorBuffs[21].uExpireTime) > 0 )
1802 return 0; 1815 return 0;
1803 v3 = 0; 1816 v3 = 0;
1804 v4 = LODWORD(pActor->pActorBuffs[21].uExpireTime) == 0; 1817 v4 = LODWORD(pActor->pActorBuffs[21].uExpireTime) == 0;
1805 goto LABEL_15;
1806 } 1818 }
1807 if ( a2 == 5 ) 1819 else if ( a2 == 5 )
1808 { 1820 {
1809 if ( SHIDWORD(pActor->pActorBuffs[19].uExpireTime) < 0 ) 1821 if ( SHIDWORD(pActor->pActorBuffs[19].uExpireTime) < 0 )
1810 return 1; 1822 return 1;
1811 if ( SHIDWORD(pActor->pActorBuffs[19].uExpireTime) > 0 ) 1823 if ( SHIDWORD(pActor->pActorBuffs[19].uExpireTime) > 0 )
1812 return 0; 1824 return 0;
1813 v3 = 0; 1825 v3 = 0;
1814 v4 = LODWORD(pActor->pActorBuffs[19].uExpireTime) == 0; 1826 v4 = LODWORD(pActor->pActorBuffs[19].uExpireTime) == 0;
1815 goto LABEL_15;
1816 } 1827 }
1817 if ( a2 == 17 ) 1828 else if ( a2 == 17 )
1818 { 1829 {
1819 if ( SHIDWORD(pActor->pActorBuffs[15].uExpireTime) < 0 ) 1830 if ( SHIDWORD(pActor->pActorBuffs[15].uExpireTime) < 0 )
1820 return 1; 1831 return 1;
1821 if ( SHIDWORD(pActor->pActorBuffs[15].uExpireTime) > 0 ) 1832 if ( SHIDWORD(pActor->pActorBuffs[15].uExpireTime) > 0 )
1822 return 0; 1833 return 0;
1823 v3 = 0; 1834 v3 = 0;
1824 v4 = LODWORD(pActor->pActorBuffs[15].uExpireTime) == 0; 1835 v4 = LODWORD(pActor->pActorBuffs[15].uExpireTime) == 0;
1825 goto LABEL_15;
1826 } 1836 }
1827 if ( a2 == 38 ) 1837 else if ( a2 == 38 )
1828 { 1838 {
1829 if ( SHIDWORD(pActor->pActorBuffs[16].uExpireTime) < 0 ) 1839 if ( SHIDWORD(pActor->pActorBuffs[16].uExpireTime) < 0 )
1830 return 1; 1840 return 1;
1831 if ( SHIDWORD(pActor->pActorBuffs[16].uExpireTime) > 0 ) 1841 if ( SHIDWORD(pActor->pActorBuffs[16].uExpireTime) > 0 )
1832 return 0; 1842 return 0;
1833 v3 = 0; 1843 v3 = 0;
1834 v4 = LODWORD(pActor->pActorBuffs[16].uExpireTime) == 0; 1844 v4 = LODWORD(pActor->pActorBuffs[16].uExpireTime) == 0;
1835 goto LABEL_15;
1836 } 1845 }
1837 if ( a2 == 46 ) 1846 else if ( a2 == 46 )
1838 { 1847 {
1839 if ( SHIDWORD(pActor->pActorBuffs[17].uExpireTime) < 0 ) 1848 if ( SHIDWORD(pActor->pActorBuffs[17].uExpireTime) < 0 )
1840 return 1; 1849 return 1;
1841 if ( SHIDWORD(pActor->pActorBuffs[17].uExpireTime) > 0 ) 1850 if ( SHIDWORD(pActor->pActorBuffs[17].uExpireTime) > 0 )
1842 return 0; 1851 return 0;
1843 v3 = 0; 1852 v3 = 0;
1844 v4 = LODWORD(pActor->pActorBuffs[17].uExpireTime) == 0; 1853 v4 = LODWORD(pActor->pActorBuffs[17].uExpireTime) == 0;
1845 goto LABEL_15;
1846 } 1854 }
1847 if ( a2 != 47 ) 1855 else
1848 { 1856 {
1849 if ( a2 != 51 || SHIDWORD(pActor->pActorBuffs[18].uExpireTime) < 0 ) 1857 if ( a2 != 47 )
1850 return 1; 1858 {
1851 if ( SHIDWORD(pActor->pActorBuffs[18].uExpireTime) <= 0 ) 1859 if ( a2 != 51 || SHIDWORD(pActor->pActorBuffs[18].uExpireTime) < 0 )
1852 { 1860 return 1;
1853 v3 = 0; 1861 if ( SHIDWORD(pActor->pActorBuffs[18].uExpireTime) <= 0 )
1854 v4 = LODWORD(pActor->pActorBuffs[18].uExpireTime) == 0; 1862 {
1855 goto LABEL_15; 1863 v3 = 0;
1856 } 1864 v4 = LODWORD(pActor->pActorBuffs[18].uExpireTime) == 0;
1857 return 0; 1865 }
1858 } 1866 else
1859 if ( SHIDWORD(pActor->pActorBuffs[11].uExpireTime) < 0 ) 1867 return 0;
1860 return 1; 1868 }
1861 if ( SHIDWORD(pActor->pActorBuffs[11].uExpireTime) > 0 ) 1869 else
1862 return 0; 1870 {
1863 v3 = 0; 1871 if ( SHIDWORD(pActor->pActorBuffs[11].uExpireTime) < 0 )
1864 v4 = LODWORD(pActor->pActorBuffs[11].uExpireTime) == 0; 1872 return 1;
1873 if ( SHIDWORD(pActor->pActorBuffs[11].uExpireTime) > 0 )
1874 return 0;
1875 v3 = 0;
1876 v4 = LODWORD(pActor->pActorBuffs[11].uExpireTime) == 0;
1877 }
1878 }
1865 } 1879 }
1866 LABEL_15:
1867 if ( !(v3 | v4) ) 1880 if ( !(v3 | v4) )
1868 return 0; 1881 return 0;
1869 return 1; 1882 return 1;
1870 } 1883 }
1871 1884
2599 int v64; // ecx@188 2612 int v64; // ecx@188
2600 int v65; // ecx@189 2613 int v65; // ecx@189
2601 const char *v66; // ecx@200 2614 const char *v66; // ecx@200
2602 unsigned int v67; // edx@201 2615 unsigned int v67; // edx@201
2603 char v68; // al@207 2616 char v68; // al@207
2604 int v69; // esi@211 2617 ItemGen *v69; // esi@211
2605 int v70; // ecx@214 2618 int v70; // ecx@214
2606 int v71; // ecx@215 2619 int v71; // ecx@215
2607 int v72; // ecx@216 2620 int v72; // ecx@216
2608 __int16 v73; // ST1C_2@222 2621 __int16 v73; // ST1C_2@222
2609 __int16 v74; // ST18_2@222 2622 __int16 v74; // ST18_2@222
2622 stru6 *v87; // eax@245 2635 stru6 *v87; // eax@245
2623 __int16 v88; // ST18_2@245 2636 __int16 v88; // ST18_2@245
2624 stru6 *v89; // eax@245 2637 stru6 *v89; // eax@245
2625 double v90; // st7@245 2638 double v90; // st7@245
2626 int v91; // eax@250 2639 int v91; // eax@250
2627 char *v92; // eax@255 2640 Player *v92; // eax@255
2628 __int16 v93; // ST18_2@260 2641 __int16 v93; // ST18_2@260
2629 stru6 *v94; // eax@260 2642 stru6 *v94; // eax@260
2630 __int16 v95; // ST18_2@260 2643 __int16 v95; // ST18_2@260
2631 stru6 *v96; // eax@260 2644 stru6 *v96; // eax@260
2632 __int16 v97; // ST18_2@260 2645 __int16 v97; // ST18_2@260
3083 stru6 *v548; // eax@991 3096 stru6 *v548; // eax@991
3084 double v549; // st7@991 3097 double v549; // st7@991
3085 unsigned __int16 v550; // di@991 3098 unsigned __int16 v550; // di@991
3086 int v551; // ecx@993 3099 int v551; // ecx@993
3087 int v552; // ecx@994 3100 int v552; // ecx@994
3088 char *v553; // edi@1001 3101 Player *v553; // edi@1001
3089 __int16 v554; // ST18_2@1002 3102 __int16 v554; // ST18_2@1002
3090 stru6 *v555; // eax@1002 3103 stru6 *v555; // eax@1002
3091 __int16 v556; // ST18_2@1002 3104 __int16 v556; // ST18_2@1002
3092 stru6 *v557; // eax@1002 3105 stru6 *v557; // eax@1002
3093 __int16 v558; // ST18_2@1002 3106 __int16 v558; // ST18_2@1002
3142 int v607; // ecx@1100 3155 int v607; // ecx@1100
3143 __int16 v608; // ax@1102 3156 __int16 v608; // ax@1102
3144 signed int v609; // eax@1104 3157 signed int v609; // eax@1104
3145 int v610; // edi@1106 3158 int v610; // edi@1106
3146 unsigned int v611; // eax@1106 3159 unsigned int v611; // eax@1106
3147 char *v612; // edi@1106 3160 Player *v612; // edi@1106
3148 char *v613; // eax@1108 3161 DDM_DLV_Header *v613; // eax@1108
3149 int v614; // eax@1116 3162 int v614; // eax@1116
3150 int v615; // edi@1119 3163 int v615; // edi@1119
3151 __int16 v616; // ST1C_2@1122 3164 __int16 v616; // ST1C_2@1122
3152 __int16 v617; // ST18_2@1122 3165 __int16 v617; // ST18_2@1122
3153 stru6 *v618; // eax@1122 3166 stru6 *v618; // eax@1122
3261 Player *v726; // [sp+E58h] [bp-2Ch]@131 3274 Player *v726; // [sp+E58h] [bp-2Ch]@131
3262 float v727; // [sp+E5Ch] [bp-28h]@1 3275 float v727; // [sp+E5Ch] [bp-28h]@1
3263 unsigned int uRequiredMana; // [sp+E60h] [bp-24h]@53 3276 unsigned int uRequiredMana; // [sp+E60h] [bp-24h]@53
3264 Player *pPlayer; // [sp+E64h] [bp-20h]@8 3277 Player *pPlayer; // [sp+E64h] [bp-20h]@8
3265 int v730; // [sp+E68h] [bp-1Ch]@53 3278 int v730; // [sp+E68h] [bp-1Ch]@53
3279 Player *v730b;
3280 ItemGen *v730c;
3266 int v731; // [sp+E6Ch] [bp-18h]@48 3281 int v731; // [sp+E6Ch] [bp-18h]@48
3267 signed int v732; // [sp+E70h] [bp-14h]@325 3282 signed int v732; // [sp+E70h] [bp-14h]@325
3268 unsigned __int64 v733; // [sp+E74h] [bp-10h]@1 3283 unsigned __int64 v733; // [sp+E74h] [bp-10h]@1
3269 signed int a2; // [sp+E7Ch] [bp-8h]@14 3284 signed int a2; // [sp+E7Ch] [bp-8h]@14
3270 int amount; // [sp+E80h] [bp-4h]@1 3285 int amount; // [sp+E80h] [bp-4h]@1
3983 amount = 12; 3998 amount = 12;
3984 } 3999 }
3985 LABEL_196: 4000 LABEL_196:
3986 if ( !pPlayer->CanCastSpell(uRequiredMana) ) 4001 if ( !pPlayer->CanCastSpell(uRequiredMana) )
3987 goto LABEL_83; 4002 goto LABEL_83;
3988 v730 = (int)&pParty->pPlayers[v3->uPlayerID_2].pInventoryItems[a2]; 4003 v730c = &pParty->pPlayers[v3->uPlayerID_2].pInventoryItems[a2];
3989 v726 = (Player *)&pItemsTable->pItems[*(int *)v730].pIconName; 4004 v726 = (Player *)&pItemsTable->pItems[v730c->uItemID].pIconName;
3990 ((ItemGen *)v730)->UpdateTempBonus(pParty->uTimePlayed); 4005 v730c->UpdateTempBonus(pParty->uTimePlayed);
3991 if ( *(int *)v730 < 64 || *(int *)v730 > 65 ) 4006 if ( v730c->uItemID < 64 || v730c->uItemID > 65 )
3992 { 4007 {
3993 if ( !(*(char *)(v730 + 20) & 2) ) 4008 if ( !(v730c->uAttributes & 2) )
3994 { 4009 {
3995 if ( *(int *)(v730 + 12) == v1 ) 4010 if ( v730c->uAdditionalValue == v1 )
3996 { 4011 {
3997 if ( *(int *)(v730 + 4) == v1 ) 4012 if ( v730c->_bonus_type == v1 )
3998 { 4013 {
3999 v68 = BYTE4(v726->pConditions[3]); 4014 v68 = BYTE4(v726->pConditions[3]);
4000 if ( !v68 || v68 == 1 || v68 == 2 ) 4015 if ( !v68 || v68 == 1 || v68 == 2 )
4001 { 4016 {
4002 if ( !pItemsTable->_456D5E_is_some_material((ItemGen *)v730) ) 4017 if ( !pItemsTable->_456D5E_is_some_material(v730c) )
4003 { 4018 {
4004 v69 = v730; 4019 v69 = v730c;
4005 v14 = v731 == 4; 4020 v14 = v731 == 4;
4006 *(int *)(v730 + 12) = amount; 4021 *(int *)(v730 + 12) = amount;
4007 if ( !v14 ) 4022 if ( !v14 )
4008 { 4023 {
4009 v726 = (Player *)((int)v733 << 7); 4024 v726 = (Player *)((int)v733 << 7);
4210 } 4225 }
4211 LODWORD(v733) = v91; 4226 LODWORD(v733) = v91;
4212 LABEL_254: 4227 LABEL_254:
4213 if ( pPlayer->CanCastSpell(uRequiredMana) ) 4228 if ( pPlayer->CanCastSpell(uRequiredMana) )
4214 { 4229 {
4215 v92 = (char *)&pParty->pPlayers[0].pConditions[1]; 4230 v92 = pParty->pPlayers;//[0].pConditions[1];
4216 LODWORD(v727) = 1; 4231 LODWORD(v727) = 1;
4217 do 4232 do
4218 { 4233 {
4219 if ( *(_QWORD *)v92 ) 4234 if ( v92->pConditions )
4220 LODWORD(v727) = v1; 4235 LODWORD(v727) = v1;
4221 v92 += 6972; 4236 ++v92;
4222 } 4237 }
4223 while ( (signed int)v92 < (signed int)&pParty->pHirelings[0].uFlags ); 4238 while ( v92 <= &pParty->pPlayers[3] );
4224 if ( LODWORD(v727) != v1 ) 4239 if ( LODWORD(v727) != v1 )
4225 { 4240 {
4226 v726 = (Player *)((int)v733 << 7); 4241 v726 = (Player *)((int)v733 << 7);
4227 pParty->pPartyBuffs[8].Apply( 4242 pParty->pPartyBuffs[8].Apply(
4228 pParty->uTimePlayed + (signed int)(signed __int64)((double)(signed int)((int)v733 << 7) * 0.033333335), 4243 pParty->uTimePlayed + (signed int)(signed __int64)((double)(signed int)((int)v733 << 7) * 0.033333335),
4288 goto LABEL_103; 4303 goto LABEL_103;
4289 } 4304 }
4290 v105 = 0; 4305 v105 = 0;
4291 v726 = (Player *)((int)v733 << 7); 4306 v726 = (Player *)((int)v733 << 7);
4292 v717 = (signed int)(signed __int64)((double)(signed int)((int)v733 << 7) * 0.033333335); 4307 v717 = (signed int)(signed __int64)((double)(signed int)((int)v733 << 7) * 0.033333335);
4293 v730 = (int)&pParty->pPlayers[0].pPlayerBuffs[1]; 4308 v730b = pParty->pPlayers;//[0].pPlayerBuffs[1];
4294 do 4309 do
4295 { 4310 {
4296 v106 = v3->spellnum; 4311 v106 = v3->spellnum;
4297 v107 = pGame->GetStru6(); 4312 v107 = pGame->GetStru6();
4298 pGame->GetStru6()->SetPlayerBuffAnim(v106, v105); 4313 pGame->GetStru6()->SetPlayerBuffAnim(v106, v105);
4299 v716 = pOtherOverlayList->_4418B1(10000, v105 + 310, v1, 65536); 4314 v716 = pOtherOverlayList->_4418B1(10000, v105 + 310, v1, 65536);
4300 ((SpellBuff *)v730)->Apply(pParty->uTimePlayed + v717, v731, amount, v716, v1); 4315 v730b->pPlayerBuffs[1].Apply(pParty->uTimePlayed + v717, v731, amount, v716, v1);
4301 v730 += 6972; 4316 ++v730b;
4302 ++v105; 4317 ++v105;
4303 } 4318 }
4304 while ( v730 < (signed int)&pParty->field_871C[468] ); 4319 while ( v730b <= &pParty->pPlayers[3] );
4305 goto LABEL_1056; 4320 goto LABEL_1056;
4306 case 52: 4321 case 52:
4307 if ( pPlayer->CanCastSpell(uRequiredMana) && a2 != v1 && (a2 & 7) == 3 ) 4322 if ( pPlayer->CanCastSpell(uRequiredMana) && a2 != v1 && (a2 & 7) == 3 )
4308 { 4323 {
4309 v730 = a2 >> 3; 4324 v730 = a2 >> 3;
5146 amount, 5161 amount,
5147 v716, 5162 v716,
5148 v239); 5163 v239);
5149 if ( v731 == 4 ) 5164 if ( v731 == 4 )
5150 pParty->pPartyBuffs[18].uFlags = 1; 5165 pParty->pPartyBuffs[18].uFlags = 1;
5151 goto LABEL_1112; 5166 LODWORD(v727) = v232;
5167 goto LABEL_83;
5152 case 28: 5168 case 28:
5153 if ( !pPlayer->CanCastSpell(uRequiredMana) ) 5169 if ( !pPlayer->CanCastSpell(uRequiredMana) )
5154 goto LABEL_83; 5170 goto LABEL_83;
5155 v240 = (char *)&pParty->pPlayers[v3->uPlayerID_2].pInventoryItems[a2]; 5171 v240 = (char *)&pParty->pPlayers[v3->uPlayerID_2].pInventoryItems[a2];
5156 y = v240; 5172 y = v240;
7102 goto LABEL_83; 7118 goto LABEL_83;
7103 y = (char *)(60 * (v2 * HIDWORD(v733) + 60)); 7119 y = (char *)(60 * (v2 * HIDWORD(v733) + 60));
7104 v732 = (300 * amount * v2 + 60) << 7; 7120 v732 = (300 * amount * v2 + 60) << 7;
7105 v730 = v2 + 5; 7121 v730 = v2 + 5;
7106 v726 = (Player *)v1; 7122 v726 = (Player *)v1;
7107 v553 = (char *)&pParty->pPlayers[0].pConditions[1]; 7123 v553 = pParty->pPlayers;//[0].pConditions[1];
7108 *((float *)&v733 + 1) = (double)v732 * 0.033333335; 7124 *((float *)&v733 + 1) = (double)v732 * 0.033333335;
7109 do 7125 do
7110 { 7126 {
7111 v554 = v3->spellnum; 7127 v554 = v3->spellnum;
7112 v555 = pGame->GetStru6(); 7128 v555 = pGame->GetStru6();
7118 v559 = pGame->GetStru6(); 7134 v559 = pGame->GetStru6();
7119 pGame->GetStru6()->SetPlayerBuffAnim(v558, 2u); 7135 pGame->GetStru6()->SetPlayerBuffAnim(v558, 2u);
7120 v560 = v3->spellnum; 7136 v560 = v3->spellnum;
7121 v561 = pGame->GetStru6(); 7137 v561 = pGame->GetStru6();
7122 pGame->GetStru6()->SetPlayerBuffAnim(v560, 3u); 7138 pGame->GetStru6()->SetPlayerBuffAnim(v560, 3u);
7123 ((SpellBuff *)(v553 + 6056))->Apply( 7139 //((SpellBuff *)(v553 + 6056))->Apply(
7140 v553->pPlayerBuffs[4].Apply(
7124 (signed __int64)((double)(signed __int64)pParty->uTimePlayed + *((float *)&v733 + 1)), 7141 (signed __int64)((double)(signed __int64)pParty->uTimePlayed + *((float *)&v733 + 1)),
7125 v731, 7142 v731,
7126 v730, 7143 v730,
7127 v1, 7144 v1,
7128 v1); 7145 v1);
7129 if ( *(_QWORD *)v553 ) 7146 if ( *(_QWORD *)v553 )
7130 v726 = (Player *)1; 7147 v726 = (Player *)1;
7131 v553 += 6972; 7148 ++v553;
7132 } 7149 }
7133 while ( (signed int)v553 < (signed int)&pParty->pHirelings[0].uFlags ); 7150 while ( v553 <= &pParty->pPlayers[3] );
7134 v562 = v731; 7151 v562 = v731;
7135 pParty->pPartyBuffs[9].Apply( 7152 pParty->pPartyBuffs[9].Apply(
7136 (signed __int64)((double)(signed __int64)pParty->uTimePlayed + *((float *)&v733 + 1)), 7153 (signed __int64)((double)(signed __int64)pParty->uTimePlayed + *((float *)&v733 + 1)),
7137 v731, 7154 v731,
7138 v730, 7155 v730,
7512 v611 = pIconsFrameTable->FindIcon("spell96"); 7529 v611 = pIconsFrameTable->FindIcon("spell96");
7513 *(int *)((char *)&pParty->pPlayers[3].pInstalledBeacons[4].uBeaconTime + v610 + 4) = pIconsFrameTable->GetIconAnimLength( 7530 *(int *)((char *)&pParty->pPlayers[3].pInstalledBeacons[4].uBeaconTime + v610 + 4) = pIconsFrameTable->GetIconAnimLength(
7514 v611); 7531 v611);
7515 v232 = 1; 7532 v232 = 1;
7516 *(int *)((char *)&pParty->pPlayers[3].pInstalledBeacons[3].field_18 + v610) = 1; 7533 *(int *)((char *)&pParty->pPlayers[3].pInstalledBeacons[3].field_18 + v610) = 1;
7517 v612 = (char *)pParty->pPlayers; 7534 v612 = pParty->pPlayers;
7518 do 7535 do
7519 { 7536 {
7520 *((int *)v612 + 1615) = ((Player *)v612)->GetMaxHealth(); 7537 v612->sHealth = v612->GetMaxHealth();
7521 *((int *)v612 + 1616) = ((Player *)v612)->GetMaxMana(); 7538 v612->sMana = v612->GetMaxMana();
7522 v612 += 6972; 7539 ++v612;
7523 } 7540 }
7524 while ( (signed int)v612 < (signed int)pParty->pHirelings ); 7541 while ( v612 <= &pParty->pPlayers[3] );
7525 v613 = (char *)&pOutdoor->ddm; 7542 v613 = &pOutdoor->ddm;
7526 if ( uCurrentlyLoadedLevelType != LEVEL_Outdoor) 7543 if ( uCurrentlyLoadedLevelType != LEVEL_Outdoor)
7527 v613 = (char *)&pIndoor->dlv; 7544 v613 = &pIndoor->dlv;
7528 *((int *)v613 + 2) += 15; 7545 v613->uReputation += 15;
7529 if ( *((int *)v613 + 2) > 10000 ) 7546 if ( v613->uReputation > 10000 )
7530 *((int *)v613 + 2) = 10000; 7547 v613->uReputation = 10000;
7531 LABEL_1112:
7532 LODWORD(v727) = v232; 7548 LODWORD(v727) = v232;
7533 goto LABEL_83; 7549 goto LABEL_83;
7534 case 95: 7550 case 95:
7535 if ( v12 <= v1 ) 7551 if ( v12 <= v1 )
7536 goto LABEL_1119; 7552 goto LABEL_1119;