Exemplo n.º 1
0
        public bool Equals(CreatureData other)
        {
            if (System.Object.ReferenceEquals(this, other))
            {
                return(true);
            }

            if (((object)this == null) || ((object)other == null))
            {
                return(false);
            }

            return(CreatureType == other.CreatureType &&
                   CombatSkill == other.CombatSkill &&
                   MagicSkill == other.MagicSkill &&
                   StealthSkill == other.StealthSkill &&
                   Health == other.Health &&
                   Unused.SequenceEqual(other.Unused) &&
                   Damage == other.Damage &&
                   Strength == other.Strength &&
                   Perception == other.Perception &&
                   Endurance == other.Endurance &&
                   Charisma == other.Charisma &&
                   Intelligence == other.Intelligence &&
                   Agility == other.Agility &&
                   Luck == other.Luck);
        }
Exemplo n.º 2
0
        public bool Equals(AIData other)
        {
            if (System.Object.ReferenceEquals(this, other))
            {
                return(true);
            }

            if (((object)this == null) || ((object)other == null))
            {
                return(false);
            }

            return(Aggression == other.Aggression &&
                   Confidence == other.Confidence &&
                   EnergyLevel == other.EnergyLevel &&
                   Responsibility == other.Responsibility &&
                   Mood == other.Mood &&
                   Unused.SequenceEqual(other.Unused) &&
                   Services == other.Services &&
                   Teaches == other.Teaches &&
                   MaxTrainingLevel == other.MaxTrainingLevel &&
                   Assistance == other.Assistance &&
                   AggroRadiusBehavior == other.AggroRadiusBehavior &&
                   AggroRadius == other.AggroRadius);
        }
        public bool Equals(CombatStyleSimple other)
        {
            if (System.Object.ReferenceEquals(this, other))
            {
                return(true);
            }

            if (((object)this == null) || ((object)other == null))
            {
                return(false);
            }

            return(CoverSearchRadius == other.CoverSearchRadius &&
                   TakeCoverChance == other.TakeCoverChance &&
                   WaitTimerMin == other.WaitTimerMin &&
                   WaitTimerMax == other.WaitTimerMax &&
                   WaitToFireTimerMin == other.WaitToFireTimerMin &&
                   WaitToFireTimerMax == other.WaitToFireTimerMax &&
                   FireTimerMin == other.FireTimerMin &&
                   FireTimerMax == other.FireTimerMax &&
                   RangedWeaponRangeMultMin == other.RangedWeaponRangeMultMin &&
                   Unused.SequenceEqual(other.Unused) &&
                   WeaponRestrictions == other.WeaponRestrictions &&
                   RangedWeaponRangeMultMax == other.RangedWeaponRangeMultMax &&
                   MaxTargetingFOV == other.MaxTargetingFOV &&
                   CombatRadius == other.CombatRadius &&
                   SemiAutoFiringDelayMultMin == other.SemiAutoFiringDelayMultMin &&
                   SemiAutoFiringDelayMultMax == other.SemiAutoFiringDelayMultMax);
        }
Exemplo n.º 4
0
 private async void OnStart(object state)
 {
     while (true)
     {
         while (mQueue.TryDequeue(out IEventWork item))
         {
             System.Threading.Interlocked.Decrement(ref mCount);
             using (item)
             {
                 try
                 {
                     await item.Execute();
                 }
                 catch (Exception e_)
                 {
                     OnError(e_, item);
                 }
             }
         }
         lock (_workSync)
         {
             if (mQueue.IsEmpty)
             {
                 try
                 {
                     Unused?.Invoke();
                 }
                 catch { }
                 _doingWork = false;
                 return;
             }
         }
     }
 }
Exemplo n.º 5
0
        public int Run(string[] parameters)
        {
            Debug.Listeners.Add(new ConsoleTraceListener());

            if (!this.VerifyParametersSpecified(parameters))
            {
                return(0);
            }

            var assemblyPaths = this.GetFileNames(parameters).ToList();

            if (!this.VerifyAssembliesFound(parameters, assemblyPaths))
            {
                return(0);
            }

            var assemblies = this.LoadAssemblies(assemblyPaths);

            var watch = new Stopwatch();

            watch.Start();
            var statistics = Unused.Statistics(assemblies);

            watch.Stop();

            this.CreateOutputDirectoryIfRequired();

            var format = new PlainTextSummary(outputDirectory);

            format.Write(statistics, watch.Elapsed);

            return(0);
        }
        public bool Equals(MagicEffectData other)
        {
            if (System.Object.ReferenceEquals(this, other))
            {
                return(true);
            }

            if (((object)this == null) || ((object)other == null))
            {
                return(false);
            }

            return(MagicEffectFlags == other.MagicEffectFlags &&
                   BaseCost == other.BaseCost &&
                   AssociatedItem == other.AssociatedItem &&
                   MagicSchool == other.MagicSchool &&
                   ResistanceType == other.ResistanceType &&
                   Unknown == other.Unknown &&
                   Unused.SequenceEqual(other.Unused) &&
                   Light == other.Light &&
                   ProjectileSpeed == other.ProjectileSpeed &&
                   EffectShader == other.EffectShader &&
                   ObjectDisplayShader == other.ObjectDisplayShader &&
                   EffectSound == other.EffectSound &&
                   BoltSound == other.BoltSound &&
                   HitSound == other.HitSound &&
                   AreaSound == other.AreaSound &&
                   ConstantEffectEnchantmentFactor == other.ConstantEffectEnchantmentFactor &&
                   ConstantEffectBarterFactor == other.ConstantEffectBarterFactor &&
                   Archetype == other.Archetype &&
                   ActorValue == other.ActorValue);
        }
