Пример #1
0
        public override void Deserialize(GenericReader reader)
        {
            base.Deserialize(reader);

            int version = reader.ReadInt();

            switch (version)
            {
            case 1:
                _AnybodyAllowedInStronghold = reader.ReadBool();
                goto case 0;

            case 0:
                //_PoisonChancePenaltyPerFollower = reader.ReadDouble();

                _CriminalCanUseOthersGates = reader.ReadBool();
                _SigilAnnounceStolen       = (SigilStolenAnnouncing)reader.ReadByte();
                _SigilCorruptionGrace      = reader.ReadTimeSpan();
                _SigilCorruptionPeriod     = reader.ReadTimeSpan();
                _SigilReturnPeriod         = reader.ReadTimeSpan();
                _SigilPurificationPeriod   = reader.ReadTimeSpan();
                break;
            }
            m_Instance = this;
        }
Пример #2
0
 public static void UpdateInstancePosition(PvPController attemptedConstruct)
 {
     if (attemptedConstruct == null) return;
     if (m_Instance == null) // should never happen, but if it does, make this the instance
     {
         m_Instance = attemptedConstruct;
     }
     else if (attemptedConstruct.Location != new Point3D(0,0,0)) // move the instance to it's location and delete it
     {
         m_Instance.Location = attemptedConstruct.Location;
         attemptedConstruct.Delete();
     }
 }
Пример #3
0
 public static void UpdateInstancePosition(PvPController attemptedConstruct)
 {
     if (attemptedConstruct == null)
     {
         return;
     }
     if (m_Instance == null) // should never happen, but if it does, make this the instance
     {
         m_Instance = attemptedConstruct;
     }
     else if (attemptedConstruct.Location != new Point3D(0, 0, 0)) // move the instance to it's location and delete it
     {
         m_Instance.Location = attemptedConstruct.Location;
         attemptedConstruct.Delete();
     }
 }
Пример #4
0
        public PvPController()
            : base(0xEDC)
        {
            this.Name = "PvP Controller";
            this.Movable = false;
            this.Visible = false;

            if (m_Instance != null)
            {
                // there can only be one PvPController game stone in the world
                m_Instance.Location = this.Location;
                Server.Commands.CommandHandlers.BroadcastMessage(AccessLevel.Administrator, 0x489,
                    "Existing PvPController has been moved to this location (DON'T DELETE IT!).");
                Timer.DelayCall(TimeSpan.FromSeconds(1), new TimerStateCallback<PvPController>(UpdateInstancePosition), this); 
            }
            else
                m_Instance = this;
        }
Пример #5
0
        public PvPController()
            : base(0xEDC)
        {
            this.Name    = "PvP Controller";
            this.Movable = false;
            this.Visible = false;

            if (m_Instance != null)
            {
                // there can only be one PvPController game stone in the world
                m_Instance.Location = this.Location;
                Server.Commands.CommandHandlers.BroadcastMessage(AccessLevel.Administrator, 0x489,
                                                                 "Existing PvPController has been moved to this location (DON'T DELETE IT!).");
                Timer.DelayCall(TimeSpan.FromSeconds(1), new TimerStateCallback <PvPController>(UpdateInstancePosition), this);
            }
            else
            {
                m_Instance = this;
            }
        }
Пример #6
0
        public override void Deserialize(GenericReader reader)
        {
            base.Deserialize(reader);

            int version = reader.ReadInt();
            switch (version)
            {
                case 1:
                    _AnybodyAllowedInStronghold = reader.ReadBool();
                    goto case 0;

                case 0:
                    //_PoisonChancePenaltyPerFollower = reader.ReadDouble();
                    
                    _CriminalCanUseOthersGates = reader.ReadBool();
                    _SigilAnnounceStolen = (SigilStolenAnnouncing)reader.ReadByte();
                    _SigilCorruptionGrace = reader.ReadTimeSpan();
                    _SigilCorruptionPeriod = reader.ReadTimeSpan();
                    _SigilReturnPeriod = reader.ReadTimeSpan();
                    _SigilPurificationPeriod = reader.ReadTimeSpan();
                    break;
            }
            m_Instance = this;
        }