示例#1
0
 public void Write(IndentTextWriter writer)
 {
     writer.WriteLine((object)this);
     ++writer.IndentLevel;
     writer.WriteLine("MapId: " + (object)this.MapId);
     writer.WriteLine("Position: " + (object)this.Position);
     writer.WriteLineNotDefault <float>(this.Radius, "Radius: " + (object)this.Radius);
     writer.WriteLineNotDefault <float>(
         (float)((double)this.BoxLength + (double)this.BoxWidth + (double)this.BoxHeight +
                 (double)this.BoxYaw),
         "Box Length: " + (object)this.BoxLength + ", Width: " + (object)this.BoxWidth + ", Height: " +
         (object)this.BoxHeight + ", Yaw: " + (object)this.BoxYaw);
     if (this.Template != null)
     {
         this.Template.Write(writer);
     }
     --writer.IndentLevel;
 }
示例#2
0
 public void Write(IndentTextWriter writer)
 {
     writer.WriteLine(this);
     writer.IndentLevel++;
     writer.WriteLine("MapId: " + MapId);
     writer.WriteLine("Position: " + Position);
     writer.WriteLineNotDefault(Radius, "Radius: " + Radius);
     writer.WriteLineNotDefault(BoxLength + BoxWidth + BoxHeight + BoxYaw,
                                "Box Length: " + BoxLength +
                                ", Width: " + BoxWidth +
                                ", Height: " + BoxHeight +
                                ", Yaw: " + BoxYaw);
     if (Template != null)
     {
         Template.Write(writer);
     }
     writer.IndentLevel--;
 }
示例#3
0
 public void Write(IndentTextWriter writer)
 {
     writer.WriteLine("Type: " + Type);
     writer.WriteLineNotDefault(RequiredItemId, "RequiredItemId: " + RequiredItemId);
     writer.WriteLineNotDefault(RequiredItem2Id, "RequiredItem2Id: " + RequiredItem2Id);
     writer.WriteLineNotDefault(RequiredHeroicKeyId, "RequiredHeroicKeyId: " + RequiredHeroicKeyId);
     writer.WriteLineNotDefault(RequiredHeroicKey2Id, "RequiredHeroicKey2Id: " + RequiredHeroicKey2Id);
     writer.WriteLineNotDefault(RequiredQuestId, "RequiredQuestId: " + RequiredQuestId);
     writer.WriteLineNotDefault(RequiredLevel, "RequiredLevel: " + RequiredLevel);
     writer.WriteLineNotDefault(RequiredHeroicKeyId, "RequiredHeroicKeyId: " + RequiredHeroicKeyId);
     writer.WriteLineNotDefault(RequiredHeroicKeyId, "RequiredHeroicKeyId: " + RequiredHeroicKeyId);
 }
示例#4
0
 public void Write(IndentTextWriter writer)
 {
     writer.WriteLine("Type: " + (object)this.Type);
     writer.WriteLineNotDefault <Asda2ItemId>(this.RequiredItemId,
                                              "RequiredItemId: " + (object)this.RequiredItemId);
     writer.WriteLineNotDefault <Asda2ItemId>(this.RequiredItem2Id,
                                              "RequiredItem2Id: " + (object)this.RequiredItem2Id);
     writer.WriteLineNotDefault <Asda2ItemId>(this.RequiredHeroicKeyId,
                                              "RequiredHeroicKeyId: " + (object)this.RequiredHeroicKeyId);
     writer.WriteLineNotDefault <Asda2ItemId>(this.RequiredHeroicKey2Id,
                                              "RequiredHeroicKey2Id: " + (object)this.RequiredHeroicKey2Id);
     writer.WriteLineNotDefault <uint>(this.RequiredQuestId, "RequiredQuestId: " + (object)this.RequiredQuestId);
     writer.WriteLineNotDefault <uint>(this.RequiredLevel, "RequiredLevel: " + (object)this.RequiredLevel);
     writer.WriteLineNotDefault <Asda2ItemId>(this.RequiredHeroicKeyId,
                                              "RequiredHeroicKeyId: " + (object)this.RequiredHeroicKeyId);
     writer.WriteLineNotDefault <Asda2ItemId>(this.RequiredHeroicKeyId,
                                              "RequiredHeroicKeyId: " + (object)this.RequiredHeroicKeyId);
 }