Exemplo n.º 7
0
        public bool Equals(RaceData other)
        {
            if (System.Object.ReferenceEquals(this, other))
            {
                return(true);
            }

            if (((object)this == null) || ((object)other == null))
            {
                return(false);
            }

            return(SkillBonus1 == other.SkillBonus1 &&
                   SkillBonus1Amount == other.SkillBonus1Amount &&
                   SkillBonus2 == other.SkillBonus2 &&
                   SkillBonus2Amount == other.SkillBonus2Amount &&
                   SkillBonus3 == other.SkillBonus3 &&
                   SkillBonus3Amount == other.SkillBonus3Amount &&
                   SkillBonus4 == other.SkillBonus4 &&
                   SkillBonus4Amount == other.SkillBonus4Amount &&
                   SkillBonus5 == other.SkillBonus5 &&
                   SkillBonus5Amount == other.SkillBonus5Amount &&
                   SkillBonus6 == other.SkillBonus6 &&
                   SkillBonus6Amount == other.SkillBonus6Amount &&
                   SkillBonus7 == other.SkillBonus7 &&
                   SkillBonus7Amount == other.SkillBonus7Amount &&
                   Unused.SequenceEqual(other.Unused) &&
                   MaleHeight == other.MaleHeight &&
                   FemaleHeight == other.FemaleHeight &&
                   MaleWeight == other.MaleWeight &&
                   FemaleWeight == other.FemaleWeight &&
                   RaceFlags == other.RaceFlags);
        }
Exemplo n.º 8
0
    public void Update()
    {
        // Unity によって割り当てられたメモリ
        Used = (Profiler.GetTotalAllocatedMemoryLong() >> 10) / 1024f;

        // 予約済みだが割り当てられていないメモリ
        Unused = (Profiler.GetTotalUnusedReservedMemoryLong() >> 10) / 1024f;

        // Unity が現在および将来の割り当てのために確保している総メモリ
        Total = (Profiler.GetTotalReservedMemoryLong() >> 10) / 1024f;

        UsedText   = Used.ToString("0.0") + " MB";
        UnusedText = Unused.ToString("0.0") + " MB";
        TotalText  = Total.ToString("0.0") + " MB";

        var sb = new StringBuilder();

        sb.AppendLine("<b>Unity</b>");
        sb.AppendLine();
        sb.AppendLine($"    Used: {UsedText}");
        sb.AppendLine($"    Unused: {UnusedText}");
        sb.AppendLine($"    Total: {TotalText}");

        var text = sb.ToString();

        m_text.text = text;
    }
Exemplo n.º 9
0
        public bool Equals(RegionObject other)
        {
            if (System.Object.ReferenceEquals(this, other))
            {
                return(true);
            }

            if (((object)this == null) || ((object)other == null))
            {
                return(false);
            }

            return(Object == other.Object &&
                   ParentIndex == other.ParentIndex &&
                   Unused.SequenceEqual(other.Unused) &&
                   Density == other.Density &&
                   Clustering == other.Clustering &&
                   MinSlope == other.MinSlope &&
                   MaxSlope == other.MaxSlope &&
                   Flags == other.Flags &&
                   RadiusWithRespectToParent == other.RadiusWithRespectToParent &&
                   Radius == other.Radius &&
                   Unknown1.SequenceEqual(other.Unknown1) &&
                   MaxHeight == other.MaxHeight &&
                   Sink == other.Sink &&
                   SinkVariance == other.SinkVariance &&
                   SizeVariance == other.SizeVariance &&
                   XAngleVariance == other.XAngleVariance &&
                   YAngleVariance == other.YAngleVariance &&
                   ZAngleVariance == other.ZAngleVariance &&
                   Unknown2.SequenceEqual(other.Unknown2));
        }
Exemplo n.º 10
0
        public void Update()
        {
            // Unity によって割り当てられたメモリ
            Used = (Profiler.GetTotalAllocatedMemoryLong() >> 10) / 1024f;

            // 予約済みだが割り当てられていないメモリ
            Unused = (Profiler.GetTotalUnusedReservedMemoryLong() >> 10) / 1024f;

            // Unity が現在および将来の割り当てのために確保している総メモリ
            Total = (Profiler.GetTotalReservedMemoryLong() >> 10) / 1024f;

            UsedText   = Used.ToString("0.0") + " MB";
            UnusedText = Unused.ToString("0.0") + " MB";
            TotalText  = Total.ToString("0.0") + " MB";
        }
Exemplo n.º 11
0
        public bool Equals(QuestData other)
        {
            if (System.Object.ReferenceEquals(this, other))
            {
                return(true);
            }

            if (((object)this == null) || ((object)other == null))
            {
                return(false);
            }

            return(Flags == other.Flags &&
                   Priority == other.Priority &&
                   Unused.SequenceEqual(other.Unused) &&
                   QuestDelay == other.QuestDelay);
        }
Exemplo n.º 12
0
        public bool Equals(AnimationSound other)
        {
            if (System.Object.ReferenceEquals(this, other))
            {
                return(true);
            }

            if (((object)this == null) || ((object)other == null))
            {
                return(false);
            }

            return(Sound == other.Sound &&
                   Chance == other.Chance &&
                   Unused.SequenceEqual(other.Unused) &&
                   Type == other.Type);
        }
Exemplo n.º 13
0
        public bool Equals(LockData other)
        {
            if (System.Object.ReferenceEquals(this, other))
            {
                return(true);
            }

            if (((object)this == null) || ((object)other == null))
            {
                return(false);
            }

            return(Level == other.Level &&
                   Unused.SequenceEqual(other.Unused) &&
                   Key == other.Key &&
                   Flags == other.Flags &&
                   Unknown.SequenceEqual(other.Unknown));
        }
Exemplo n.º 14
0
        public bool Equals(PackageDialogData other)
        {
            if (System.Object.ReferenceEquals(this, other))
            {
                return(true);
            }

            if (((object)this == null) || ((object)other == null))
            {
                return(false);
            }

            return(FOV == other.FOV &&
                   Topic == other.Topic &&
                   Flags == other.Flags &&
                   Unused.SequenceEqual(other.Unused) &&
                   Type == other.Type);
        }
Exemplo n.º 15
0
        public bool Equals(AmmoData other)
        {
            if (System.Object.ReferenceEquals(this, other))
            {
                return(true);
            }

            if (((object)this == null) || ((object)other == null))
            {
                return(false);
            }

            return(Speed == other.Speed &&
                   Flags == other.Flags &&
                   Unused.SequenceEqual(other.Unused) &&
                   Value == other.Value &&
                   ClipRounds == other.ClipRounds);
        }
