示例#1
0
        public override void Convert(byte[] rawData)
        {
            var entry = new SpellSummonEntry
            {
                Id                = (SummonType)rawData.GetInt32(0),
                Group             = (SummonGroup)rawData.GetInt32(1),
                FactionTemplateId = (FactionTemplateId)rawData.GetInt32(2),
                Type              = (SummonPropertyType)rawData.GetInt32(3),
                Slot              = rawData.GetUInt32(4),
                Flags             = (SummonFlags)rawData.GetInt32(5)
            };

            SpellHandler.SummonEntries[entry.Id] = entry;
        }
        public override void Convert(byte[] rawData)
        {
            SpellSummonEntry spellSummonEntry = new SpellSummonEntry()
            {
                Id                = (SummonType)rawData.GetInt32(0U),
                Group             = (SummonGroup)rawData.GetInt32(1U),
                FactionTemplateId = (FactionTemplateId)rawData.GetInt32(2U),
                Type              = (SummonPropertyType)rawData.GetInt32(3U),
                Slot              = rawData.GetUInt32(4U),
                Flags             = (SummonFlags)rawData.GetInt32(5U)
            };

            SpellHandler.SummonEntries[spellSummonEntry.Id] = spellSummonEntry;
        }
示例#3
0
		public override void Convert(byte[] rawData)
		{
			var entry = new SpellSummonEntry
			{
				Id = (SummonType)rawData.GetInt32(0),
				Group = (SummonGroup)rawData.GetInt32(1),
				FactionTemplateId = (FactionTemplateId)rawData.GetInt32(2),
				Type = (SummonPropertyType)rawData.GetInt32(3),
				Slot = rawData.GetUInt32(4),
				Flags = (SummonFlags)rawData.GetInt32(5)
			};

			SpellHandler.SummonEntries[entry.Id] = entry;
		}
示例#4
0
        public void DumpInfo(TextWriter writer, string indent)
        {
            writer.WriteLine(indent + "Effect: " + this);
            indent += "\t";
            if (ImplicitTargetA != ImplicitSpellTargetType.None)
            {
                writer.WriteLine(indent + "ImplicitTargetA: {0}", ImplicitTargetA);
            }
            if (ImplicitTargetB != ImplicitSpellTargetType.None)
            {
                writer.WriteLine(indent + "ImplicitTargetB: {0}", ImplicitTargetB);
            }
            if (MiscValue != 0 || MiscValueType != null)
            {
                writer.WriteLine(indent + "MiscValue: " + GetMiscStr(MiscValueType, MiscValue));
            }
            if (MiscValueB != 0)
            {
                writer.WriteLine(indent + "MiscValueB: " + GetMiscStr(MiscValueBType, MiscValueB));
            }
            HashSet <SpellLine> affectedLines = AffectedLines;

            if (affectedLines.Count > 0)
            {
                writer.WriteLine(indent + "Affects: {0}", affectedLines.ToString(", "));
            }
            else if (AffectMask[0] != 0U || AffectMask[1] != 0U || AffectMask[2] != 0U)
            {
                writer.WriteLine(indent + "Affects: <Nothing> ({0}{1}{2})", AffectMask[0].ToString("X8"),
                                 AffectMask[1].ToString("X8"), AffectMask[2].ToString("X8"));
            }
            if (BasePoints != 0)
            {
                writer.WriteLine(indent + "BasePoints: {0}", BasePoints);
            }
            if (DiceSides != 0)
            {
                writer.WriteLine(indent + "DiceSides: {0}", DiceSides);
            }
            if (Amplitude != 0)
            {
                writer.WriteLine(indent + "Amplitude: {0}", Amplitude);
            }
            if (ChainTargets != 0)
            {
                writer.WriteLine(indent + "ChainTarget: {0}", ChainTargets);
            }
            if (ItemId != 0U)
            {
                writer.WriteLine(indent + "ItemId: {0} ({1})", (Asda2ItemId)ItemId,
                                 ItemId);
            }
            if (PointsPerComboPoint != 0.0)
            {
                writer.WriteLine(indent + "PointsPerComboPoint: {0}", PointsPerComboPoint);
            }
            if (ProcValue != 0.0)
            {
                writer.WriteLine(indent + "ProcValue: {0}", ProcValue);
            }
            if (Radius != 0.0)
            {
                writer.WriteLine(indent + "Radius: {0}", Radius);
            }
            if (RealPointsPerLevel != 0.0)
            {
                writer.WriteLine(indent + "RealPointsPerLevel: {0}", RealPointsPerLevel);
            }
            if (Mechanic != SpellMechanic.None)
            {
                writer.WriteLine(indent + "Mechanic: {0}", Mechanic);
            }
            if (TriggerSpellId != SpellId.None)
            {
                writer.WriteLine(indent + "Triggers: {0} ({1})", TriggerSpellId,
                                 TriggerSpellId);
            }
            SpellSummonEntry summonEntry = SummonEntry;

            if (summonEntry == null)
            {
                return;
            }
            writer.WriteLine(indent + "Summon information:");
            indent += "\t";
            writer.WriteLine(indent + "Summon ID: {0}", summonEntry.Id);
            if (summonEntry.Group != SummonGroup.Wild)
            {
                writer.WriteLine(indent + "Summon Group: {0}", summonEntry.Group);
            }
            if (summonEntry.FactionTemplateId != FactionTemplateId.None)
            {
                writer.WriteLine(indent + "Summon Faction: {0}", summonEntry.FactionTemplateId);
            }
            if (summonEntry.Type != SummonPropertyType.None)
            {
                writer.WriteLine(indent + "Summon Type: {0}", summonEntry.Type);
            }
            if (summonEntry.Flags != SummonFlags.None)
            {
                writer.WriteLine(indent + "Summon Flags: {0}", summonEntry.Flags);
            }
            if (summonEntry.Slot == 0U)
            {
                return;
            }
            writer.WriteLine(indent + "Summon Slot: {0}", summonEntry.Slot);
        }