示例#5
0
文件: ATTemplate.cs 项目: NVN/WCell
		public void Write(IndentTextWriter writer)
		{
			writer.WriteLine("Type: " + Type);
			writer.WriteLineNotDefault(RequiredItemId, "RequiredItemId: " + RequiredItemId);
			writer.WriteLineNotDefault(RequiredItem2Id, "RequiredItem2Id: " + RequiredItem2Id);
			writer.WriteLineNotDefault(RequiredHeroicKeyId, "RequiredHeroicKeyId: " + RequiredHeroicKeyId);
			writer.WriteLineNotDefault(RequiredHeroicKey2Id, "RequiredHeroicKey2Id: " + RequiredHeroicKey2Id);
			writer.WriteLineNotDefault(RequiredQuestId, "RequiredQuestId: " + RequiredQuestId);
			writer.WriteLineNotDefault(RequiredLevel, "RequiredLevel: " + RequiredLevel);
			writer.WriteLineNotDefault(RequiredHeroicKeyId, "RequiredHeroicKeyId: " + RequiredHeroicKeyId);
			writer.WriteLineNotDefault(RequiredHeroicKeyId, "RequiredHeroicKeyId: " + RequiredHeroicKeyId);
		}
示例#6
0
		public void Dump(IndentTextWriter writer)
		{
			writer.WriteLine("{3}{0} (Id: {1}, {2})", DefaultName, Id, NPCId, Rank != 0 ? Rank + " " : "");
			if (!string.IsNullOrEmpty(DefaultTitle))
			{
				writer.WriteLine("Title: " + DefaultTitle);
			}
			if (Type != 0)
			{
				writer.WriteLine("Type: " + Type);
			}
			if (EntryFlags != 0)
			{
				writer.WriteLine("EntryFlags: " + EntryFlags);
			}
			if (Family != null)
			{
				writer.WriteLine("Family: " + Family);
			}
			if (IsLeader)
			{
				writer.WriteLine("Leader");
			}

			writer.WriteLine("DisplayIds: " + DisplayIds.ToString(", "));
			if (TrainerEntry != null)
			{
				writer.WriteLine("Trainer "
					//+ "for {0} {1}",
					//             TrainerEntry.RequiredRace != 0 ? TrainerEntry.RequiredRace.ToString() : "",
					//             TrainerEntry.RequiredClass != 0 ? TrainerEntry.RequiredClass.ToString() : ""
								 );
			}

			WriteFaction(writer);
			writer.WriteLineNotDefault(IsBoss, "Boss");
			writer.WriteLine("Level: {0} - {1}", MinLevel, MaxLevel);
			writer.WriteLine("Health: {0} - {1}", MinHealth, MaxHealth);

			writer.WriteLineNotDefault(MinMana, "Mana: {0} - {1}", MinMana, MaxMana);
			writer.WriteLineNotDefault(NPCFlags, "Flags: " + NPCFlags);
			writer.WriteLineNotDefault(DynamicFlags, "DynamicFlags: " + DynamicFlags);
			writer.WriteLineNotDefault(UnitFlags, "UnitFlags: " + UnitFlags);
			writer.WriteLineNotDefault(ExtraFlags, "ExtraFlags: " + string.Format("0x{0:X}", ExtraFlags));
			writer.WriteLineNotDefault(AttackTime + OffhandAttackTime, "AttackTime: " + AttackTime, "Offhand: " + OffhandAttackTime);
			writer.WriteLineNotDefault(RangedAttackTime, "RangedAttackTime: " + RangedAttackTime);
			writer.WriteLineNotDefault(AttackPower, "AttackPower: " + AttackPower);
			writer.WriteLineNotDefault(RangedAttackPower, "RangedAttackPower: " + RangedAttackPower);
			//writer.WriteLineNotDefault(OffhandAttackPower, "OffhandAttackPower: " + OffhandAttackPower);
			writer.WriteLineNotDefault(MinDamage + MaxDamage, "Damage: {0} - {1}", MinDamage, MaxDamage);
			writer.WriteLineNotDefault(RangedMinDamage + RangedMaxDamage, "RangedDamage: {0} - {1}", RangedMinDamage,
									   RangedMaxDamage);
			writer.WriteLineNotDefault(OffhandMinDamage + OffhandMaxDamage, "OffhandDamage: {0} - {1}", OffhandMinDamage,
									   OffhandMaxDamage);
			var resistances = new List<string>(8);
			for (var i = 0; i < Resistances.Length; i++)
			{
				var res = Resistances[i];
				if (res > 0)
				{
					resistances.Add(string.Format("{0}: {1}", (DamageSchool)i, res));
				}
			}
			if (Scale != 1)
			{
				writer.WriteLine("Scale: " + Scale);
			}

			var cr = GetRandomModel().CombatReach;
			var br = GetRandomModel().BoundingRadius;
			writer.WriteLine("CombatReach: " + cr);
			writer.WriteLine("BoundingRadius: " + br);
			writer.WriteLineNotDefault(resistances.Count, "Resistances: " + resistances.ToString(", "));
			writer.WriteLineNotDefault(MoneyDrop, "MoneyDrop: " + MoneyDrop);
			writer.WriteLineNotDefault(InvisibilityType, "Invisibility: " + InvisibilityType);
			writer.WriteLineNotDefault(MovementType, "MovementType: " + MovementType);
			writer.WriteLineNotDefault(WalkSpeed + RunSpeed + FlySpeed, "Speeds - Walking: {0}, Running: {1}, Flying: {2} ",
									   WalkSpeed, RunSpeed, FlySpeed);
			writer.WriteLineNotDefault(LootId + SkinLootId + PickPocketLootId, "{0}{1}{2}",
									   LootId != 0 ? "Lootable " : "",
									   SkinLootId != 0 ? "Skinnable " : "",
									   PickPocketLootId != 0 ? "Pickpocketable" : "");
			if (AddonData != null)
			{
				writer.WriteLineNotDefault(AddonData.MountModelId, "Mount: " + AddonData.MountModelId);
				writer.WriteLineNotDefault(AddonData.Auras.Count, "Auras: " + AddonData.Auras.ToString(", "));
			}
			var spells = Spells;
			if (spells != null && spells.Count > 0)
			{
				writer.WriteLine("Spells: " + Spells.ToString(", "));
			}
			if (Equipment != null)
			{
				writer.WriteLine("Equipment: {0}", Equipment.ItemIds.Where(id => id != 0).ToString(", "));
			}

			if (DifficultyOverrideEntryIds != null && DifficultyOverrideEntryIds.Any(id => id != 0))
			{
				var parts = new List<string>(4);
				for (var i = 0u; i < 3; i++)
				{
					var id = DifficultyOverrideEntryIds[i];
					if (id != 0)
					{
						var entry = NPCMgr.GetEntry(id);
						MapTemplate map;
						MapDifficultyEntry diff;
						if (entry != null && (map = GetMapTemplate()) != null && (diff = map.GetDifficulty(i)) != null)
						{
							parts.Add(string.Format("{0} ({1}) = " + id + " (" + (uint)id + ")", diff.IsHeroic ? "Heroic" : "Normal", diff.MaxPlayerCount));
						}
						else
						{
							parts.Add("(unknown difficulty) = " + id + " (" + (uint)id + ")");
						}
					}
				}
				writer.WriteLine("DifficultyOverrides: {0}", parts.ToString("; "));
			}

			if (KillCreditIds != null && KillCreditIds.Any(id => id != 0))
			{
				var parts = new List<string>(2);
				for (var i = 0u; i < UnitConstants.MaxKillCredits; i++)
				{
					var id = KillCreditIds[i];
					if (id != 0)
					{
						var entry = NPCMgr.GetEntry(id);
						if (entry != null)
						{
							parts.Add(id + " (" + (uint)id + ")");
						}
					}
				}
				writer.WriteLine("KillCredits: {0}", parts.ToString("; "));
			}


			//if (inclFaction)	
			//{
			//    writer.WriteLineNotDefault(DefaultFactionId, "Faction: " + DefaultFactionId);
			//}
		}
