public static void UpdateInstancePosition(SpellDamageControllerT2A 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 #2
0
 public static void UpdateInstancePosition(SpellDamageControllerT2A 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 SpellDamageControllerT2A()
            : base(0xEDC)
        {
            this.Name = "Spell Damage Controller T2A";
            this.Movable = false;
            this.Visible = false;

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

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

            int version = reader.ReadInt();

            switch (version)
            {
            case 5:
            {
                _MagicArrowDamageDelay = reader.ReadDouble();
                _EnergyBoltDamageDelay = reader.ReadDouble();
                _FireballDamageDelay   = reader.ReadDouble();
            }
                goto case 4;

            case 4:
            {
                _MindblastDamageDivisor       = reader.ReadDouble();
                _NewTravellingSpellDelayValue = reader.ReadDouble();
                _OldTravellingSpellDelay      = reader.ReadBool();
            }
                goto case 3;

            case 3:
                _SlayerMultiplier  = reader.ReadDouble();
                _CanStackExplosion = reader.ReadBool();
                goto case 2;

            case 2:
                _PoisonSkillResistModifier = reader.ReadDouble();
                goto case 1;

            case 1:
                _ManaDrainResistChance   = reader.ReadDouble();
                _ManaVampireResistChance = reader.ReadDouble();
                goto case 0;

            case 0:
                __MaxFirstPercent = reader.ReadDouble();
                __MaxSecondPercentMageryAffect = reader.ReadDouble();
                __SecondPercentCircleAffect    = reader.ReadDouble();
                __GlobalResistChanceMultiplier = reader.ReadDouble();
                _FlameStrikeResistMultiplier   = reader.ReadDouble();
                _FlameStrikeDamageMin          = reader.ReadInt();
                _FlameStrikeDamageMax          = reader.ReadInt();
                _FlameStrikeDelaySeconds       = reader.ReadDouble();
                _ExplosionResistMultiplier     = reader.ReadDouble();
                _ExplosionDamageMin            = reader.ReadInt();
                _ExplosionDamageMax            = reader.ReadInt();
                _ExplosionBaseDelay            = reader.ReadDouble();
                _ExplosionDelayRandomTenths    = reader.ReadInt();
                _EnergyBoltResistMultiplier    = reader.ReadDouble();
                _EnergyBoltDamageMin           = reader.ReadInt();
                _EnergyBoltDamageMax           = reader.ReadInt();
                _LightningResistMultiplier     = reader.ReadDouble();
                _LightningDamageMin            = reader.ReadInt();
                _LightningDamageMax            = reader.ReadInt();
                _FireballResistMultiplier      = reader.ReadDouble();
                _FireballDamageMin             = reader.ReadInt();
                _FireballDamageMax             = reader.ReadInt();
                _HarmResistMultiplier          = reader.ReadDouble();
                _HarmDamageMin                = reader.ReadInt();
                _HarmDamageMax                = reader.ReadInt();
                _HarmFarDistanceMultiplier    = reader.ReadDouble();
                _HarmMediumDistanceMultiplier = reader.ReadDouble();
                break;
            }
            m_Instance = this;
        }
        public override void Deserialize(GenericReader reader)
        {
            base.Deserialize(reader);

            int version = reader.ReadInt();

            switch (version)
            {
                case 5:
                    {
                        _MagicArrowDamageDelay = reader.ReadDouble();
                        _EnergyBoltDamageDelay = reader.ReadDouble();
                        _FireballDamageDelay = reader.ReadDouble();
                    }
                    goto case 4;
                case 4:
                {
                    _MindblastDamageDivisor = reader.ReadDouble();
                    _NewTravellingSpellDelayValue = reader.ReadDouble();
                    _OldTravellingSpellDelay = reader.ReadBool();
                }
                    goto case 3;
                case 3:
                    _SlayerMultiplier = reader.ReadDouble();
                    _CanStackExplosion = reader.ReadBool();
                    goto case 2;
                case 2:
                    _PoisonSkillResistModifier = reader.ReadDouble();
                    goto case 1;
                case 1:
                    _ManaDrainResistChance = reader.ReadDouble();
                    _ManaVampireResistChance = reader.ReadDouble();
                    goto case 0;
                case 0:
                    __MaxFirstPercent = reader.ReadDouble();
                    __MaxSecondPercentMageryAffect = reader.ReadDouble();
                    __SecondPercentCircleAffect = reader.ReadDouble();
                    __GlobalResistChanceMultiplier = reader.ReadDouble();
                    _FlameStrikeResistMultiplier = reader.ReadDouble();
                    _FlameStrikeDamageMin = reader.ReadInt();
                    _FlameStrikeDamageMax = reader.ReadInt();
                    _FlameStrikeDelaySeconds = reader.ReadDouble();
                    _ExplosionResistMultiplier = reader.ReadDouble();
                    _ExplosionDamageMin = reader.ReadInt();
                    _ExplosionDamageMax = reader.ReadInt();
                    _ExplosionBaseDelay = reader.ReadDouble();
                    _ExplosionDelayRandomTenths = reader.ReadInt();
                    _EnergyBoltResistMultiplier = reader.ReadDouble();
                    _EnergyBoltDamageMin = reader.ReadInt();
                    _EnergyBoltDamageMax = reader.ReadInt();
                    _LightningResistMultiplier = reader.ReadDouble();
                    _LightningDamageMin = reader.ReadInt();
                    _LightningDamageMax = reader.ReadInt();
                    _FireballResistMultiplier = reader.ReadDouble();
                    _FireballDamageMin = reader.ReadInt();
                    _FireballDamageMax = reader.ReadInt();
                    _HarmResistMultiplier = reader.ReadDouble();
                    _HarmDamageMin = reader.ReadInt();
                    _HarmDamageMax = reader.ReadInt();
                    _HarmFarDistanceMultiplier = reader.ReadDouble();
                    _HarmMediumDistanceMultiplier = reader.ReadDouble();
                    break;
            }
            m_Instance = this;
        }