コード例 #1
0
 public static void UpdateInstancePosition(WeaponDamageController 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();
     }
 }
コード例 #2
0
        public WeaponDamageController()
            : base(0xEDC)
        {
            this.Name = "Weapon Damage Controller";
            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.GameMaster, 0x489,
                    "Existing WeaponDamageController has been moved to this location (DON'T DELETE IT!).");
                Timer.DelayCall(TimeSpan.FromSeconds(1), new TimerStateCallback<WeaponDamageController>(UpdateInstancePosition), this); 
            }
            else
                m_Instance = this;
        }
コード例 #3
0
        public override void Deserialize(GenericReader reader)
        {
            base.Deserialize(reader);

            int version = reader.ReadInt();
            switch (version)
            {
                case 2:
                    _WeaponDurabilityLossVsMobs = reader.ReadDouble();
                    goto case 1;
                case 1:
                    // global attributes
                    m_AllWeaponDamageMultiplier = reader.ReadDouble();
                    m_PlayerVsMobMultiplier = reader.ReadDouble();
                    m_MobVsPlayerMultiplier = reader.ReadDouble();
                    m_MobVsPlayerReduction = reader.ReadInt();

                    // individual weapon attributes
                    m_AxeDamageMin = reader.ReadInt(); m_AxeDamageMax = reader.ReadInt();
                    m_BattleAxeDamageMin = reader.ReadInt(); m_BattleAxeDamageMax = reader.ReadInt();
                    m_DoubleAxeDamageMin = reader.ReadInt(); m_DoubleAxeDamageMax = reader.ReadInt();
                    m_ExecutionersAxeDamageMin = reader.ReadInt(); m_ExecutionersAxeDamageMax = reader.ReadInt();
                    m_HatchetDamageMin = reader.ReadInt(); m_HatchetDamageMax = reader.ReadInt();
                    m_LargeBattleAxeDamageMin = reader.ReadInt(); m_LargeBattleAxeDamageMax = reader.ReadInt();
                    m_PickaxeDamageMin = reader.ReadInt(); m_PickaxeDamageMax = reader.ReadInt();
                    m_TwoHandedAxeDamageMin = reader.ReadInt(); m_TwoHandedAxeDamageMax = reader.ReadInt();
                    m_WarAxeDamageMin = reader.ReadInt(); m_WarAxeDamageMax = reader.ReadInt();
                    m_ButcherKnifeDamageMin = reader.ReadInt(); m_ButcherKnifeDamageMax = reader.ReadInt();
                    m_CleaverDamageMin = reader.ReadInt(); m_CleaverDamageMax = reader.ReadInt();
                    m_DaggerDamageMin = reader.ReadInt(); m_DaggerDamageMax = reader.ReadInt();
                    m_SkinningKnifeDamageMin = reader.ReadInt(); m_SkinningKnifeDamageMax = reader.ReadInt();
                    m_ClubDamageMin = reader.ReadInt(); m_ClubDamageMax = reader.ReadInt();
                    m_HammerPickDamageMin = reader.ReadInt(); m_HammerPickDamageMax = reader.ReadInt();
                    m_MaceDamageMin = reader.ReadInt(); m_MaceDamageMax = reader.ReadInt();
                    m_WarHammerDamageMin = reader.ReadInt(); m_WarHammerDamageMax = reader.ReadInt();
                    m_WarMaceDamageMin = reader.ReadInt(); m_WarMaceDamageMax = reader.ReadInt();
                    m_BardicheDamageMin = reader.ReadInt(); m_BardicheDamageMax = reader.ReadInt();
                    m_HalberdDamageMin = reader.ReadInt(); m_HalberdDamageMax = reader.ReadInt();
                    m_BowDamageMin = reader.ReadInt(); m_BowDamageMax = reader.ReadInt();
                    m_CrossbowDamageMin = reader.ReadInt(); m_CrossbowDamageMax = reader.ReadInt();
                    m_HeavyCrossbowDamageMin = reader.ReadInt(); m_HeavyCrossbowDamageMax = reader.ReadInt();
                    m_PitchforkDamageMin = reader.ReadInt(); m_PitchforkDamageMax = reader.ReadInt();
                    m_ShortSpearDamageMin = reader.ReadInt(); m_ShortSpearDamageMax = reader.ReadInt();
                    m_SpearDamageMin = reader.ReadInt(); m_SpearDamageMax = reader.ReadInt();
                    m_TribalSpearDamageMin = reader.ReadInt(); m_TribalSpearDamageMax = reader.ReadInt();
                    m_WarForkDamageMin = reader.ReadInt(); m_WarForkDamageMax = reader.ReadInt();
                    m_BlackStaffDamageMin = reader.ReadInt(); m_BlackStaffDamageMax = reader.ReadInt();
                    m_GnarledStaffDamageMin = reader.ReadInt(); m_GnarledStaffDamageMax = reader.ReadInt();
                    m_QuarterStaffDamageMin = reader.ReadInt(); m_QuarterStaffDamageMax = reader.ReadInt();
                    m_ShepherdsCrookDamageMin = reader.ReadInt(); m_ShepherdsCrookDamageMax = reader.ReadInt();
                    m_BroadswordDamageMin = reader.ReadInt(); m_BroadswordDamageMax = reader.ReadInt();
                    m_CutlassDamageMin = reader.ReadInt(); m_CutlassDamageMax = reader.ReadInt();
                    m_KatanaDamageMin = reader.ReadInt(); m_KatanaDamageMax = reader.ReadInt();
                    m_KryssDamageMin = reader.ReadInt(); m_KryssDamageMax = reader.ReadInt();
                    m_LongswordDamageMin = reader.ReadInt(); m_LongswordDamageMax = reader.ReadInt();
                    m_ScimitarDamageMin = reader.ReadInt(); m_ScimitarDamageMax = reader.ReadInt();
                    m_VikingSwordDamageMin = reader.ReadInt(); m_VikingSwordDamageMax = reader.ReadInt();

                    m_WeaponDurabilityLossPercentage = reader.ReadDouble();
                    m_WeaponDurabilitySpeedAdjustment = reader.ReadDouble();
                    break;
            }
            m_Instance = this;
        }