示例#7
0
        public void Dump(IndentTextWriter writer)
        {
            writer.WriteLine("{3}{0} (Id: {1}, {2})", DefaultName, Id, NPCId, Rank != 0 ? Rank + " " : "");
            if (!string.IsNullOrEmpty(DefaultTitle))
            {
                writer.WriteLine("Title: " + DefaultTitle);
            }
            if (Type != 0)
            {
                writer.WriteLine("Type: " + Type);
            }
            if (Family != null)
            {
                writer.WriteLine("Family: " + Family);
            }

            if (TrainerEntry != null)
            {
                writer.WriteLine("Trainer "
                                 //+ "for {0} {1}",
                                 //             TrainerEntry.RequiredRace != 0 ? TrainerEntry.RequiredRace.ToString() : "",
                                 //             TrainerEntry.RequiredClass != 0 ? TrainerEntry.RequiredClass.ToString() : ""
                                 );
            }

            WriteFaction(writer);
            writer.WriteLine("Level: {0} - {1}", MinLevel, MaxLevel);
            writer.WriteLine("Health: {0} - {1}", MinHealth, MaxHealth);

            writer.WriteLineNotDefault(MinMana, "Mana: {0} - {1}", MinMana, MaxMana);
            writer.WriteLineNotDefault(NPCFlags, "Flags: " + NPCFlags);
            writer.WriteLineNotDefault(DynamicFlags, "DynamicFlags: " + DynamicFlags);
            writer.WriteLineNotDefault(UnitFlags, "UnitFlags: " + UnitFlags);
            writer.WriteLineNotDefault(ExtraFlags, "ExtraFlags: " + string.Format("0x{0:X}", ExtraFlags));
            writer.WriteLineNotDefault(AttackTime + OffhandAttackTime, "AttackTime: " + AttackTime, "Offhand: " + OffhandAttackTime);
            writer.WriteLineNotDefault(AttackPower, "AttackPower: " + AttackPower);
            //writer.WriteLineNotDefault(OffhandAttackPower, "OffhandAttackPower: " + OffhandAttackPower);
            writer.WriteLineNotDefault(MinDamage + MaxDamage, "Damage: {0} - {1}", MinDamage, MaxDamage);
            var resistances = new List <string>(8);

            for (var i = 0; i < Resistances.Length; i++)
            {
                var res = Resistances[i];
                if (res > 0)
                {
                    resistances.Add(string.Format("{0}: {1}", (DamageSchool)i, res));
                }
            }
            if (Scale != 1)
            {
                writer.WriteLine("Scale: " + Scale);
            }

            var cr = GetRandomModel().CombatReach;
            var br = GetRandomModel().BoundingRadius;

            writer.WriteLine("CombatReach: " + cr);
            writer.WriteLine("BoundingRadius: " + br);
            writer.WriteLineNotDefault(resistances.Count, "Resistances: " + resistances.ToString(", "));
            writer.WriteLineNotDefault(MoneyDrop, "MoneyDrop: " + MoneyDrop);
            writer.WriteLineNotDefault(InvisibilityType, "Invisibility: " + InvisibilityType);
            writer.WriteLineNotDefault(MovementType, "MovementType: " + MovementType);
            writer.WriteLineNotDefault(WalkSpeed + RunSpeed + FlySpeed, "Speeds - Walking: {0}, Running: {1}, Flying: {2} ",
                                       WalkSpeed, RunSpeed, FlySpeed);
            var spells = Spells;

            if (spells != null && spells.Count > 0)
            {
                writer.WriteLine("Spells: " + Spells.ToString(", "));
            }
            if (Equipment != null)
            {
                writer.WriteLine("Equipment: {0}", Equipment.ItemIds.Where(id => id != 0).ToString(", "));
            }



            //if (inclFaction)
            //{
            //    writer.WriteLineNotDefault(DefaultFactionId, "Faction: " + DefaultFactionId);
            //}
        }
