コード例 #1
0
        private static bool SerializeBattle(GenericWriter writer, PvPSerial key, PvPBattle val)
        {
            int version = writer.SetVersion(0);

            switch (version)
            {
            case 0:
            {
                writer.WriteBlock(
                    () => writer.WriteType(
                        key,
                        t =>
                    {
                        if (t != null)
                        {
                            key.Serialize(writer);
                        }
                    }));

                writer.WriteBlock(
                    () => writer.WriteType(
                        val,
                        t =>
                    {
                        if (t != null)
                        {
                            val.Serialize(writer);
                        }
                    }));
            }
            break;
            }

            return(true);
        }
コード例 #2
0
        private static bool SerializeBattle(GenericWriter writer, PvPSerial key, PvPBattle val)
        {
            var version = writer.SetVersion(0);

            switch (version)
            {
            case 0:
            {
                writer.WriteBlock(w => w.WriteType(key, t => key.Serialize(w)));
                writer.WriteBlock(w => w.WriteType(val, t => val.Serialize(w)));
            }
            break;
            }

            return(true);
        }
コード例 #3
0
ファイル: AutoPvP_Init.cs プロジェクト: greeduomacro/RuneUO
		private static bool SerializeBattle(GenericWriter writer, PvPSerial key, PvPBattle val)
		{
			int version = writer.SetVersion(0);

			switch (version)
			{
				case 0:
					{
						writer.WriteBlock(w => w.WriteType(key, t => key.Serialize(w)));
						writer.WriteBlock(w => w.WriteType(val, t => val.Serialize(w)));
					}
					break;
			}

			return true;
		}