Exemplo n.º 16
0
        public bool Equals(IngestibleData other)
        {
            if (System.Object.ReferenceEquals(this, other))
            {
                return(true);
            }

            if (((object)this == null) || ((object)other == null))
            {
                return(false);
            }

            return(Value == other.Value &&
                   Flags == other.Flags &&
                   Unused.SequenceEqual(other.Unused) &&
                   WithdrawalEffect == other.WithdrawalEffect &&
                   AddictionChance == other.AddictionChance &&
                   SoundConsume == other.SoundConsume);
        }
Exemplo n.º 17
0
        public bool Equals(ScriptData other)
        {
            if (System.Object.ReferenceEquals(this, other))
            {
                return(true);
            }

            if (((object)this == null) || ((object)other == null))
            {
                return(false);
            }

            return(Unused.SequenceEqual(other.Unused) &&
                   ReferenceCount == other.ReferenceCount &&
                   CompiledSize == other.CompiledSize &&
                   VariableCount == other.VariableCount &&
                   Type == other.Type &&
                   Flags == other.Flags);
        }
Exemplo n.º 18
0
        public bool Equals(BodyPartInfo other)
        {
            if (System.Object.ReferenceEquals(this, other))
            {
                return(true);
            }

            if (((object)this == null) || ((object)other == null))
            {
                return(false);
            }

            return(DamageMultiplier == other.DamageMultiplier &&
                   Flags == other.Flags &&
                   Type == other.Type &&
                   HealthPercent == other.HealthPercent &&
                   ActorValue == other.ActorValue &&
                   ToHitChance == other.ToHitChance &&
                   ExplosionChance == other.ExplosionChance &&
                   ExplosionDebrisCount == other.ExplosionDebrisCount &&
                   ExplosionDebris == other.ExplosionDebris &&
                   Explosion == other.Explosion &&
                   TrackingMaxAngle == other.TrackingMaxAngle &&
                   ExplosionDebrisScale == other.ExplosionDebrisScale &&
                   SeverableDebrisCount == other.SeverableDebrisCount &&
                   SeverableDebris == other.SeverableDebris &&
                   SeverableExplosion == other.SeverableExplosion &&
                   SeverableDebrisScale == other.SeverableDebrisScale &&
                   GoreEffectsTranslateX == other.GoreEffectsTranslateX &&
                   GoreEffectsTranslateY == other.GoreEffectsTranslateY &&
                   GoreEffectsTranslateZ == other.GoreEffectsTranslateZ &&
                   GoreEffectsRotationX == other.GoreEffectsRotationX &&
                   GoreEffectsRotationY == other.GoreEffectsRotationY &&
                   GoreEffectsRotationZ == other.GoreEffectsRotationZ &&
                   SeverableImpactDataSet == other.SeverableImpactDataSet &&
                   ExplosionImpactDataSet == other.ExplosionImpactDataSet &&
                   SeverableDecalCount == other.SeverableDecalCount &&
                   ExplosionDecalCount == other.ExplosionDecalCount &&
                   Unused.SequenceEqual(other.Unused) &&
                   LimbReplacementScale == other.LimbReplacementScale);
        }
Exemplo n.º 19
0
        public void WriteXML(XElement ele, ElderScrollsPlugin master)
        {
            XElement subEle;

            ele.TryPathTo("Flags", true, out subEle);
            subEle.Value = Flags.ToString();

            ele.TryPathTo("Operator", true, out subEle);
            subEle.Value = Operator.ToString();

            ele.TryPathTo("Unused", true, out subEle);
            subEle.Value = Unused.ToHex();

            ele.TryPathTo("ComparisonValue", true, out subEle);
            if (Flags.HasFlag(ConditionFlags.UseGlobal))
            {
                ComparisonValue.WriteXML(subEle, master);
            }
            else
            {
                subEle.Value = ComparisonValue.ToString("G15");
            }
        }
Exemplo n.º 20
0
 public override void WriteData(ESPWriter writer)
 {
     if (EditorID != null)
     {
         EditorID.WriteBinary(writer);
     }
     if (Name != null)
     {
         Name.WriteBinary(writer);
     }
     if (Relationships != null)
     {
         foreach (var item in Relationships)
         {
             item.WriteBinary(writer);
         }
     }
     if (Data != null)
     {
         Data.WriteBinary(writer);
     }
     if (Unused != null)
     {
         Unused.WriteBinary(writer);
     }
     if (Ranks != null)
     {
         foreach (var item in Ranks)
         {
             item.WriteBinary(writer);
         }
     }
     if (Reputation != null)
     {
         Reputation.WriteBinary(writer);
     }
 }
Exemplo n.º 21
0
        public bool Equals(DecalData other)
        {
            if (System.Object.ReferenceEquals(this, other))
            {
                return(true);
            }

            if (((object)this == null) || ((object)other == null))
            {
                return(false);
            }

            return(MinWidth == other.MinWidth &&
                   MaxWidth == other.MaxWidth &&
                   MinHeight == other.MinHeight &&
                   MaxHeight == other.MaxHeight &&
                   Depth == other.Depth &&
                   Shininess == other.Shininess &&
                   ParallaxScale == other.ParallaxScale &&
                   ParallaxPasses == other.ParallaxPasses &&
                   DecalFlags == other.DecalFlags &&
                   Unused.SequenceEqual(other.Unused) &&
                   Color == other.Color);
        }