示例#8
0
		public void Dump(IndentTextWriter writer)
		{
			writer.WriteLine("{3}{0} (Id: {1}, {2})", DefaultName, Id, NPCId, Rank != 0 ? Rank + " " : "");
			if (!string.IsNullOrEmpty(DefaultTitle))
			{
				writer.WriteLine("Title: " + DefaultTitle);
			}
			if (Type != 0)
			{
				writer.WriteLine("Type: " + Type);
			}
			if (EntryFlags != 0)
			{
				writer.WriteLine("EntryFlags: " + EntryFlags);
			}
			if (Family != null)
			{
				writer.WriteLine("Family: " + Family);
			}
			if (IsLeader)
			{
				writer.WriteLine("Leader");
			}

			writer.WriteLine("DisplayIds: " + DisplayIds.ToString(", "));
			if (TrainerEntry != null)
			{
				writer.WriteLine("Trainer "
					//+ "for {0} {1}",
					//             TrainerEntry.RequiredRace != 0 ? TrainerEntry.RequiredRace.ToString() : "",
					//             TrainerEntry.RequiredClass != 0 ? TrainerEntry.RequiredClass.ToString() : ""
								 );
			}

			WriteFaction(writer);
			writer.WriteLineNotDefault(IsBoss, "Boss");
			writer.WriteLine("Level: {0} - {1}", MinLevel, MaxLevel);
			writer.WriteLine("Health: {0} - {1}", MinHealth, MaxHealth);

			writer.WriteLineNotDefault(MinMana, "Mana: {0} - {1}", MinMana, MaxMana);
			writer.WriteLineNotDefault(NPCFlags, "Flags: " + NPCFlags);
			writer.WriteLineNotDefault(DynamicFlags, "DynamicFlags: " + DynamicFlags);
			writer.WriteLineNotDefault(UnitFlags, "UnitFlags: " + UnitFlags);
			writer.WriteLineNotDefault(ExtraFlags, "ExtraFlags: " + ExtraFlags.ToString("0x:X"));
			writer.WriteLineNotDefault(AttackTime + OffhandAttackTime, "AttackTime: " + AttackTime, "Offhand: " + OffhandAttackTime);
			writer.WriteLineNotDefault(RangedAttackTime, "RangedAttackTime: " + RangedAttackTime);
			writer.WriteLineNotDefault(AttackPower, "AttackPower: " + AttackPower);
			writer.WriteLineNotDefault(RangedAttackPower, "RangedAttackPower: " + RangedAttackPower);
			writer.WriteLineNotDefault(OffhandAttackPower, "OffhandAttackPower: " + OffhandAttackPower);
			writer.WriteLineNotDefault(MinDamage + MaxDamage, "Damage: {0} - {1}", MinDamage, MaxDamage);
			writer.WriteLineNotDefault(RangedMinDamage + RangedMaxDamage, "RangedDamage: {0} - {1}", RangedMinDamage,
									   RangedMaxDamage);
			writer.WriteLineNotDefault(OffhandMinDamage + OffhandMaxDamage, "OffhandDamage: {0} - {1}", OffhandMinDamage,
									   OffhandMaxDamage);
			var resistances = new List<string>(8);
			for (var i = 0; i < Resistances.Length; i++)
			{
				var res = Resistances[i];
				if (res > 0)
				{
					resistances.Add(string.Format("{0}: {1}", (DamageSchool)i, res));
				}
			}
			if (Scale != 1)
			{
				writer.WriteLine("Scale: " + Scale);
			}

			var cr = GetRandomModel().CombatReach;
			var br = GetRandomModel().BoundingRadius;
			writer.WriteLine("CombatReach: " + cr);
			writer.WriteLine("BoundingRadius: " + br);
			writer.WriteLineNotDefault(resistances.Count, "Resistances: " + resistances.ToString(", "));
			writer.WriteLineNotDefault(MoneyDrop, "MoneyDrop: " + MoneyDrop);
			writer.WriteLineNotDefault(InvisibilityType, "Invisibility: " + InvisibilityType);
			writer.WriteLineNotDefault(MovementType, "MovementType: " + MovementType);
			writer.WriteLineNotDefault(WalkSpeed + RunSpeed + FlySpeed, "Speeds - Walking: {0}, Running: {1}, Flying: {2} ",
									   WalkSpeed, RunSpeed, FlySpeed);
			writer.WriteLineNotDefault(LootId + SkinLootId + PickPocketLootId, "{0}{1}{2}",
									   LootId != 0 ? "Lootable " : "",
									   SkinLootId != 0 ? "Skinnable " : "",
									   PickPocketLootId != 0 ? "Pickpocketable" : "");
			writer.WriteLineNotDefault(Auras.Count, "Auras: " + Auras.ToString(", "));
			var spells = Spells;
			if (spells != null && spells.Count > 0)
			{
				writer.WriteLine("Spells: " + Spells.ToString(", "));
			}
			writer.WriteLineNotDefault(ExtraA9Flags, "ExtraA9Flags: " + ExtraA9Flags);
			//if (inclFaction)	
			//{
			//    writer.WriteLineNotDefault(DefaultFactionId, "Faction: " + DefaultFactionId);
			//}
		}
