comparison mm7_4.cpp @ 2071:9f4d5a9d6fd8

Merge
author Nomad
date Tue, 03 Dec 2013 21:29:12 +0200
parents 259df09dfb50 7890930801a8
children 2737276390ff
comparison
equal deleted inserted replaced
2070:4231fdf46dde 2071:9f4d5a9d6fd8
643 643
644 //----- (00494035) -------------------------------------------------------- 644 //----- (00494035) --------------------------------------------------------
645 void _494035_timed_effects__water_walking_damage__etc() 645 void _494035_timed_effects__water_walking_damage__etc()
646 { 646 {
647 signed __int64 v0; // qax@1 647 signed __int64 v0; // qax@1
648 signed __int64 v1; // ST30_8@1
649 signed __int64 v2; // ST38_8@1
650 unsigned __int64 v3; // qax@1
651 unsigned int v4; // edi@1 648 unsigned int v4; // edi@1
652 //signed int v5; // eax@4
653 //char *v6; // ecx@5
654 //Player *v7; // esi@8
655 //char *v8; // ecx@12
656 //Player *pPlayer; // esi@15
657 //void *v10; // esi@25
658 unsigned int v11; // ecx@27
659 signed int v12; // edi@29 649 signed int v12; // edi@29
660 //Player *v13; // ecx@30
661 //Player *v14; // esi@35
662 //double v15; // st7@35
663 Player **v16; // esi@43
664 Player *v17; // edi@44
665 double v18; // st7@44
666 //float v19; // ST28_4@48
667 //double v20; // ST38_8@48
668 Player *v21; // esi@51
669 signed int v22; // edi@53
670 int v23; // eax@59
671 int v24; // ecx@60 650 int v24; // ecx@60
672 int v25; // eax@63
673 int v26; // ecx@64 651 int v26; // ecx@64
674 int v27; // eax@67
675 int v28; // ecx@68 652 int v28; // ecx@68
676 int v29; // eax@71
677 int v30; // ecx@72 653 int v30; // ecx@72
678 int v31; // eax@75
679 int v32; // ecx@76 654 int v32; // ecx@76
680 int v33; // eax@79
681 int v34; // ecx@80 655 int v34; // ecx@80
682 int v35; // eax@83
683 int v36; // ecx@84 656 int v36; // ecx@84
684 int v37; // eax@87
685 int v38; // ecx@88 657 int v38; // ecx@88
686 int v39; // eax@91
687 int v40; // ecx@92 658 int v40; // ecx@92
688 int v41; // eax@95
689 int v42; // ecx@96 659 int v42; // ecx@96
690 bool v43; // ebx@102 660 bool v43; // ebx@102
691 //SpellBuff *v44; // edi@104
692 //signed int v45; // ebp@104
693 bool v46; // edi@111 661 bool v46; // edi@111
694 //SpellBuff *v47; // esi@113
695 //Player **v48; // esi@119
696 //signed int v49; // edi@121
697 //char *v50; // esi@122
698 signed int v51; // edx@128
699 signed int v52; // ecx@130
700 int v53; // eax@131
701 Player *v54; // eax@141
702 //unsigned int v55; // [sp-8h] [bp-38h]@18
703 unsigned int v56; // [sp-8h] [bp-38h]@55 662 unsigned int v56; // [sp-8h] [bp-38h]@55
704 //int v57; // [sp-4h] [bp-34h]@18
705 //int v58; // [sp-4h] [bp-34h]@33
706 int v59; // [sp-4h] [bp-34h]@55 663 int v59; // [sp-4h] [bp-34h]@55
707 //unsigned int v60; // [sp+10h] [bp-20h]@1
708 unsigned int v61; // [sp+14h] [bp-1Ch]@1 664 unsigned int v61; // [sp+14h] [bp-1Ch]@1
709 Player **v62; // [sp+14h] [bp-1Ch]@50
710 //unsigned int a2; // [sp+18h] [bp-18h]@1
711 signed int a2a; // [sp+18h] [bp-18h]@47 665 signed int a2a; // [sp+18h] [bp-18h]@47
712 signed int v65; // [sp+1Ch] [bp-14h]@47 666 signed int old_day; // [sp+1Ch] [bp-14h]@47
713 667 signed int old_hour;
714 //a2 = pParty->uCurrentHour; 668
715 v61 = pParty->uDaysPlayed; 669 old_day = pParty->uDaysPlayed;
670 old_hour = pParty->uCurrentHour;
716 //auto prev_time = pEventTimer->uTimeElapsed; 671 //auto prev_time = pEventTimer->uTimeElapsed;
717 pParty->uTimePlayed += pEventTimer->uTimeElapsed; 672 pParty->uTimePlayed += pEventTimer->uTimeElapsed;
718 v0 = (signed __int64)(pParty->uTimePlayed * 0.234375) / 60; 673 v0 = ((signed __int64)(pParty->uTimePlayed * 0.234375) / 60)/60i64;
719 v1 = v0; 674 v4 = (unsigned int)(((unsigned int)v0 / 24) / 7) >> 2;
720 v0 /= 60i64;
721 v2 = v0;
722 v3 = (unsigned int)v0 / 24;
723 v4 = (unsigned int)(v3 / 7) >> 2;
724 pParty->uCurrentTimeSecond = (signed __int64)((double)(signed __int64)pParty->uTimePlayed * 0.234375) % 60; 675 pParty->uCurrentTimeSecond = (signed __int64)((double)(signed __int64)pParty->uTimePlayed * 0.234375) % 60;
725 pParty->uCurrentMinute = v1 % 60; 676 pParty->uCurrentMinute = ((signed __int64)(pParty->uTimePlayed * 0.234375) / 60) % 60;
726 pParty->uCurrentMonthWeek = v3 / 7 & 3; 677 pParty->uCurrentHour = v0 % 24;
727 pParty->uCurrentHour = v2 % 24; 678 pParty->uCurrentMonthWeek = ((unsigned int)v0 / 24) / 7 & 3;
728 pParty->uDaysPlayed = (unsigned int)v3 % 28; 679 pParty->uDaysPlayed = (unsigned int)((unsigned int)v0 / 24) % 28;
729 pParty->uCurrentMonth = v4 % 12; 680 pParty->uCurrentMonth = v4 % 12;
730 pParty->uCurrentYear = v4 / 0xC + game_starting_year; 681 pParty->uCurrentYear = v4 / 0xC + game_starting_year;
731 if ( pParty->uCurrentHour >= 3 && (pParty->uCurrentHour < 3 || pParty->uDaysPlayed > v61) ) // new day dawns 682 if ( pParty->uCurrentHour >= 3 && (old_hour < 3 || pParty->uDaysPlayed > old_day) ) // new day dawns
732 { 683 {
733 pParty->pHirelings[0].bHasUsedTheAbility = false; 684 pParty->pHirelings[0].bHasUsedTheAbility = false;
734 pParty->pHirelings[1].bHasUsedTheAbility = false; 685 pParty->pHirelings[1].bHasUsedTheAbility = false;
735 686
736 for (uint i = 0; i < pNPCStats->uNumNewNPCs; ++i) 687 for (uint i = 0; i < pNPCStats->uNumNewNPCs; ++i)
747 else 698 else
748 for (uint i = 0; i < 4; ++i) 699 for (uint i = 0; i < 4; ++i)
749 pParty->pPlayers[i].sHealth = pParty->pPlayers[i].sHealth / (pParty->days_played_without_rest + 1) + 1; 700 pParty->pPlayers[i].sHealth = pParty->pPlayers[i].sHealth / (pParty->days_played_without_rest + 1) + 1;
750 701
751 if (pParty->days_played_without_rest > 3) 702 if (pParty->days_played_without_rest > 3)
752 for (uint i = 0; i < 4; ++i) 703 for ( uint i = 0; i < 4; ++i )
704 {
705 pParty->pPlayers[i].Zero();
706 if (!pParty->pPlayers[i].IsPertified() && !pParty->pPlayers[i].IsEradicated()
707 && !pParty->pPlayers[i].IsDead())
753 { 708 {
754 Player* player = &pParty->pPlayers[i]; 709 if (rand() % 100 < 5 * pParty->days_played_without_rest)
755 710 pParty->pPlayers[i].SetCondDeadWithBlockCheck(0);
756 player->Zero(); 711 if (rand() % 100 < 10 * pParty->days_played_without_rest)
757 712 pParty->pPlayers[i].SetCondInsaneWithBlockCheck(0);
758 if (!player->IsPertified() && !player->IsEradicated() && !player->IsDead())
759 {
760 if (rand() % 100 < 5 * pParty->days_played_without_rest)
761 player->SetCondDeadWithBlockCheck(0);
762 if (rand() % 100 < 10 * pParty->days_played_without_rest)
763 player->SetCondInsaneWithBlockCheck(0);
764 }
765 } 713 }
714 }
766 } 715 }
767 if (uCurrentlyLoadedLevelType == LEVEL_Outdoor) 716 if (uCurrentlyLoadedLevelType == LEVEL_Outdoor)
768 pOutdoor->SetFog(); 717 pOutdoor->SetFog();
769 718
770 for (uint i = 0; i < 4; ++i) 719 for (uint i = 0; i < 4; ++i)
771 pParty->pPlayers[i].uNumDivineInterventionCastsThisDay = 0; 720 pParty->pPlayers[i].uNumDivineInterventionCastsThisDay = 0;
772 } 721 }
773 722
774 v11 = LODWORD(pParty->uTimePlayed); 723 if ( pParty->uFlags & 4 && pParty->field_6FC < (signed __int64)pParty->uTimePlayed )//water damage
775 if ( pParty->uFlags & 4 && pParty->field_6FC < (signed __int64)pParty->uTimePlayed )//water damage error 724 {
776 { 725 pParty->field_6FC = (signed __int64)pParty->uTimePlayed + 128;
777 //v12 = 1; 726 viewparams->bRedrawGameUI = true;
778 pParty->field_6FC = LODWORD(pParty->uTimePlayed) + 128; 727 for ( uint pl = 1; pl <= 4; ++pl )
779 viewparams->bRedrawGameUI = 1; 728 {
780 //while ( 1 ) 729 if ( pPlayers[pl]->WearsItem(ITEM_RELIC_HARECS_LEATHER, EQUIP_ARMOUR)
781 for ( v12 = 1; v12 <= 4; ++v12 ) 730 || pPlayers[pl]->HasEnchantedItemEquipped(71)
782 { 731 || pPlayers[pl]->pPlayerBuffs[PLAYER_BUFF_WATER_WALK].uExpireTime > 0 )
783 if ( pPlayers[v12]->WearsItem(ITEM_RELIC_HARECS_LEATHER, EQUIP_ARMOUR) 732 pPlayers[pl]->PlayEmotion(CHARACTER_EXPRESSION_37, 0);
784 || pPlayers[v12]->HasEnchantedItemEquipped(71)
785 || pPlayers[v12]->pPlayerBuffs[23].uExpireTime > 0 )
786 {
787 //v58 = 0;
788 pPlayers[v12]->PlayEmotion(CHARACTER_EXPRESSION_37, 0);
789 }
790 else 733 else
791 { 734 {
792 //v58 = 0; 735 if ( !pPlayers[pl]->HasUnderwaterSuitEquipped() )
793 if ( !pPlayers[v12]->HasUnderwaterSuitEquipped() )
794 { 736 {
795 //v14 = pPlayers[v12]; 737 pPlayers[pl]->ReceiveDamage((signed __int64)pPlayers[pl]->GetMaxHealth() * 0.1, DMGT_FIRE);
796 //v15 = (double)pPlayers[v12]->GetMaxHealth() * 0.1;
797 pPlayers[v12]->ReceiveDamage((signed __int64)pPlayers[v12]->GetMaxHealth() * 0.1, DMGT_FIRE);
798 if ( pParty->uFlags & 4 ) 738 if ( pParty->uFlags & 4 )
799 { 739 {
800 strcpy(GameUI_Footer_TimedString.data(), pGlobalTXT_LocalizationStrings[660]); 740 strcpy(GameUI_Footer_TimedString.data(), pGlobalTXT_LocalizationStrings[660]);// Вы тонете!
801 GameUI_Footer_TimeLeft = 128; 741 GameUI_Footer_TimeLeft = 128;
802 } 742 }
803 } 743 }
804 else 744 else
805 pPlayers[v12]->PlayEmotion(CHARACTER_EXPRESSION_37, 0); 745 pPlayers[pl]->PlayEmotion(CHARACTER_EXPRESSION_37, 0);
806 } 746 }
807 //++v12; 747 }
808 //if ( v12 > 4 ) 748 }
809 //{ 749 if ( pParty->uFlags & 0x200 && pParty->field_6FC < (signed __int64)pParty->uTimePlayed ) //lava damage
810 //v11 = LODWORD(pParty->uTimePlayed); 750 {
811 //break; 751 viewparams->bRedrawGameUI = true;
812 } 752 pParty->field_6FC = (signed __int64)pParty->uTimePlayed + 128;
813 v11 = LODWORD(pParty->uTimePlayed); 753
814 //} 754 for ( uint pl = 1; pl <= 4; pl++ )
815 } 755 {
816 if ( pParty->uFlags & 0x200 && pParty->field_6FC < (signed __int64)__PAIR__(HIDWORD(pParty->uTimePlayed), v11) ) 756 pPlayers[pl]->ReceiveDamage((signed __int64)pPlayers[pl]->GetMaxHealth() * 0.1, DMGT_FIRE);
817 {
818 viewparams->bRedrawGameUI = 1;
819 pParty->field_6FC = v11 + 128;
820 v16 = &pPlayers[1];
821 do
822 {
823 v17 = *v16;
824 v18 = (double)(*v16)->GetMaxHealth() * 0.1;
825 v17->ReceiveDamage((signed __int64)v18, DMGT_FIRE);
826 if ( pParty->uFlags & 0x200 ) 757 if ( pParty->uFlags & 0x200 )
827 { 758 {
828 strcpy(GameUI_Footer_TimedString.data(), pGlobalTXT_LocalizationStrings[661]); 759 strcpy(GameUI_Footer_TimedString.data(), pGlobalTXT_LocalizationStrings[661]); //Вы горите!
829 GameUI_Footer_TimeLeft = 128; 760 GameUI_Footer_TimeLeft = 128;
830 } 761 }
831 ++v16; 762 }
832 }
833 while ( (signed int)v16 <= (signed int)&pPlayers[4] );
834 } 763 }
835 _493938_regenerate(); 764 _493938_regenerate();
836 v65 = 4; 765 uint party_condition_flag = 4;
837 a2a = pEventTimer->uTimeElapsed; 766 a2a = pEventTimer->uTimeElapsed;
838 if ( pParty->uFlags2 & PARTY_FLAGS_2_RUNNING ) 767 if ( pParty->uFlags2 & PARTY_FLAGS_2_RUNNING )//замедление восстановления при беге
839 { 768 {
840 //v19 = (double)(signed int)prev_time * 0.5;
841 //v20 = v19 + 6.7553994e15;
842 a2a *= 0.5f; 769 a2a *= 0.5f;
843 if (a2a < 1) 770 if (a2a < 1)
844 a2a = 1; 771 a2a = 1;
845 } 772 }
846 v62 = &pPlayers[1]; 773
847 do 774 for ( uint pl = 1; pl <= 4; pl++ )
848 { 775 {
849 v21 = *v62; 776 if ( pPlayers[pl]->uTimeToRecovery )
850 if ( (*v62)->uTimeToRecovery ) 777 pPlayers[pl]->Recover(a2a);//восстановление активности
851 v21->Recover(a2a); 778 if ( pPlayers[pl]->GetItemsBonus(CHARACTER_ATTRIBUTE_ENDURANCE) + pPlayers[pl]->sHealth + pPlayers[pl]->uEndurance >= 1
852 v22 = v21->sHealth; 779 || (signed __int64)pPlayers[pl]->pPlayerBuffs[PLAYER_BUFF_PRESERVATION].uExpireTime > 0 )
853 if ( v21->GetItemsBonus(CHARACTER_ATTRIBUTE_ENDURANCE) + v22 + v21->uEndurance >= 1 780 {
854 || (signed __int64)v21->pPlayerBuffs[11].uExpireTime > 0 ) 781 if ( pPlayers[pl]->sHealth < 1 )
855 { 782 pPlayers[pl]->SetCondition(Condition_Unconcious, 0);
856 if ( v22 < 1 )
857 {
858 v59 = 0;
859 v56 = 13;
860 v21->SetCondition(v56, v59);
861 }
862 } 783 }
863 else 784 else
864 { 785 pPlayers[pl]->SetCondition(Condition_Dead, 0);
865 v59 = 0; 786 if ( pPlayers[pl]->field_E0 )
866 v56 = 14; 787 {
867 v21->SetCondition(v56, v59); 788 v24 = pPlayers[pl]->field_E0 - pEventTimer->uTimeElapsed;
868 }
869 v23 = (int)&v21->field_E0;
870 if ( v21->field_E0 )
871 {
872 v24 = *(int *)v23 - pEventTimer->uTimeElapsed;
873 if ( v24 > 0 ) 789 if ( v24 > 0 )
874 { 790 pPlayers[pl]->field_E0 = v24;
875 *(int *)v23 = v24;
876 }
877 else 791 else
878 { 792 {
879 *(int *)v23 = 0; 793 pPlayers[pl]->field_E0 = 0;
880 viewparams->bRedrawGameUI = 1; 794 viewparams->bRedrawGameUI = true;
881 } 795 }
882 } 796 }
883 v25 = (int)&v21->field_E4; 797 if ( pPlayers[pl]->field_E4 )
884 if ( v21->field_E4 ) 798 {
885 { 799 v26 = pPlayers[pl]->field_E4 - pEventTimer->uTimeElapsed;
886 v26 = *(int *)v25 - pEventTimer->uTimeElapsed;
887 if ( v26 > 0 ) 800 if ( v26 > 0 )
888 { 801 pPlayers[pl]->field_E4 = v26;
889 *(int *)v25 = v26;
890 }
891 else 802 else
892 { 803 {
893 *(int *)v25 = 0; 804 pPlayers[pl]->field_E4 = 0;
894 viewparams->bRedrawGameUI = 1; 805 viewparams->bRedrawGameUI = true;
895 } 806 }
896 } 807 }
897 v27 = (int)&v21->field_E8; 808 if ( pPlayers[pl]->field_E8 )
898 if ( v21->field_E8 ) 809 {
899 { 810 v28 = pPlayers[pl]->field_E8 - pEventTimer->uTimeElapsed;
900 v28 = *(int *)v27 - pEventTimer->uTimeElapsed;
901 if ( v28 > 0 ) 811 if ( v28 > 0 )
902 { 812 pPlayers[pl]->field_E8 = v28;
903 *(int *)v27 = v28;
904 }
905 else 813 else
906 { 814 {
907 *(int *)v27 = 0; 815 pPlayers[pl]->field_E8 = 0;
908 viewparams->bRedrawGameUI = 1; 816 viewparams->bRedrawGameUI = true;
909 } 817 }
910 } 818 }
911 v29 = (int)&v21->field_EC; 819 if ( pPlayers[pl]->field_EC )
912 if ( v21->field_EC ) 820 {
913 { 821 v30 = pPlayers[pl]->field_EC - pEventTimer->uTimeElapsed;
914 v30 = *(int *)v29 - pEventTimer->uTimeElapsed;
915 if ( v30 > 0 ) 822 if ( v30 > 0 )
916 { 823 pPlayers[pl]->field_EC = v30;
917 *(int *)v29 = v30;
918 }
919 else 824 else
920 { 825 {
921 *(int *)v29 = 0; 826 pPlayers[pl]->field_EC = 0;
922 viewparams->bRedrawGameUI = 1; 827 viewparams->bRedrawGameUI = true;
923 } 828 }
924 } 829 }
925 v31 = (int)&v21->field_F0; 830 if ( pPlayers[pl]->field_F0 )
926 if ( v21->field_F0 ) 831 {
927 { 832 v32 = pPlayers[pl]->field_F0 - pEventTimer->uTimeElapsed;
928 v32 = *(int *)v31 - pEventTimer->uTimeElapsed;
929 if ( v32 > 0 ) 833 if ( v32 > 0 )
930 { 834 pPlayers[pl]->field_F0 = v32;
931 *(int *)v31 = v32;
932 }
933 else 835 else
934 { 836 {
935 *(int *)v31 = 0; 837 pPlayers[pl]->field_F0 = 0;
936 viewparams->bRedrawGameUI = 1; 838 viewparams->bRedrawGameUI = true;
937 } 839 }
938 } 840 }
939 v33 = (int)&v21->field_F4; 841 if ( pPlayers[pl]->field_F4 )
940 if ( v21->field_F4 ) 842 {
941 { 843 v34 = pPlayers[pl]->field_F4 - pEventTimer->uTimeElapsed;
942 v34 = *(int *)v33 - pEventTimer->uTimeElapsed;
943 if ( v34 > 0 ) 844 if ( v34 > 0 )
944 { 845 pPlayers[pl]->field_F4 = v34;
945 *(int *)v33 = v34;
946 }
947 else 846 else
948 { 847 {
949 *(int *)v33 = 0; 848 pPlayers[pl]->field_F4 = 0;
950 viewparams->bRedrawGameUI = 1; 849 viewparams->bRedrawGameUI = true;
951 } 850 }
952 } 851 }
953 v35 = (int)&v21->field_F8; 852 if ( pPlayers[pl]->field_F8 )
954 if ( v21->field_F8 ) 853 {
955 { 854 v36 = pPlayers[pl]->field_F8 - pEventTimer->uTimeElapsed;
956 v36 = *(int *)v35 - pEventTimer->uTimeElapsed;
957 if ( v36 > 0 ) 855 if ( v36 > 0 )
958 { 856 pPlayers[pl]->field_F8 = v36;
959 *(int *)v35 = v36;
960 }
961 else 857 else
962 { 858 {
963 *(int *)v35 = 0; 859 pPlayers[pl]->field_F8 = 0;
964 viewparams->bRedrawGameUI = 1; 860 viewparams->bRedrawGameUI = true;
965 } 861 }
966 } 862 }
967 v37 = (int)&v21->field_FC; 863 if ( pPlayers[pl]->field_FC )
968 if ( v21->field_FC ) 864 {
969 { 865 v38 = pPlayers[pl]->field_FC - pEventTimer->uTimeElapsed;
970 v38 = *(int *)v37 - pEventTimer->uTimeElapsed;
971 if ( v38 > 0 ) 866 if ( v38 > 0 )
972 { 867 pPlayers[pl]->field_FC = v38;
973 *(int *)v37 = v38;
974 }
975 else 868 else
976 { 869 {
977 *(int *)v37 = 0; 870 pPlayers[pl]->field_FC = 0;
978 viewparams->bRedrawGameUI = 1; 871 viewparams->bRedrawGameUI = true;
979 } 872 }
980 } 873 }
981 v39 = (int)&v21->field_100; 874 if ( pPlayers[pl]->field_100 )
982 if ( v21->field_100 ) 875 {
983 { 876 v40 = pPlayers[pl]->field_100 - pEventTimer->uTimeElapsed;
984 v40 = *(int *)v39 - pEventTimer->uTimeElapsed;
985 if ( v40 > 0 ) 877 if ( v40 > 0 )
986 { 878 pPlayers[pl]->field_100 = v40;
987 *(int *)v39 = v40;
988 }
989 else 879 else
990 { 880 {
991 *(int *)v39 = 0; 881 pPlayers[pl]->field_100 = 0;
992 viewparams->bRedrawGameUI = 1; 882 viewparams->bRedrawGameUI = true;
993 } 883 }
994 } 884 }
995 v41 = (int)&v21->field_104; 885 if ( pPlayers[pl]->field_104 )
996 if ( v21->field_104 ) 886 {
997 { 887 v42 = pPlayers[pl]->field_104 - pEventTimer->uTimeElapsed;
998 v42 = *(int *)v41 - pEventTimer->uTimeElapsed;
999 if ( v42 > 0 ) 888 if ( v42 > 0 )
1000 { 889 pPlayers[pl]->field_104 = v42;
1001 *(int *)v41 = v42;
1002 }
1003 else 890 else
1004 { 891 {
1005 *(int *)v41 = 0; 892 pPlayers[pl]->field_104 = 0;
1006 viewparams->bRedrawGameUI = 1; 893 viewparams->bRedrawGameUI = true;
1007 } 894 }
1008 } 895 }
1009 if ( v21->pConditions[2] | v21->pConditions[12] | v21->pConditions[13] | v21->pConditions[14] | v21->pConditions[15] | v21->pConditions[16] ) 896 if ( pPlayers[pl]->pConditions[Condition_Sleep] | pPlayers[pl]->pConditions[Condition_Paralyzed]
1010 --v65; 897 | pPlayers[pl]->pConditions[Condition_Unconcious] | pPlayers[pl]->pConditions[Condition_Dead]
1011 v43 = (signed __int64)v21->pPlayerBuffs[7].uExpireTime > 0; 898 | pPlayers[pl]->pConditions[Condition_Pertified] | pPlayers[pl]->pConditions[Condition_Eradicated] )
1012 899 --party_condition_flag;
1013 for (uint k = 0; k < 24; ++k) 900 v43 = (signed __int64)pPlayers[pl]->pPlayerBuffs[PLAYER_BUFF_HASTE].uExpireTime > 0; //спешка
1014 v21->pPlayerBuffs[k].IsBuffExpiredToTime(pParty->uTimePlayed); 901
1015 902 for ( uint k = 0; k < 24; ++k )
1016 if ( v43 && (signed __int64)v21->pPlayerBuffs[7].uExpireTime <= 0 ) 903 pPlayers[pl]->pPlayerBuffs[k].IsBuffExpiredToTime(pParty->uTimePlayed);
1017 v21->SetCondition(1u, 0); 904
1018 ++v62; 905 if ( v43 && (signed __int64)pPlayers[pl]->pPlayerBuffs[7].uExpireTime <= 0 )
1019 } 906 pPlayers[pl]->SetCondition(Condition_Weak, 0);
1020 while ( (signed int)v62 <= (signed int)&pPlayers[4] ); 907 }
908
1021 v46 = (signed __int64)pParty->pPartyBuffs[PARTY_BUFF_HASTE].uExpireTime > 0; 909 v46 = (signed __int64)pParty->pPartyBuffs[PARTY_BUFF_HASTE].uExpireTime > 0;
1022 910
1023 for (uint i = 0; i < 20; ++i) 911 for (uint i = 0; i < 20; ++i)
1024 { 912 {
1025 if (pParty->pPartyBuffs[i].IsBuffExpiredToTime(pParty->uTimePlayed) == 1) 913 if (pParty->pPartyBuffs[i].IsBuffExpiredToTime(pParty->uTimePlayed) == 1)
1026 viewparams->bRedrawGameUI = 1; 914 viewparams->bRedrawGameUI = true;
1027 } 915 }
1028 916
1029 if ( v46 && (signed __int64)pParty->pPartyBuffs[PARTY_BUFF_HASTE].uExpireTime <= 0 ) 917 if ( v46 && (signed __int64)pParty->pPartyBuffs[PARTY_BUFF_HASTE].uExpireTime <= 0 )
1030 { 918 {
1031 for (uint i = 0; i < 4; ++i) 919 for (uint i = 0; i < 4; ++i)
1047 pParty->bFlying = false; 935 pParty->bFlying = false;
1048 } 936 }
1049 } 937 }
1050 } 938 }
1051 939
1052 v51 = v65; 940 if ( !party_condition_flag )
1053 if ( v65 )
1054 goto LABEL_135;
1055 if ( pCurrentScreen != SCREEN_REST )
1056 {
1057 v52 = (signed int)&pPlayers[1];
1058 while ( 1 )
1059 {
1060 v53 = *(int *)v52;
1061 if ( *(_QWORD *)(*(int *)v52 + 16) )
1062 break;
1063 v52 += 4;
1064 if ( v52 > (signed int)&pPlayers[4] )
1065 goto LABEL_135;
1066 }
1067 *(int *)(v53 + 16) = 0;
1068 *(int *)(v53 + 20) = 0;
1069 v51 = 1;
1070 LABEL_135:
1071 if ( pCurrentScreen != SCREEN_REST
1072 && (!v51 || dword_5C35C0) )
1073 uGameState = GAME_STATE_PARTY_DIED;
1074 }
1075 if ( uActiveCharacter )
1076 { 941 {
1077 if ( pCurrentScreen != SCREEN_REST ) 942 if ( pCurrentScreen != SCREEN_REST )
1078 { 943 {
1079 v54 = pPlayers[uActiveCharacter]; 944 for ( uint pl = 1; pl <= 4; pl++ )
1080 if ( v54->pConditions[2] 945 {
1081 || v54->pConditions[12] 946 if ( pPlayers[pl]->pConditions[Condition_Sleep] )
1082 || v54->pConditions[13] 947 {
1083 || v54->pConditions[14] 948 pPlayers[pl]->pConditions[Condition_Sleep] = 0;
1084 || v54->pConditions[15] 949 party_condition_flag = 1;
1085 || v54->pConditions[16] ) 950 break;
1086 { 951 }
1087 viewparams->bRedrawGameUI = 1; 952 }
953 if ( !party_condition_flag || dword_5C35C0 )
954 uGameState = GAME_STATE_PARTY_DIED;
955 }
956 }
957
958 if ( uActiveCharacter )//выбор следующего после пропускающего ход
959 {
960 if ( pCurrentScreen != SCREEN_REST )
961 {
962 if ( pPlayers[uActiveCharacter]->pConditions[Condition_Sleep]
963 || pPlayers[uActiveCharacter]->pConditions[Condition_Paralyzed]
964 || pPlayers[uActiveCharacter]->pConditions[Condition_Unconcious]
965 || pPlayers[uActiveCharacter]->pConditions[Condition_Dead]
966 || pPlayers[uActiveCharacter]->pConditions[Condition_Pertified]
967 || pPlayers[uActiveCharacter]->pConditions[Condition_Eradicated] )
968 {
969 viewparams->bRedrawGameUI = true;
1088 uActiveCharacter = pParty->GetNextActiveCharacter(); 970 uActiveCharacter = pParty->GetNextActiveCharacter();
1089 } 971 }
1090 } 972 }
1091 } 973 }
1092 } 974 }