Exemplo n.º 22
0
        public void WriteXML(XElement ele, ElderScrollsPlugin master)
        {
            XElement subEle;

            ele.TryPathTo("Object", true, out subEle);
            Object.WriteXML(subEle, master);

            ele.TryPathTo("ParentIndex", true, out subEle);
            subEle.Value = ParentIndex.ToString();

            ele.TryPathTo("Unused", true, out subEle);
            subEle.Value = Unused.ToHex();

            ele.TryPathTo("Density", true, out subEle);
            subEle.Value = Density.ToString("G15");

            ele.TryPathTo("Clustering", true, out subEle);
            subEle.Value = Clustering.ToString();

            ele.TryPathTo("Slope/Min", true, out subEle);
            subEle.Value = MinSlope.ToString();

            ele.TryPathTo("Slope/Max", true, out subEle);
            subEle.Value = MaxSlope.ToString();

            ele.TryPathTo("Flags", true, out subEle);
            subEle.Value = Flags.ToString();

            ele.TryPathTo("RadiusWithRespectToParent", true, out subEle);
            subEle.Value = RadiusWithRespectToParent.ToString();

            ele.TryPathTo("Radius", true, out subEle);
            subEle.Value = Radius.ToString();

            ele.TryPathTo("Unknown1", true, out subEle);
            subEle.Value = Unknown1.ToHex();

            ele.TryPathTo("MaxHeight", true, out subEle);
            subEle.Value = MaxHeight.ToString("G15");

            ele.TryPathTo("Sink", true, out subEle);
            subEle.Value = Sink.ToString("G15");

            ele.TryPathTo("SinkVariance", true, out subEle);
            subEle.Value = SinkVariance.ToString("G15");

            ele.TryPathTo("SizeVariance", true, out subEle);
            subEle.Value = SizeVariance.ToString("G15");

            ele.TryPathTo("XAngleVariance", true, out subEle);
            subEle.Value = XAngleVariance.ToString();

            ele.TryPathTo("YAngleVariance", true, out subEle);
            subEle.Value = YAngleVariance.ToString();

            ele.TryPathTo("ZAngleVariance", true, out subEle);
            subEle.Value = ZAngleVariance.ToString();

            ele.TryPathTo("Unknown2", true, out subEle);
            subEle.Value = Unknown2.ToHex();
        }
Exemplo n.º 23
0
        public override void ReadData(ESPReader reader, long dataEnd)
        {
            while (reader.BaseStream.Position < dataEnd)
            {
                string subTag = reader.PeekTag();

                switch (subTag)
                {
                case "EDID":
                    if (EditorID == null)
                    {
                        EditorID = new SimpleSubrecord <String>();
                    }

                    EditorID.ReadBinary(reader);
                    break;

                case "FULL":
                    if (Name == null)
                    {
                        Name = new SimpleSubrecord <String>();
                    }

                    Name.ReadBinary(reader);
                    break;

                case "XNAM":
                    if (Relationships == null)
                    {
                        Relationships = new List <Relationship>();
                    }

                    Relationship tempXNAM = new Relationship();
                    tempXNAM.ReadBinary(reader);
                    Relationships.Add(tempXNAM);
                    break;

                case "DATA":
                    if (Data == null)
                    {
                        Data = new FactionData();
                    }

                    Data.ReadBinary(reader);
                    break;

                case "CNAM":
                    if (Unused == null)
                    {
                        Unused = new SimpleSubrecord <Single>();
                    }

                    Unused.ReadBinary(reader);
                    break;

                case "RNAM":
                    if (Ranks == null)
                    {
                        Ranks = new List <FactionRank>();
                    }

                    FactionRank tempRNAM = new FactionRank();
                    tempRNAM.ReadBinary(reader);
                    Ranks.Add(tempRNAM);
                    break;

                case "WMI1":
                    if (Reputation == null)
                    {
                        Reputation = new RecordReference();
                    }

                    Reputation.ReadBinary(reader);
                    break;

                default:
                    throw new Exception();
                }
            }
        }
Exemplo n.º 24
0
        public override void ReadDataXML(XElement ele, ElderScrollsPlugin master)
        {
            XElement subEle;

            if (ele.TryPathTo("EditorID", false, out subEle))
            {
                if (EditorID == null)
                {
                    EditorID = new SimpleSubrecord <String>();
                }

                EditorID.ReadXML(subEle, master);
            }
            if (ele.TryPathTo("Name", false, out subEle))
            {
                if (Name == null)
                {
                    Name = new SimpleSubrecord <String>();
                }

                Name.ReadXML(subEle, master);
            }
            if (ele.TryPathTo("Relationships", false, out subEle))
            {
                if (Relationships == null)
                {
                    Relationships = new List <Relationship>();
                }

                foreach (XElement e in subEle.Elements())
                {
                    Relationship tempXNAM = new Relationship();
                    tempXNAM.ReadXML(e, master);
                    Relationships.Add(tempXNAM);
                }
            }
            if (ele.TryPathTo("Data", false, out subEle))
            {
                if (Data == null)
                {
                    Data = new FactionData();
                }

                Data.ReadXML(subEle, master);
            }
            if (ele.TryPathTo("Unused", false, out subEle))
            {
                if (Unused == null)
                {
                    Unused = new SimpleSubrecord <Single>();
                }

                Unused.ReadXML(subEle, master);
            }
            if (ele.TryPathTo("Ranks", false, out subEle))
            {
                if (Ranks == null)
                {
                    Ranks = new List <FactionRank>();
                }

                foreach (XElement e in subEle.Elements())
                {
                    FactionRank tempRNAM = new FactionRank();
                    tempRNAM.ReadXML(e, master);
                    Ranks.Add(tempRNAM);
                }
            }
            if (ele.TryPathTo("Reputation", false, out subEle))
            {
                if (Reputation == null)
                {
                    Reputation = new RecordReference();
                }

                Reputation.ReadXML(subEle, master);
            }
        }
Exemplo n.º 25
0
        public override void WriteDataXML(XElement ele, ElderScrollsPlugin master)
        {
            XElement subEle;

            if (EditorID != null)
            {
                ele.TryPathTo("EditorID", true, out subEle);
                EditorID.WriteXML(subEle, master);
            }
            if (Name != null)
            {
                ele.TryPathTo("Name", true, out subEle);
                Name.WriteXML(subEle, master);
            }
            if (Relationships != null)
            {
                ele.TryPathTo("Relationships", true, out subEle);
                List <string> xmlNames = new List <string> {
                    "Relationship"
                };
                int i = 0;
                foreach (var entry in Relationships)
                {
                    i = i % xmlNames.Count();
                    XElement newEle = new XElement(xmlNames[i]);
                    entry.WriteXML(newEle, master);
                    subEle.Add(newEle);
                    i++;
                }
            }
            if (Data != null)
            {
                ele.TryPathTo("Data", true, out subEle);
                Data.WriteXML(subEle, master);
            }
            if (Unused != null)
            {
                ele.TryPathTo("Unused", true, out subEle);
                Unused.WriteXML(subEle, master);
            }
            if (Ranks != null)
            {
                ele.TryPathTo("Ranks", true, out subEle);
                List <string> xmlNames = new List <string> {
                    "Rank"
                };
                int i = 0;
                foreach (var entry in Ranks)
                {
                    i = i % xmlNames.Count();
                    XElement newEle = new XElement(xmlNames[i]);
                    entry.WriteXML(newEle, master);
                    subEle.Add(newEle);
                    i++;
                }
            }
            if (Reputation != null)
            {
                ele.TryPathTo("Reputation", true, out subEle);
                Reputation.WriteXML(subEle, master);
            }
        }
