Example #1
0
        public override void Deserialize(GenericReader reader)
        {
            base.Deserialize(reader);

            int version = reader.ReadInt();

            switch (version)
            {
            case 0:
                _AlchemyBonusPercentageOfSkill = reader.ReadDouble();
                _AlchemyBonusMax                  = reader.ReadInt();
                _GreaterExplosionPotDmgMin        = reader.ReadInt();
                _GreaterExplosionPotDmgMax        = reader.ReadInt();
                _GreaterExplosionPotTimeDelay     = reader.ReadDouble();
                _ExplosionPotDmgMin               = reader.ReadInt();
                _ExplosionPotDmgMax               = reader.ReadInt();
                _ExplosionPotTimeDelay            = reader.ReadDouble();
                _LesserExplosionPotDmgMin         = reader.ReadInt();
                _LesserExplosionPotDmgMax         = reader.ReadInt();
                _LesserExplosionPotTimeDelay      = reader.ReadDouble();
                _ExplosionPotionHandsNotFreeDelay = reader.ReadDouble();
                break;
            }
            m_Instance = this;
        }
 public static void UpdateInstancePosition(ExplosionPotionController 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();
     }
 }
Example #3
0
 public static void UpdateInstancePosition(ExplosionPotionController 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();
     }
 }
        public ExplosionPotionController()
            : base(0xEDC)
        {
            this.Name = "Explosion Potion Controller";
            this.Movable = false;
            this.Visible = false;

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

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

            int version = reader.ReadInt();
            switch (version)
            {
                case 0:
                    _AlchemyBonusPercentageOfSkill = reader.ReadDouble();
                    _AlchemyBonusMax = reader.ReadInt();
                    _GreaterExplosionPotDmgMin = reader.ReadInt();
                    _GreaterExplosionPotDmgMax = reader.ReadInt();
                    _GreaterExplosionPotTimeDelay = reader.ReadDouble();
                    _ExplosionPotDmgMin = reader.ReadInt();
                    _ExplosionPotDmgMax = reader.ReadInt();
                    _ExplosionPotTimeDelay = reader.ReadDouble();
                    _LesserExplosionPotDmgMin = reader.ReadInt();
                    _LesserExplosionPotDmgMax = reader.ReadInt();
                    _LesserExplosionPotTimeDelay = reader.ReadDouble();
                    _ExplosionPotionHandsNotFreeDelay = reader.ReadDouble();
                    break;
            }
            m_Instance = this;
        }