Esempio n. 1
0
        static AutoPvP()
        {
            CMOptions = new AutoPvPOptions();

            Scenarios   = new PvPScenario[0];
            BattleTypes = typeof(PvPBattle).GetConstructableChildren();

            SeasonSchedule = new Schedule(CMOptions.ModuleName + " Seasons", false, DefaultSeasonSchedule);

            Seasons = new BinaryDataStore <int, PvPSeason>(VitaNexCore.SavesDirectory + "/AutoPvP", "Seasons")
            {
                OnSerialize   = SerializeSeasons,
                OnDeserialize = DeserializeSeasons
            };

            Battles = new BinaryDirectoryDataStore <PvPSerial, PvPBattle>(
                VitaNexCore.SavesDirectory + "/AutoPvP", "Battles", "pvp")
            {
                OnSerialize   = SerializeBattle,
                OnDeserialize = DeserializeBattle
            };

            Profiles = new BinaryDataStore <PlayerMobile, PvPProfile>(VitaNexCore.SavesDirectory + "/AutoPvP", "Profiles")
            {
                Async         = true,
                OnSerialize   = SerializeProfiles,
                OnDeserialize = DeserializeProfiles
            };
        }
Esempio n. 2
0
		static AutoPvP()
		{
			CMOptions = new AutoPvPOptions();

			Scenarios = new PvPScenario[0];
			BattleTypes = typeof(PvPBattle).GetConstructableChildren();

			SeasonSchedule = new Schedule(CMOptions.ModuleName + " Seasons", false, DefaultSeasonSchedule);

			Seasons = new BinaryDataStore<int, PvPSeason>(VitaNexCore.SavesDirectory + "/AutoPvP", "Seasons")
			{
				OnSerialize = SerializeSeasons,
				OnDeserialize = DeserializeSeasons
			};

			Battles = new BinaryDirectoryDataStore<PvPSerial, PvPBattle>(
				VitaNexCore.SavesDirectory + "/AutoPvP", "Battles", "pvp")
			{
				OnSerialize = SerializeBattle,
				OnDeserialize = DeserializeBattle
			};

			Profiles = new BinaryDataStore<PlayerMobile, PvPProfile>(VitaNexCore.SavesDirectory + "/AutoPvP", "Profiles")
			{
				Async = true,
				OnSerialize = SerializeProfiles,
				OnDeserialize = DeserializeProfiles
			};
		}