Exemplo n.º 26
0
        public override void ReadDataXML(XElement ele, ElderScrollsPlugin master)
        {
            XElement subEle;

            if (ele.TryPathTo("EditorID", false, out subEle))
            {
                if (EditorID == null)
                {
                    EditorID = new SimpleSubrecord <String>();
                }

                EditorID.ReadXML(subEle, master);
            }
            if (ele.TryPathTo("ImageSpaceModifier/Sunrise", false, out subEle))
            {
                if (ImageSpaceModifierSunrise == null)
                {
                    ImageSpaceModifierSunrise = new RecordReference();
                }

                ImageSpaceModifierSunrise.ReadXML(subEle, master);
            }
            if (ele.TryPathTo("ImageSpaceModifier/Day", false, out subEle))
            {
                if (ImageSpaceModifierDay == null)
                {
                    ImageSpaceModifierDay = new RecordReference();
                }

                ImageSpaceModifierDay.ReadXML(subEle, master);
            }
            if (ele.TryPathTo("ImageSpaceModifier/Sunset", false, out subEle))
            {
                if (ImageSpaceModifierSunset == null)
                {
                    ImageSpaceModifierSunset = new RecordReference();
                }

                ImageSpaceModifierSunset.ReadXML(subEle, master);
            }
            if (ele.TryPathTo("ImageSpaceModifier/Night", false, out subEle))
            {
                if (ImageSpaceModifierNight == null)
                {
                    ImageSpaceModifierNight = new RecordReference();
                }

                ImageSpaceModifierNight.ReadXML(subEle, master);
            }
            if (ele.TryPathTo("ImageSpaceModifier/HighNoon", false, out subEle))
            {
                if (ImageSpaceModifierHighNoon == null)
                {
                    ImageSpaceModifierHighNoon = new RecordReference();
                }

                ImageSpaceModifierHighNoon.ReadXML(subEle, master);
            }
            if (ele.TryPathTo("ImageSpaceModifier/Midnight", false, out subEle))
            {
                if (ImageSpaceModifierMidnight == null)
                {
                    ImageSpaceModifierMidnight = new RecordReference();
                }

                ImageSpaceModifierMidnight.ReadXML(subEle, master);
            }
            if (ele.TryPathTo("CloudTexture/Layer0", false, out subEle))
            {
                if (CloudTextureLayer0 == null)
                {
                    CloudTextureLayer0 = new SimpleSubrecord <String>();
                }

                CloudTextureLayer0.ReadXML(subEle, master);
            }
            if (ele.TryPathTo("CloudTexture/Layer1", false, out subEle))
            {
                if (CloudTextureLayer1 == null)
                {
                    CloudTextureLayer1 = new SimpleSubrecord <String>();
                }

                CloudTextureLayer1.ReadXML(subEle, master);
            }
            if (ele.TryPathTo("CloudTexture/Layer2", false, out subEle))
            {
                if (CloudTextureLayer2 == null)
                {
                    CloudTextureLayer2 = new SimpleSubrecord <String>();
                }

                CloudTextureLayer2.ReadXML(subEle, master);
            }
            if (ele.TryPathTo("CloudTexture/Layer3", false, out subEle))
            {
                if (CloudTextureLayer3 == null)
                {
                    CloudTextureLayer3 = new SimpleSubrecord <String>();
                }

                CloudTextureLayer3.ReadXML(subEle, master);
            }
            if (ele.TryPathTo("Model", false, out subEle))
            {
                if (Model == null)
                {
                    Model = new Model();
                }

                Model.ReadXML(subEle, master);
            }
            if (ele.TryPathTo("Unknown", false, out subEle))
            {
                if (Unknown == null)
                {
                    Unknown = new SimpleSubrecord <Byte[]>();
                }

                Unknown.ReadXML(subEle, master);
            }
            if (ele.TryPathTo("CloudLayerSpeed", false, out subEle))
            {
                if (CloudLayerSpeed == null)
                {
                    CloudLayerSpeed = new CloudLayerSpeed();
                }

                CloudLayerSpeed.ReadXML(subEle, master);
            }
            if (ele.TryPathTo("CloudLayerColors", false, out subEle))
            {
                if (CloudLayerColors == null)
                {
                    CloudLayerColors = new CloudLayerColors();
                }

                CloudLayerColors.ReadXML(subEle, master);
            }
            if (ele.TryPathTo("EnvironmentalColors", false, out subEle))
            {
                if (EnvironmentalColors == null)
                {
                    EnvironmentalColors = new EnvironmentalColors();
                }

                EnvironmentalColors.ReadXML(subEle, master);
            }
            if (ele.TryPathTo("WeatherFogDistance", false, out subEle))
            {
                if (WeatherFogDistance == null)
                {
                    WeatherFogDistance = new WeatherFogDistance();
                }

                WeatherFogDistance.ReadXML(subEle, master);
            }
            if (ele.TryPathTo("Unused", false, out subEle))
            {
                if (Unused == null)
                {
                    Unused = new SimpleSubrecord <Byte[]>();
                }

                Unused.ReadXML(subEle, master);
            }
            if (ele.TryPathTo("Data", false, out subEle))
            {
                if (Data == null)
                {
                    Data = new WeatherData();
                }

                Data.ReadXML(subEle, master);
            }
            if (ele.TryPathTo("Sounds", false, out subEle))
            {
                if (Sounds == null)
                {
                    Sounds = new List <WeatherSound>();
                }

                foreach (XElement e in subEle.Elements())
                {
                    WeatherSound tempSNAM = new WeatherSound();
                    tempSNAM.ReadXML(e, master);
                    Sounds.Add(tempSNAM);
                }
            }
        }