示例#9
0
		public void Write(IndentTextWriter writer)
		{
			writer.WriteLine(this);
			writer.IndentLevel++;
			writer.WriteLine("MapId: " + MapId);
			writer.WriteLine("Position: " + Position);
			writer.WriteLineNotDefault(Radius, "Radius: " + Radius);
			writer.WriteLineNotDefault(BoxLength + BoxWidth + BoxHeight + BoxYaw, 
				"Box Length: " + BoxLength +
				", Width: " + BoxWidth +
				", Height: " + BoxHeight + 
				", Yaw: " + BoxYaw);
			if (Template != null)
			{
				Template.Write(writer);	
			}
			writer.IndentLevel--;
		}
示例#10
0
        public void Dump(IndentTextWriter writer)
        {
            writer.WriteLine("{3}{0} (Id: {1}, {2})", DefaultName, Id, NPCId, Rank != 0 ? Rank + " " : "");
            if (!string.IsNullOrEmpty(DefaultTitle))
            {
                writer.WriteLine("Title: " + DefaultTitle);
            }
            if (Type != 0)
            {
                writer.WriteLine("Type: " + Type);
            }
            if (EntryFlags != 0)
            {
                writer.WriteLine("EntryFlags: " + EntryFlags);
            }
            if (Family != null)
            {
                writer.WriteLine("Family: " + Family);
            }
            if (IsLeader)
            {
                writer.WriteLine("Leader");
            }

            writer.WriteLine("DisplayIds: " + DisplayIds.ToString(", "));
            if (TrainerEntry != null)
            {
                writer.WriteLine("Trainer "
                                 //+ "for {0} {1}",
                                 //             TrainerEntry.RequiredRace != 0 ? TrainerEntry.RequiredRace.ToString() : "",
                                 //             TrainerEntry.RequiredClass != 0 ? TrainerEntry.RequiredClass.ToString() : ""
                                 );
            }

            WriteFaction(writer);
            writer.WriteLineNotDefault(IsBoss, "Boss");
            writer.WriteLine("Level: {0} - {1}", MinLevel, MaxLevel);
            writer.WriteLine("Health: {0} - {1}", MinHealth, MaxHealth);

            writer.WriteLineNotDefault(MinMana, "Mana: {0} - {1}", MinMana, MaxMana);
            writer.WriteLineNotDefault(NPCFlags, "Flags: " + NPCFlags);
            writer.WriteLineNotDefault(DynamicFlags, "DynamicFlags: " + DynamicFlags);
            writer.WriteLineNotDefault(UnitFlags, "UnitFlags: " + UnitFlags);
            writer.WriteLineNotDefault(ExtraFlags, "ExtraFlags: " + string.Format("0x{0:X}", ExtraFlags));
            writer.WriteLineNotDefault(AttackTime + OffhandAttackTime, "AttackTime: " + AttackTime, "Offhand: " + OffhandAttackTime);
            writer.WriteLineNotDefault(RangedAttackTime, "RangedAttackTime: " + RangedAttackTime);
            writer.WriteLineNotDefault(AttackPower, "AttackPower: " + AttackPower);
            writer.WriteLineNotDefault(RangedAttackPower, "RangedAttackPower: " + RangedAttackPower);
            //writer.WriteLineNotDefault(OffhandAttackPower, "OffhandAttackPower: " + OffhandAttackPower);
            writer.WriteLineNotDefault(MinDamage + MaxDamage, "Damage: {0} - {1}", MinDamage, MaxDamage);
            writer.WriteLineNotDefault(RangedMinDamage + RangedMaxDamage, "RangedDamage: {0} - {1}", RangedMinDamage,
                                       RangedMaxDamage);
            writer.WriteLineNotDefault(OffhandMinDamage + OffhandMaxDamage, "OffhandDamage: {0} - {1}", OffhandMinDamage,
                                       OffhandMaxDamage);
            var resistances = new List <string>(8);

            for (var i = 0; i < Resistances.Length; i++)
            {
                var res = Resistances[i];
                if (res > 0)
                {
                    resistances.Add(string.Format("{0}: {1}", (DamageSchool)i, res));
                }
            }
            if (Scale != 1)
            {
                writer.WriteLine("Scale: " + Scale);
            }

            var cr = GetRandomModel().CombatReach;
            var br = GetRandomModel().BoundingRadius;

            writer.WriteLine("CombatReach: " + cr);
            writer.WriteLine("BoundingRadius: " + br);
            writer.WriteLineNotDefault(resistances.Count, "Resistances: " + resistances.ToString(", "));
            writer.WriteLineNotDefault(MoneyDrop, "MoneyDrop: " + MoneyDrop);
            writer.WriteLineNotDefault(InvisibilityType, "Invisibility: " + InvisibilityType);
            writer.WriteLineNotDefault(MovementType, "MovementType: " + MovementType);
            writer.WriteLineNotDefault(WalkSpeed + RunSpeed + FlySpeed, "Speeds - Walking: {0}, Running: {1}, Flying: {2} ",
                                       WalkSpeed, RunSpeed, FlySpeed);
            writer.WriteLineNotDefault(LootId + SkinLootId + PickPocketLootId, "{0}{1}{2}",
                                       LootId != 0 ? "Lootable " : "",
                                       SkinLootId != 0 ? "Skinnable " : "",
                                       PickPocketLootId != 0 ? "Pickpocketable" : "");
            if (AddonData != null)
            {
                writer.WriteLineNotDefault(AddonData.MountModelId, "Mount: " + AddonData.MountModelId);
                writer.WriteLineNotDefault(AddonData.Auras.Count, "Auras: " + AddonData.Auras.ToString(", "));
            }
            var spells = Spells;

            if (spells != null && spells.Count > 0)
            {
                writer.WriteLine("Spells: " + Spells.ToString(", "));
            }
            if (Equipment != null)
            {
                writer.WriteLine("Equipment: {0}", Equipment.ItemIds.Where(id => id != 0).ToString(", "));
            }

            if (DifficultyOverrideEntryIds != null && DifficultyOverrideEntryIds.Any(id => id != 0))
            {
                var parts = new List <string>(4);
                for (var i = 0u; i < 3; i++)
                {
                    var id = DifficultyOverrideEntryIds[i];
                    if (id != 0)
                    {
                        var                entry = NPCMgr.GetEntry(id);
                        MapTemplate        map;
                        MapDifficultyEntry diff;
                        if (entry != null && (map = GetMapTemplate()) != null && (diff = map.GetDifficulty(i)) != null)
                        {
                            parts.Add(string.Format("{0} ({1}) = " + id + " (" + (uint)id + ")", diff.IsHeroic ? "Heroic" : "Normal", diff.MaxPlayerCount));
                        }
                        else
                        {
                            parts.Add("(unknown difficulty) = " + id + " (" + (uint)id + ")");
                        }
                    }
                }
                writer.WriteLine("DifficultyOverrides: {0}", parts.ToString("; "));
            }

            if (KillCreditIds != null && KillCreditIds.Any(id => id != 0))
            {
                var parts = new List <string>(2);
                for (var i = 0u; i < UnitConstants.MaxKillCredits; i++)
                {
                    var id = KillCreditIds[i];
                    if (id != 0)
                    {
                        var entry = NPCMgr.GetEntry(id);
                        if (entry != null)
                        {
                            parts.Add(id + " (" + (uint)id + ")");
                        }
                    }
                }
                writer.WriteLine("KillCredits: {0}", parts.ToString("; "));
            }


            //if (inclFaction)
            //{
            //    writer.WriteLineNotDefault(DefaultFactionId, "Faction: " + DefaultFactionId);
            //}
        }
