Esempio n. 1
0
 public RestTime(RestTime old)
 {
     field_0 = old.field_0;
     field_2 = old.field_2;
     field_4 = old.field_4;
     field_6 = old.field_6;
     field_8 = old.field_8;
     field_A = old.field_A;
     field_C = old.field_C;
 }
Esempio n. 2
0
 public RestTime(RestTime old)
 {
     field_0 = old.field_0;
     field_2 = old.field_2;
     field_4 = old.field_4;
     field_6 = old.field_6;
     field_8 = old.field_8;
     field_A = old.field_A;
     field_C = old.field_C;
 }
Esempio n. 3
0
 /* sub_58317 */
 static void NormalizeClock(RestTime arg_0)
 {
     for (int i = 0; i <= 6; i++)
     {
         if (arg_0[i] >= timeScales[i])/* short arrays */
         {
             if (i != 6)
             {
                 arg_0[i + 1] += 1;
                 arg_0[i] -= timeScales[i]; ;
             }
             else
             {
                 foreach (Player player in gbl.TeamList)
                 {
                     player.age += 1;
                 }
             }
         }
     }
 }
Esempio n. 4
0
        /* sub_583FA */
        internal static void step_game_time(int time_slot, int amount)
        {
            RestTime rest_time = new RestTime();

            for (int i = 0; i <= 6; i++)
            {
                rest_time[i] = gbl.area_ptr.field_6A00_Get(0x6A00 + ((0x4BC6 + i) * 2)); // as WORD[]
            }

            for (int i = 1; i <= amount; i++)
            {
                rest_time[time_slot] += 1;

                NormalizeClock(rest_time);
            }

            for (int i = 0; i <= 6; i++)
            {
                gbl.area_ptr.field_6A00_Set(0x6A00 + ((0x4BC6 + i) * 2), (ushort)rest_time[i]);
            }

            CheckAffectsTimingOut(time_slot, amount);
        }
Esempio n. 5
0
        // fix_menu
        static bool FixTeam()
        {
            bool action_interrupted = false;

            if (TotalHitpointsLost() != 0)
            {
                int healingAvailable = CalculateInitialHealing();

                if (TotalHitpointsLost() == 0)
                {
                    ovr025.PartySummary(gbl.SelectedPlayer);
                    ovr025.display_map_position_time();
                }
                else
                {
                    RestTime timeBackup = new RestTime(gbl.timeToRest);

                    int numCureCritical;
                    int numCureSerious;
                    int numCureLight;
                    CalculateTimeAndSpellNumbers(out numCureCritical, out numCureSerious, out numCureLight);

                    action_interrupted = ovr021.resting(false);

                    if (action_interrupted == false)
                    {
                        CalculateHealing(ref healingAvailable, numCureLight, numCureSerious, numCureCritical);
                        DoTeamHealing(ref healingAvailable);

                        ovr025.PartySummary(gbl.SelectedPlayer);
                        ovr025.display_map_position_time();

                        gbl.timeToRest = new RestTime(timeBackup);
                    }
                }
            }

            return action_interrupted;
        }