Exemplo n.º 27
0
        public override void WriteDataXML(XElement ele, ElderScrollsPlugin master)
        {
            XElement subEle;

            if (EditorID != null)
            {
                ele.TryPathTo("EditorID", true, out subEle);
                EditorID.WriteXML(subEle, master);
            }
            if (ImageSpaceModifierSunrise != null)
            {
                ele.TryPathTo("ImageSpaceModifier/Sunrise", true, out subEle);
                ImageSpaceModifierSunrise.WriteXML(subEle, master);
            }
            if (ImageSpaceModifierDay != null)
            {
                ele.TryPathTo("ImageSpaceModifier/Day", true, out subEle);
                ImageSpaceModifierDay.WriteXML(subEle, master);
            }
            if (ImageSpaceModifierSunset != null)
            {
                ele.TryPathTo("ImageSpaceModifier/Sunset", true, out subEle);
                ImageSpaceModifierSunset.WriteXML(subEle, master);
            }
            if (ImageSpaceModifierNight != null)
            {
                ele.TryPathTo("ImageSpaceModifier/Night", true, out subEle);
                ImageSpaceModifierNight.WriteXML(subEle, master);
            }
            if (ImageSpaceModifierHighNoon != null)
            {
                ele.TryPathTo("ImageSpaceModifier/HighNoon", true, out subEle);
                ImageSpaceModifierHighNoon.WriteXML(subEle, master);
            }
            if (ImageSpaceModifierMidnight != null)
            {
                ele.TryPathTo("ImageSpaceModifier/Midnight", true, out subEle);
                ImageSpaceModifierMidnight.WriteXML(subEle, master);
            }
            if (CloudTextureLayer0 != null)
            {
                ele.TryPathTo("CloudTexture/Layer0", true, out subEle);
                CloudTextureLayer0.WriteXML(subEle, master);
            }
            if (CloudTextureLayer1 != null)
            {
                ele.TryPathTo("CloudTexture/Layer1", true, out subEle);
                CloudTextureLayer1.WriteXML(subEle, master);
            }
            if (CloudTextureLayer2 != null)
            {
                ele.TryPathTo("CloudTexture/Layer2", true, out subEle);
                CloudTextureLayer2.WriteXML(subEle, master);
            }
            if (CloudTextureLayer3 != null)
            {
                ele.TryPathTo("CloudTexture/Layer3", true, out subEle);
                CloudTextureLayer3.WriteXML(subEle, master);
            }
            if (Model != null)
            {
                ele.TryPathTo("Model", true, out subEle);
                Model.WriteXML(subEle, master);
            }
            if (Unknown != null)
            {
                ele.TryPathTo("Unknown", true, out subEle);
                Unknown.WriteXML(subEle, master);
            }
            if (CloudLayerSpeed != null)
            {
                ele.TryPathTo("CloudLayerSpeed", true, out subEle);
                CloudLayerSpeed.WriteXML(subEle, master);
            }
            if (CloudLayerColors != null)
            {
                ele.TryPathTo("CloudLayerColors", true, out subEle);
                CloudLayerColors.WriteXML(subEle, master);
            }
            if (EnvironmentalColors != null)
            {
                ele.TryPathTo("EnvironmentalColors", true, out subEle);
                EnvironmentalColors.WriteXML(subEle, master);
            }
            if (WeatherFogDistance != null)
            {
                ele.TryPathTo("WeatherFogDistance", true, out subEle);
                WeatherFogDistance.WriteXML(subEle, master);
            }
            if (Unused != null)
            {
                ele.TryPathTo("Unused", true, out subEle);
                Unused.WriteXML(subEle, master);
            }
            if (Data != null)
            {
                ele.TryPathTo("Data", true, out subEle);
                Data.WriteXML(subEle, master);
            }
            if (Sounds != null)
            {
                ele.TryPathTo("Sounds", true, out subEle);
                List <string> xmlNames = new List <string> {
                    "Sound"
                };
                int i = 0;
                foreach (var entry in Sounds)
                {
                    i = i % xmlNames.Count();
                    XElement newEle = new XElement(xmlNames[i]);
                    entry.WriteXML(newEle, master);
                    subEle.Add(newEle);
                    i++;
                }
            }
        }
Exemplo n.º 28
0
 public override void WriteData(ESPWriter writer)
 {
     if (EditorID != null)
     {
         EditorID.WriteBinary(writer);
     }
     if (ImageSpaceModifierSunrise != null)
     {
         ImageSpaceModifierSunrise.WriteBinary(writer);
     }
     if (ImageSpaceModifierDay != null)
     {
         ImageSpaceModifierDay.WriteBinary(writer);
     }
     if (ImageSpaceModifierSunset != null)
     {
         ImageSpaceModifierSunset.WriteBinary(writer);
     }
     if (ImageSpaceModifierNight != null)
     {
         ImageSpaceModifierNight.WriteBinary(writer);
     }
     if (ImageSpaceModifierHighNoon != null)
     {
         ImageSpaceModifierHighNoon.WriteBinary(writer);
     }
     if (ImageSpaceModifierMidnight != null)
     {
         ImageSpaceModifierMidnight.WriteBinary(writer);
     }
     if (CloudTextureLayer0 != null)
     {
         CloudTextureLayer0.WriteBinary(writer);
     }
     if (CloudTextureLayer1 != null)
     {
         CloudTextureLayer1.WriteBinary(writer);
     }
     if (CloudTextureLayer2 != null)
     {
         CloudTextureLayer2.WriteBinary(writer);
     }
     if (CloudTextureLayer3 != null)
     {
         CloudTextureLayer3.WriteBinary(writer);
     }
     if (Model != null)
     {
         Model.WriteBinary(writer);
     }
     if (Unknown != null)
     {
         Unknown.WriteBinary(writer);
     }
     if (CloudLayerSpeed != null)
     {
         CloudLayerSpeed.WriteBinary(writer);
     }
     if (CloudLayerColors != null)
     {
         CloudLayerColors.WriteBinary(writer);
     }
     if (EnvironmentalColors != null)
     {
         EnvironmentalColors.WriteBinary(writer);
     }
     if (WeatherFogDistance != null)
     {
         WeatherFogDistance.WriteBinary(writer);
     }
     if (Unused != null)
     {
         Unused.WriteBinary(writer);
     }
     if (Data != null)
     {
         Data.WriteBinary(writer);
     }
     if (Sounds != null)
     {
         foreach (var item in Sounds)
         {
             item.WriteBinary(writer);
         }
     }
 }
