public override string ToString() { TemplateId.Where(templ => templ != 0U); return((Amount != 1 ? Amount + "x " : "") + ObjectType + " " + ObjectType.ToString(TemplateId, ", ") + (RequiredSpellId != SpellId.None ? " - Spell: " + RequiredSpellId : (object)"")); }
public override string ToString() { if (this.Full == 0UL) { return("<null>"); } ObjectTypeId objectType = this.ObjectType; if (!this.HasEntry) { return(string.Format("High: 0x{0:X4} ({1}) - Low: {2}", (object)this.m_high, (object)objectType, (object)this.m_low)); } string str = objectType.ToString(this.Entry.ToString()); return(string.Format("High: 0x{0} ({1}) - Low: {2} - Entry: {3}", (object)((ushort)this.High).ToString("X2"), (object)objectType, (object)this.Low, (object)str)); }
public void Dump(TextWriter writer) { for (ObjectTypeId group = ObjectTypeId.Object; group < (ObjectTypeId)UpdateField.ObjectTypeCount; group++) { if (Changes[(int)group].Count > 0) { writer.WriteLine(group.ToString().ToUpper() + ":"); writer.WriteLine(); foreach (var change in Changes[(int)group]) { writer.WriteLine("\t" + change); } writer.WriteLine(); writer.WriteLine("##########################################################"); writer.WriteLine(); } } }
public static string ToString(this ObjectTypeId type, IEnumerable <uint> ids, string conj) { return(ids.Aggregate("", (current, id) => current + type.ToString(id) + conj)); }
/// <summary> /// Recycles an entity ID of the given type. /// </summary> /// <param name="lowerEntityId">the lower entity id</param> public static bool RecycleLowerEntityId(uint lowerEntityId, ObjectTypeId idType) { if (DoesIdExist(lowerEntityId, idType)) { // TODO: What should we do if it already exists? This is are a serious bug. s_log.Debug(Resources.AlreadyRecycledEntityId, lowerEntityId.ToString(), idType.ToString()); return false; } EntityIdStorage eid = new EntityIdStorage(); eid.EntityId = lowerEntityId; eid.EntityType = idType; AddRecycledId(eid); return true; }
/// <summary> /// Recycles an entity ID of the given type. /// </summary> /// <param name="lowerEntityId">the lower entity id</param> public static bool RecycleLowerEntityId(uint lowerEntityId, ObjectTypeId idType) { if (DoesIdExist(lowerEntityId, idType)) { // TODO: What should we do if it already exists? This is are a serious bug. s_log.Debug(Resources.AlreadyRecycledEntityId, lowerEntityId.ToString(), idType.ToString()); return(false); } EntityIdStorage eid = new EntityIdStorage(); eid.EntityId = lowerEntityId; eid.EntityType = idType; AddRecycledId(eid); return(true); }