示例#11
0
        public void Dump(IndentTextWriter writer)
        {
            writer.WriteLine("{3}{0} (Id: {1}, {2})", (object)this.DefaultName, (object)this.Id, (object)this.NPCId,
                             this.Rank != CreatureRank.Normal ? (object)(((int)this.Rank).ToString() + " ") : (object)"");
            if (!string.IsNullOrEmpty(this.DefaultTitle))
            {
                writer.WriteLine("Title: " + this.DefaultTitle);
            }
            if (this.Type != CreatureType.None)
            {
                writer.WriteLine("Type: " + (object)this.Type);
            }
            if (this.Family != null)
            {
                writer.WriteLine("Family: " + (object)this.Family);
            }
            if (this.TrainerEntry != null)
            {
                writer.WriteLine("Trainer ");
            }
            this.WriteFaction(writer);
            writer.WriteLine("Level: {0} - {1}", (object)this.MinLevel, (object)this.MaxLevel);
            writer.WriteLine("Health: {0} - {1}", (object)this.MinHealth, (object)this.MaxHealth);
            writer.WriteLineNotDefault <int>(this.MinMana, "Mana: {0} - {1}", (object)this.MinMana,
                                             (object)this.MaxMana);
            writer.WriteLineNotDefault <NPCFlags>(this.NPCFlags, "Flags: " + (object)this.NPCFlags);
            writer.WriteLineNotDefault <UnitDynamicFlags>(this.DynamicFlags,
                                                          "DynamicFlags: " + (object)this.DynamicFlags);
            writer.WriteLineNotDefault <UnitFlags>(this.UnitFlags, "UnitFlags: " + (object)this.UnitFlags);
            writer.WriteLineNotDefault <UnitExtraFlags>(this.ExtraFlags,
                                                        "ExtraFlags: " + string.Format("0x{0:X}", (object)this.ExtraFlags));
            writer.WriteLineNotDefault <int>(this.AttackTime + this.OffhandAttackTime,
                                             "AttackTime: " + (object)this.AttackTime, (object)("Offhand: " + (object)this.OffhandAttackTime));
            writer.WriteLineNotDefault <int>(this.AttackPower, "AttackPower: " + (object)this.AttackPower);
            writer.WriteLineNotDefault <float>((float)((double)this.MinDamage + (double)this.MaxDamage),
                                               "Damage: {0} - {1}", (object)this.MinDamage, (object)this.MaxDamage);
            List <string> collection = new List <string>(8);

            for (int index = 0; index < this.Resistances.Length; ++index)
            {
                int resistance = this.Resistances[index];
                if (resistance > 0)
                {
                    collection.Add(string.Format("{0}: {1}", (object)(DamageSchool)index, (object)resistance));
                }
            }

            if ((double)this.Scale != 1.0)
            {
                writer.WriteLine("Scale: " + (object)this.Scale);
            }
            float combatReach    = this.GetRandomModel().CombatReach;
            float boundingRadius = this.GetRandomModel().BoundingRadius;

            writer.WriteLine("CombatReach: " + (object)combatReach);
            writer.WriteLine("BoundingRadius: " + (object)boundingRadius);
            writer.WriteLineNotDefault <int>(collection.Count, "Resistances: " + collection.ToString <string>(", "));
            writer.WriteLineNotDefault <uint>(this.MoneyDrop, "MoneyDrop: " + (object)this.MoneyDrop);
            writer.WriteLineNotDefault <InvisType>(this.InvisibilityType,
                                                   "Invisibility: " + (object)this.InvisibilityType);
            writer.WriteLineNotDefault <AIMotionGenerationType>(this.MovementType,
                                                                "MovementType: " + (object)this.MovementType);
            writer.WriteLineNotDefault <float>(
                (float)((double)this.WalkSpeed + (double)this.RunSpeed + (double)this.FlySpeed),
                "Speeds - Walking: {0}, Running: {1}, Flying: {2} ", (object)this.WalkSpeed, (object)this.RunSpeed,
                (object)this.FlySpeed);
            Dictionary <SpellId, Spell> spells = this.Spells;

            if (spells != null && spells.Count > 0)
            {
                writer.WriteLine("Spells: " + this.Spells.ToString <KeyValuePair <SpellId, Spell> >(", "));
            }
            if (this.Equipment == null)
            {
                return;
            }
            writer.WriteLine("Equipment: {0}",
                             (object)((IEnumerable <Asda2ItemId>) this.Equipment.ItemIds)
                             .Where <Asda2ItemId>((Func <Asda2ItemId, bool>)(id => id != (Asda2ItemId)0))
                             .ToString <Asda2ItemId>(", "));
        }