Exemplo n.º 29
0
        public override void ReadData(ESPReader reader, long dataEnd)
        {
            while (reader.BaseStream.Position < dataEnd)
            {
                string subTag = reader.PeekTag();

                switch (subTag)
                {
                case "EDID":
                    if (EditorID == null)
                    {
                        EditorID = new SimpleSubrecord <String>();
                    }

                    EditorID.ReadBinary(reader);
                    break;

                case "aIAD":
                    if (ImageSpaceModifierSunrise == null)
                    {
                        ImageSpaceModifierSunrise = new RecordReference();
                    }

                    ImageSpaceModifierSunrise.ReadBinary(reader);
                    break;

                case "bIAD":
                    if (ImageSpaceModifierDay == null)
                    {
                        ImageSpaceModifierDay = new RecordReference();
                    }

                    ImageSpaceModifierDay.ReadBinary(reader);
                    break;

                case "cIAD":
                    if (ImageSpaceModifierSunset == null)
                    {
                        ImageSpaceModifierSunset = new RecordReference();
                    }

                    ImageSpaceModifierSunset.ReadBinary(reader);
                    break;

                case "dIAD":
                    if (ImageSpaceModifierNight == null)
                    {
                        ImageSpaceModifierNight = new RecordReference();
                    }

                    ImageSpaceModifierNight.ReadBinary(reader);
                    break;

                case "eIAD":
                    if (ImageSpaceModifierHighNoon == null)
                    {
                        ImageSpaceModifierHighNoon = new RecordReference();
                    }

                    ImageSpaceModifierHighNoon.ReadBinary(reader);
                    break;

                case "fIAD":
                    if (ImageSpaceModifierMidnight == null)
                    {
                        ImageSpaceModifierMidnight = new RecordReference();
                    }

                    ImageSpaceModifierMidnight.ReadBinary(reader);
                    break;

                case "DNAM":
                    if (CloudTextureLayer0 == null)
                    {
                        CloudTextureLayer0 = new SimpleSubrecord <String>();
                    }

                    CloudTextureLayer0.ReadBinary(reader);
                    break;

                case "CNAM":
                    if (CloudTextureLayer1 == null)
                    {
                        CloudTextureLayer1 = new SimpleSubrecord <String>();
                    }

                    CloudTextureLayer1.ReadBinary(reader);
                    break;

                case "ANAM":
                    if (CloudTextureLayer2 == null)
                    {
                        CloudTextureLayer2 = new SimpleSubrecord <String>();
                    }

                    CloudTextureLayer2.ReadBinary(reader);
                    break;

                case "BNAM":
                    if (CloudTextureLayer3 == null)
                    {
                        CloudTextureLayer3 = new SimpleSubrecord <String>();
                    }

                    CloudTextureLayer3.ReadBinary(reader);
                    break;

                case "MODL":
                    if (Model == null)
                    {
                        Model = new Model();
                    }

                    Model.ReadBinary(reader);
                    break;

                case "LNAM":
                    if (Unknown == null)
                    {
                        Unknown = new SimpleSubrecord <Byte[]>();
                    }

                    Unknown.ReadBinary(reader);
                    break;

                case "ONAM":
                    if (CloudLayerSpeed == null)
                    {
                        CloudLayerSpeed = new CloudLayerSpeed();
                    }

                    CloudLayerSpeed.ReadBinary(reader);
                    break;

                case "PNAM":
                    if (CloudLayerColors == null)
                    {
                        CloudLayerColors = new CloudLayerColors();
                    }

                    CloudLayerColors.ReadBinary(reader);
                    break;

                case "NAM0":
                    if (EnvironmentalColors == null)
                    {
                        EnvironmentalColors = new EnvironmentalColors();
                    }

                    EnvironmentalColors.ReadBinary(reader);
                    break;

                case "FNAM":
                    if (WeatherFogDistance == null)
                    {
                        WeatherFogDistance = new WeatherFogDistance();
                    }

                    WeatherFogDistance.ReadBinary(reader);
                    break;

                case "INAM":
                    if (Unused == null)
                    {
                        Unused = new SimpleSubrecord <Byte[]>();
                    }

                    Unused.ReadBinary(reader);
                    break;

                case "DATA":
                    if (Data == null)
                    {
                        Data = new WeatherData();
                    }

                    Data.ReadBinary(reader);
                    break;

                case "SNAM":
                    if (Sounds == null)
                    {
                        Sounds = new List <WeatherSound>();
                    }

                    WeatherSound tempSNAM = new WeatherSound();
                    tempSNAM.ReadBinary(reader);
                    Sounds.Add(tempSNAM);
                    break;

                default:
                    throw new Exception();
                }
            }
        }
Exemplo n.º 30
0
        public PacketHandlers()
        {
            setPacketSizes();
            PacketHandler temp;

            temp = new ActionButton();
            handlers.Add(PacketId.CLOSE, temp); //Close
            handlers.Add(PacketId.ACTIONBUTTON, temp); //Actionbutton #1
            handlers.Add(PacketId.ACTIONBUTTON2, temp); //Actionbutton #2
            handlers.Add(PacketId.ACTIONBUTTON3, temp); //Actionbutton #3

            temp = new ClientAction();
            handlers.Add(PacketId.IDLE, temp); //Idle
            handlers.Add(PacketId.MOVE_CAMERA, temp); //Move camera
            handlers.Add(PacketId.PING, temp); //Ping
            handlers.Add(PacketId.FOCUS, temp); //Window focus
            handlers.Add(PacketId.CLICK_MOUSE, temp); //Mouse
            handlers.Add(PacketId.WINDOW_TYPE, temp); //Window type
            handlers.Add(PacketId.SOUND_SETTINGS, temp); //Toggle sound (sounds)

            temp = new Command();
            handlers.Add(PacketId.COMMAND, temp); //Commands

            temp = new Communication();
            handlers.Add(PacketId.ADD_FRIEND, temp); //Add friend
            handlers.Add(PacketId.DELETE_FRIEND, temp); //Delete friend
            handlers.Add(PacketId.ADD_IGNORE, temp); //Add ignore
            handlers.Add(PacketId.DELETE_IGNORE, temp); //Delete ignore
            handlers.Add(PacketId.SEND_PM, temp); //Send PM
            handlers.Add(PacketId.CLAN_RANKS, temp); //Set clan ranks
            handlers.Add(PacketId.CLAN_CHAT, temp); //Join clan chat
            handlers.Add(PacketId.PUBLIC, temp); //Public chat
            handlers.Add(PacketId.CLAN_KICK, temp); //Clan chat kick
            handlers.Add(PacketId.PRIVACY_SETTINGS, temp); //public/private/trade chat settings

            temp = new Walk();
            handlers.Add(PacketId.WALK_1, temp); //Walk
            handlers.Add(PacketId.WALK_2, temp); //Walk
            handlers.Add(PacketId.WALK_3, temp); //Walk

            temp = new PlayerInteract();
            handlers.Add(PacketId.ATTACK_PLAYER, temp); //Attack
            handlers.Add(PacketId.FOLLOW, temp); //Follow
            handlers.Add(PacketId.TRADE, temp); //Trade
            handlers.Add(PacketId.MAGIC_ON_PLAYER, temp); //Magic on player

            temp = new NPCInteract();
            handlers.Add(PacketId.NPC_FIRST_CLICK, temp); //Attack
            handlers.Add(PacketId.NPC_SECOND_CLICK, temp); //Second click
            handlers.Add(PacketId.NPC_THIRD_CLICK, temp); //Third click
            handlers.Add(PacketId.NPC_FOURTH_CLICK, temp); //Fourth click
            handlers.Add(PacketId.NPC_FIFTH_CLICK, temp); //Fifth click
            handlers.Add(PacketId.NPC_EXAMINE, temp); //Examine Npc
            handlers.Add(PacketId.MAGIC_ON_NPC, temp); //Magic on NPC
            handlers.Add(PacketId.ITEM_ON_NPC, temp); //Item on NPC

            temp = new ObjectInteract();
            handlers.Add(PacketId.OBJECT_FIRST_CLICK, temp); //First click
            handlers.Add(PacketId.OBJECT_SECOND_CLICK, temp); //Second click
            handlers.Add(PacketId.OBJECT_THIRD_CLICK, temp); //Third click
            handlers.Add(PacketId.OBJECT_FOURTH_CLICK, temp); //Fourth click
            handlers.Add(PacketId.OBJECT_EXAMINE, temp); //object examine

            temp = new ItemInteract();
            handlers.Add(PacketId.EQUIP, temp); //Equip item
            handlers.Add(PacketId.ITEM_ON_ITEM, temp); //Item used on item
            handlers.Add(PacketId.INV_CLICK, temp); //Inventory click item
            handlers.Add(PacketId.ITEM_ON_OBJECT, temp); //Item used on object
            handlers.Add(PacketId.ITEM_ON_GROUND_ITEM, temp); //Item used on ground item.
            handlers.Add(PacketId.INV_OPERATE, temp); //Operate option
            handlers.Add(PacketId.INV_DROP, temp); //Drop item
            handlers.Add(PacketId.PICKUP, temp); //Pick up item
            handlers.Add(PacketId.INV_SWAP_SLOT, temp); //Swap item slot 1
            handlers.Add(PacketId.INV_SWAP_SLOT2, temp); //Swap item slot 2
            handlers.Add(PacketId.INV_RIGHT_CLICK_OPTION1, temp); //Right click option 1
            handlers.Add(PacketId.INV_RIGHT_CLICK_OPTION2, temp); //Right click option 2
            handlers.Add(PacketId.INV_EXAMINE_ITEM, temp); //Inventory item examine

            temp = new InterfaceOptions();
            handlers.Add(PacketId.ENTER_AMOUNT, temp); //Enter amount
            handlers.Add(PacketId.ENTER_TEXT, temp); // Enter text
            handlers.Add(PacketId.INTERFACE_CLICK_1, temp); //Option 1
            handlers.Add(PacketId.INTERFACE_CLICK_2, temp); //Option 2
            handlers.Add(PacketId.INTERFACE_CLICK_3, temp); //Option 3
            handlers.Add(PacketId.INTERFACE_CLICK_4, temp); //Option 4
            handlers.Add(PacketId.INTERFACE_CLICK_5, temp); //Option 5
            handlers.Add(PacketId.INTERFACE_CLICK_6, temp); //Option 6
            handlers.Add(PacketId.INTERFACE_CLICK_7, temp); //Option 7
            handlers.Add(PacketId.INTERFACE_CLICK_8, temp); //Option 8
            handlers.Add(PacketId.INTERFACE_CLICK_9, temp); //Option 9
            handlers.Add(PacketId.INTERFACE_CLICK_10, temp); //Option 9
            handlers.Add(PacketId.GE_SEARCH, temp); //Grand exchange search

            temp = new Unused();
            handlers.Add(PacketId.REIGON_LOADING, temp); //Region loading, varied size
            handlers.Add(PacketId.PACKET_COUNT, temp); //Sent after any click which increases 'count' in getPackets
            handlers.Add(PacketId.CLIENT_VARIABLE_30, temp); //Sent if a client variable is 30..unknown
            handlers.Add(PacketId.DODGY_PACKET, temp); //Caused by a dodgy packet

            Console.WriteLine("Binded packetHandlers");
        }
Exemplo n.º 31
0
 public HashSet <IMemberData> FindSources(IEnumerable <IAssemblyData> assemblies)
 {
     return(Unused.Members(assemblies));
 }