示例#12
0
        public void Dump(IndentTextWriter writer)
        {
            writer.WriteLine("{3}{0} (Id: {1}, {2})", (object)DefaultName, (object)Id, (object)NPCId,
                             Rank != CreatureRank.Normal ? (object)(((int)Rank) + " ") : (object)"");
            if (!string.IsNullOrEmpty(DefaultTitle))
            {
                writer.WriteLine("Title: " + DefaultTitle);
            }
            if (Type != CreatureType.None)
            {
                writer.WriteLine("Type: " + Type);
            }
            if (Family != null)
            {
                writer.WriteLine("Family: " + Family);
            }
            if (TrainerEntry != null)
            {
                writer.WriteLine("Trainer ");
            }
            WriteFaction(writer);
            writer.WriteLine("Level: {0} - {1}", MinLevel, MaxLevel);
            writer.WriteLine("Health: {0} - {1}", MinHealth, MaxHealth);
            writer.WriteLineNotDefault(MinMana, "Mana: {0} - {1}", (object)MinMana,
                                       (object)MaxMana);
            writer.WriteLineNotDefault(NPCFlags, "Flags: " + NPCFlags);
            writer.WriteLineNotDefault(DynamicFlags,
                                       "DynamicFlags: " + DynamicFlags);
            writer.WriteLineNotDefault(UnitFlags, "UnitFlags: " + UnitFlags);
            writer.WriteLineNotDefault(ExtraFlags,
                                       "ExtraFlags: " + string.Format("0x{0:X}", ExtraFlags));
            writer.WriteLineNotDefault(AttackTime + OffhandAttackTime,
                                       "AttackTime: " + AttackTime, (object)("Offhand: " + (object)OffhandAttackTime));
            writer.WriteLineNotDefault(AttackPower, "AttackPower: " + AttackPower);
            writer.WriteLineNotDefault((float)(MinDamage + (double)MaxDamage),
                                       "Damage: {0} - {1}", (object)MinDamage, (object)MaxDamage);
            List <string> collection = new List <string>(8);

            for (int index = 0; index < Resistances.Length; ++index)
            {
                int resistance = Resistances[index];
                if (resistance > 0)
                {
                    collection.Add(string.Format("{0}: {1}", (DamageSchool)index, resistance));
                }
            }

            if (Scale != 1.0)
            {
                writer.WriteLine("Scale: " + Scale);
            }
            float combatReach    = GetRandomModel().CombatReach;
            float boundingRadius = GetRandomModel().BoundingRadius;

            writer.WriteLine("CombatReach: " + combatReach);
            writer.WriteLine("BoundingRadius: " + boundingRadius);
            writer.WriteLineNotDefault(collection.Count, "Resistances: " + collection.ToString(", "));
            writer.WriteLineNotDefault(MoneyDrop, "MoneyDrop: " + MoneyDrop);
            writer.WriteLineNotDefault(InvisibilityType,
                                       "Invisibility: " + InvisibilityType);
            writer.WriteLineNotDefault(MovementType,
                                       "MovementType: " + MovementType);
            writer.WriteLineNotDefault(
                (float)(WalkSpeed + (double)RunSpeed + FlySpeed),
                "Speeds - Walking: {0}, Running: {1}, Flying: {2} ", (object)WalkSpeed, (object)RunSpeed,
                (object)FlySpeed);
            Dictionary <SpellId, Spell> spells = Spells;

            if (spells != null && spells.Count > 0)
            {
                writer.WriteLine("Spells: " + Spells.ToString(", "));
            }
            if (Equipment == null)
            {
                return;
            }
            writer.WriteLine("Equipment: {0}",
                             Equipment.ItemIds
                             .Where(id => id != (Asda2ItemId)0)
                             .ToString(", "));
        }