public KillObjective( int amount, Type[] types, TextDefinition name, QuestArea area ) { m_DesiredAmount = amount; m_AcceptedTypes = types; m_Name = name; m_Area = area; }
public ImageTileButtonInfo( int itemID, int hue, TextDefinition label, int localizedTooltip ) { m_Hue = hue; m_ItemID = itemID; m_Label = label; m_LocalizedTooltip = localizedTooltip; }
public static void AddTo( ObjectPropertyList list, TextDefinition def ) { if ( def != null && def.m_Number > 0 ) list.Add( def.m_Number ); else if ( def != null && def.m_String != null ) list.Add( def.m_String ); }
public BasicInfoGump(TextDefinition body, TextDefinition title) : base(20, 20) { AddBackground(0, 0, 300, 450, 9200); if (title != null) { AddImageTiled(10, 10, 280, 20, 2702); AddImageTiled(10, 40, 280, 400, 2702); if (title.Number > 0) AddHtmlLocalized(12, 10, 275, 20, title.Number, 0xFFFFFF, false, false); else if (title.String != null) AddHtml(12, 10, 275, 20, String.Format("<BASEFONT COLOR=WHITE>{0}</BASEFONT>", title.String), false, false); if (body.Number > 0) AddHtmlLocalized(12, 40, 275, 390, body.Number, 0xFFFFFF, false, false); else if (body.String != null) AddHtml(12, 40, 275, 390, String.Format("<BASEFONT COLOR=WHITE>{0}</BASEFONT>", body.String), false, false); } else { AddImageTiled(10, 10, 280, 430, 2702); if (body.Number > 0) AddHtmlLocalized(12, 10, 275, 425, (int)body, 0xFFFFFF, false, false); else if (body.String != null) AddHtml(12, 10, 275, 425, String.Format("<BASEFONT COLOR=WHITE>{0}</BASEFONT>", body.String), false, false); } }
public HuntTrophyAddon(string name, MeasuredBy measuredBy, int measurement, int id, string killed, string location, TextDefinition species) { m_SouthID = id; m_Owner = name; m_Species = species; m_Location = location; m_DateKilled = killed; m_MeasuredBy = measuredBy; m_Measurement = measurement; //TODO: CHeck this switch (measuredBy) { case MeasuredBy.Weight: Weight = measurement; break; case MeasuredBy.Length: case MeasuredBy.Wingspan: Weight = 5.0; break; } AddComponent(new HuntTrophyComponent(SouthID), 0, 0, 0); AddComponent(new HuntTrophyComponent(SouthID + 1), 0, -1, 0); }
public ProximitySpawner( int amount, int minDelay, int maxDelay, int team, int homeRange, int triggerRange, string spawnMessage, bool instantFlag, string spawnName ) : base( amount, minDelay, maxDelay, team, homeRange, spawnName ) { m_TriggerRange = triggerRange; m_SpawnMessage = TextDefinition.Parse( spawnMessage ); m_InstantFlag = instantFlag; }
public CraftInfo( Type t, TextDefinition group, TextDefinition name, double minSkill, double maxSkill, IEnumerable<ResourceInfo> resources, Action<CraftItem> onAdded = null) { TypeOf = t; Group = group.IsNullOrWhiteSpace() ? new TextDefinition("Misc") : group; Name = name.IsNullOrWhiteSpace() ? new TextDefinition("Unknown") : name; MinSkill = Math.Max(0.0, Math.Min(minSkill, maxSkill)); MaxSkill = Math.Max(MinSkill, Math.Max(minSkill, maxSkill)); if (resources != null) { Resources = resources.Where(r => r.TypeOf != null && r.TypeOf.IsEqualOrChildOf<Item>()).ToArray(); } if (Resources.Length == 0) { Resources = DefResources.Dupe(r => new ResourceInfo(r.TypeOf, r.Name, r.Amount)); } _OnAdded = onAdded; }
public NewMaginciaMessage(TextDefinition title, TextDefinition body, string args) { m_Title = title; m_Body = body; m_Args = args; m_Created = DateTime.UtcNow; }
public ProximitySpawner( int amount, TimeSpan minDelay, TimeSpan maxDelay, int team, int homeRange, int triggerRange, TextDefinition spawnMessage, bool instantFlag, params string[] spawnedNames ) : base( amount, minDelay, maxDelay, team, homeRange, spawnedNames ) { m_TriggerRange = triggerRange; m_SpawnMessage = spawnMessage; m_InstantFlag = instantFlag; }
public void AddHtmlText( int x, int y, int width, int height, TextDefinition text, bool back, bool scroll ) { if ( text != null && text.Number > 0 ) AddHtmlLocalized( x, y, width, height, text.Number, back, scroll ); else if ( text != null && text.String != null ) AddHtml( x, y, width, height, text.String, back, scroll ); }
public RepairSkillInfo( CraftSystem system, Type[] nearbyTypes, TextDefinition notNearbyMessage, TextDefinition name ) { m_System = system; m_NearbyTypes = nearbyTypes; m_NotNearbyMessage = notNearbyMessage; m_Name = name; }
public static void SendMessageTo( Mobile m, TextDefinition def ) { if ( def.Number > 0 ) m.SendLocalizedMessage( def.Number ); else if ( def.String != null ) m.SendMessage( def.String ); }
public TalismanAttribute( TalismanAttribute copy ) { if ( copy != null ) { m_Type = copy.Type; m_Name = copy.Name; m_Amount = copy.Amount; } }
public NewMaginciaMessage(GenericReader reader) { int v = reader.ReadInt(); m_Title = TextDefinition.Deserialize(reader); m_Body = TextDefinition.Deserialize(reader); m_Created = reader.ReadDateTime(); m_Args = reader.ReadString(); }
public CraftInfo( Type t, TextDefinition group, TextDefinition name, double skill, IEnumerable<ResourceInfo> resources, Action<CraftItem> onAdded = null) : this(t, group, name, skill, skill, resources, onAdded) { }
public NotifyGumpOption(TextDefinition label, Action<GumpButton> callback, Color color, Color fill, Color border) { Label = label; Callback = callback; LabelColor = color; FillColor = fill; BorderColor = border; }
public InfoNPCGump( TextDefinition title, TextDefinition message ) : base( 1060668 ) // INFORMATION { RegisterButton( ButtonPosition.Left, ButtonGraphic.Close, 3 ); SetPageCount( 1 ); BuildPage(); TextDefinition.AddHtmlText( this, 160, 108, 250, 16, title, false, false, 0x2710, 0x4AC684 ); TextDefinition.AddHtmlText( this, 98, 156, 312, 180, message, false, true, 0x15F90, 0xBDE784 ); }
public HuntingTrophyInfo(HuntType type, Type creatureType, int id, TextDefinition species, int minMeasurement, int maxMeasurement, MeasuredBy measuredBy, bool complex = false) { m_HuntType = type; m_CreatureType = creatureType; m_MeasuredBy = measuredBy; m_SouthID = id; m_Species = species; m_MinMeasurement = minMeasurement; m_MaxMeasurement = maxMeasurement; m_Complex = complex; }
public GuardDefinition( Type type, int itemID, int price, int upkeep, int maximum, TextDefinition header, TextDefinition label ) { m_Type = type; m_Price = price; m_Upkeep = upkeep; m_Maximum = maximum; m_ItemID = itemID; m_Header = header; m_Label = label; }
public CraftItem( Type type, TextDefinition groupName, TextDefinition name ) { m_arCraftRes = new CraftResCol(); m_arCraftSkill = new CraftSkillCol(); m_Type = type; m_GroupNameString = groupName; m_NameString = name; m_GroupNameNumber = groupName; m_NameNumber = name; }
public static void AddHtmlText( Server.Gumps.Gump g, int x, int y, int width, int height, TextDefinition text, bool back, bool scroll, int numberColor, int stringColor ) { if( text != null && text.Number > 0 ) if( numberColor >= 0 ) g.AddHtmlLocalized( x, y, width, height, text.Number, numberColor, back, scroll ); else g.AddHtmlLocalized( x, y, width, height, text.Number, back, scroll ); else if( text != null && text.String != null ) if( stringColor >= 0 ) g.AddHtml( x, y, width, height, String.Format( "<BASEFONT COLOR=#{0:X6}>{1}</BASEFONT>", stringColor, text.String ), back, scroll ); else g.AddHtml( x, y, width, height, text.String, back, scroll ); }
public QuestConversationGump( MLQuest quest, PlayerMobile pm, TextDefinition text ) : base( 3006156 ) // Quest Conversation { CloseOtherGumps( pm ); SetTitle( quest.Title ); RegisterButton( ButtonPosition.Right, ButtonGraphic.Close, 3 ); SetPageCount( 1 ); BuildPage(); AddConversation( text ); }
public CollectObjective( int amount, Type type, TextDefinition name ) { m_DesiredAmount = amount; m_AcceptedType = type; m_Name = name; if ( MLQuestSystem.Debug && ShowDetailed && name.Number > 0 ) { int itemid = LabelToItemID( name.Number ); if ( itemid <= 0 || itemid > 0x4000 ) Console.WriteLine( "Warning: cliloc {0} is likely giving the wrong item ID", name.Number ); } }
public BaseImageTileButtonsGump( TextDefinition header, ImageTileButtonInfo[] buttons ) : base( 10, 10 ) //Coords are 0, o on OSI, intentional difference { m_Buttons = buttons; AddPage( 0 ); int x = XItems * 250; int y = YItems * 64; AddBackground( 0, 0, x+20, y+84, 0x13BE ); AddImageTiled( 10, 10, x, 20, 0xA40 ); AddImageTiled( 10, 40, x, y+4, 0xA40 ); AddImageTiled( 10, y+54, x, 20, 0xA40 ); AddAlphaRegion( 10, 10, x, y+64 ); AddButton( 10, y+54, 0xFB1, 0xFB2, 0, GumpButtonType.Reply, 0 ); //Cancel Button AddHtmlLocalized( 45, y+56, x-50, 20, 1060051, 0x7FFF, false, false ); // CANCEL TextDefinition.AddHtmlText( this, 14, 12, x, 20, header, false, false, 0x7FFF, 0xFFFFFF ); AddPage( 1 ); int itemsPerPage = XItems * YItems; for( int i = 0; i < buttons.Length; i++ ) { int position = i % itemsPerPage; int innerX = (position % XItems) * 250 + 14; int innerY = (position / XItems) * 64 + 44; int pageNum = i / itemsPerPage + 1; if( position == 0 && i != 0 ) { AddButton( x-100, y+54, 0xFA5, 0xFA7, 0, GumpButtonType.Page, pageNum ); AddHtmlLocalized( x-60, y+56, 60, 20, 1043353, 0x7FFF, false, false ); // Next AddPage( pageNum ); AddButton( x-200, y+54, 0xFAE, 0xFB0, 0, GumpButtonType.Page, pageNum - 1 ); AddHtmlLocalized( x-160, y+56, 60, 20, 1011393, 0x7FFF, false, false ); // Back } ImageTileButtonInfo b = buttons[i]; AddImageTiledButton( innerX, innerY, 0x918, 0x919, 100 + i, GumpButtonType.Reply, 0, b.ItemID, b.Hue, 15, 10, b.LocalizedTooltip ); TextDefinition.AddHtmlText( this, innerX + 84, innerY, 250, 60, b.Label, false, false, 0x7FFF, 0xFFFFFF ); } }
public TalismanAttribute( GenericReader reader ) { int version = reader.ReadInt(); SaveFlag flags = (SaveFlag) reader.ReadEncodedInt(); if ( GetSaveFlag( flags, SaveFlag.Type ) ) m_Type = ScriptCompiler.FindTypeByFullName( reader.ReadString(), false ); if ( GetSaveFlag( flags, SaveFlag.Name ) ) m_Name = TextDefinition.Deserialize( reader ); if ( GetSaveFlag( flags, SaveFlag.Amount ) ) m_Amount = reader.ReadEncodedInt(); }
public AddBuffPacket( Mobile mob, BuffIcon iconID, int titleCliloc, int secondaryCliloc, TextDefinition args, TimeSpan length ) : base(0xDF) { bool hasArgs = (args != null); this.EnsureCapacity( (hasArgs ? (48 + args.ToString().Length * 2): 44) ); m_Stream.Write( (int)mob.Serial ); m_Stream.Write( (short)iconID ); //ID m_Stream.Write( (short)0x1 ); //Type 0 for removal. 1 for add 2 for Data m_Stream.Fill( 4 ); m_Stream.Write( (short)iconID ); //ID m_Stream.Write( (short)0x01 ); //Type 0 for removal. 1 for add 2 for Data m_Stream.Fill( 4 ); if( length < TimeSpan.Zero ) length = TimeSpan.Zero; m_Stream.Write( (short)length.TotalSeconds ); //Time in seconds m_Stream.Fill( 3 ); m_Stream.Write( (int)titleCliloc ); m_Stream.Write( (int)secondaryCliloc ); if( !hasArgs ) { //m_Stream.Fill( 2 ); m_Stream.Fill( 10 ); } else { m_Stream.Fill( 4 ); m_Stream.Write( (short)0x1 ); //Unknown -> Possibly something saying 'hey, I have more data!'? m_Stream.Fill( 2 ); //m_Stream.WriteLittleUniNull( "\t#1018280" ); m_Stream.WriteLittleUniNull( String.Format( "\t{0}", args.ToString() ) ); m_Stream.Write( (short)0x1 ); //Even more Unknown -> Possibly something saying 'hey, I have more data!'? m_Stream.Fill( 2 ); } }
public static void AddHtmlText( Gump g, int x, int y, int width, int height, TextDefinition def, bool back, bool scroll, int numberColor, int stringColor ) { if ( def == null ) return; if ( def.m_Number > 0 ) { if ( numberColor >= 0 ) g.AddHtmlLocalized( x, y, width, height, def.m_Number, numberColor, back, scroll ); else g.AddHtmlLocalized( x, y, width, height, def.m_Number, back, scroll ); } else if ( def.m_String != null ) { if ( stringColor >= 0 ) g.AddHtml( x, y, width, height, String.Format( "<BASEFONT COLOR=#{0:X6}>{1}</BASEFONT>", stringColor, def.m_String ), back, scroll ); else g.AddHtml( x, y, width, height, def.m_String, back, scroll ); } }
public static void Serialize(GenericWriter writer, TextDefinition def) { if (def == null) { writer.WriteEncodedInt(3); } else if (def.m_Number > 0) { writer.WriteEncodedInt(1); writer.WriteEncodedInt(def.m_Number); } else if (def.m_String != null) { writer.WriteEncodedInt(2); writer.Write(def.m_String); } else { writer.WriteEncodedInt(0); } }
public HuntTrophy(string name, MeasuredBy measuredBy, int measurement, int id, string killed, string location, TextDefinition species) { m_SouthID = id; //ItemID = id; m_Owner = name; m_Species = species; m_Location = location; m_DateKilled = killed; m_MeasuredBy = measuredBy; m_Measurement = measurement; switch(measuredBy) { case MeasuredBy.Weight: Weight = measurement; break; case MeasuredBy.Length: case MeasuredBy.Wingspan: Weight = 5.0; break; } Movable = false; }
public static void PublicOverheadMessage(Mobile m, MessageType messageType, int hue, TextDefinition def) { if (def == null) { return; } if (def.m_Number > 0) { m.PublicOverheadMessage(messageType, hue, def.m_Number); } else if (def.m_String != null) { m.PublicOverheadMessage(messageType, hue, false, def.m_String); } }
public AddBuffPacket(Mobile mob, BuffIcon iconID, int titleCliloc, int secondaryCliloc, TextDefinition args, TimeSpan length) : base(0xDF) { bool hasArgs = (args != null); this.EnsureCapacity((hasArgs ? (48 + args.ToString().Length * 2): 44)); m_Stream.Write((int)mob.Serial); m_Stream.Write((short)iconID); //ID m_Stream.Write((short)0x1); //Type 0 for removal. 1 for add 2 for Data m_Stream.Fill(4); m_Stream.Write((short)iconID); //ID m_Stream.Write((short)0x01); //Type 0 for removal. 1 for add 2 for Data m_Stream.Fill(4); if (length < TimeSpan.Zero) { length = TimeSpan.Zero; } m_Stream.Write((short)length.TotalSeconds); //Time in seconds m_Stream.Fill(3); m_Stream.Write((int)titleCliloc); m_Stream.Write((int)secondaryCliloc); if (!hasArgs) { //m_Stream.Fill( 2 ); m_Stream.Fill(10); } else { m_Stream.Fill(4); m_Stream.Write((short)0x1); //Unknown -> Possibly something saying 'hey, I have more data!'? m_Stream.Fill(2); //m_Stream.WriteLittleUniNull( "\t#1018280" ); m_Stream.WriteLittleUniNull(String.Format("\t{0}", args.ToString())); m_Stream.Write((short)0x1); //Even more Unknown -> Possibly something saying 'hey, I have more data!'? m_Stream.Fill(2); } }
public BuffInfo(BuffIcon iconID, int titleCliloc, TextDefinition args) : this(iconID, titleCliloc, titleCliloc + 1, args) { }
public BuffInfo(BuffIcon iconID, int titleCliloc, int secondaryCliloc, TextDefinition args) : this(iconID, titleCliloc, secondaryCliloc) =>
public CollectionHuedItem(Type type, int itemID, TextDefinition tooltip, int hue, double points, int[] hues) : base(type, itemID, tooltip, hue, points) { m_Hues = hues; }
public CollectionSpellbook(SpellbookType type, int itemID, TextDefinition tooltip, double points) : base(typeof(Spellbook), itemID, tooltip, 0x0, points) { m_Type = type; }
public CollectionTitle(object title, TextDefinition tooltip, double points) : base(null, 0xFF1, tooltip, 0x0, points) { m_Title = title; }
public BuffInfo(BuffIcon iconID, int titleCliloc, TextDefinition args, bool retainThroughDeath) : this(iconID, titleCliloc, titleCliloc + 1, args, retainThroughDeath) { }
public BuffInfo(BuffIcon iconID, int titleCliloc, int secondaryCliloc, TimeSpan length, Mobile m, TextDefinition args) : this(iconID, titleCliloc, secondaryCliloc, length, m) { m_Args = args; }
public BuffInfo(BuffIcon iconID, int titleCliloc, int secondaryCliloc, TimeSpan length, Mobile m, TextDefinition args, bool retainThroughDeath) : this(iconID, titleCliloc, secondaryCliloc, length, m) { m_Args = args; m_RetainThroughDeath = retainThroughDeath; }
public static bool IsNullOrEmpty(TextDefinition def) { return(def == null || def.IsEmpty); }
public BuffInfo(BuffIcon iconID, int titleCliloc, TimeSpan length, Mobile m, TextDefinition args, bool retainThroughDeath) : this(iconID, titleCliloc, titleCliloc + 1, length, m, args, retainThroughDeath) { }
public static void AddHtmlText(Gump g, int x, int y, int width, int height, TextDefinition def, bool back, bool scroll) { AddHtmlText(g, x, y, width, height, def, back, scroll, -1, -1); }
public BuffInfo(BuffIcon iconID, int titleCliloc, TimeSpan length, Mobile m, TextDefinition args) : this(iconID, titleCliloc, titleCliloc + 1, length, m, args) { }
public static void AddHtmlText(Server.Gumps.Gump g, int x, int y, int width, int height, TextDefinition text, bool back, bool scroll) { AddHtmlText(g, x, y, width, height, text, back, scroll, -1, -1); }
public BuffInfo(BuffIcon iconID, int titleCliloc, int secondaryCliloc, TextDefinition args, bool retainThroughDeath) : this(iconID, titleCliloc, secondaryCliloc, args) { m_RetainThroughDeath = retainThroughDeath; }
public static void AddHtmlText(Server.Gumps.Gump g, int x, int y, int width, int height, TextDefinition text, bool back, bool scroll, int numberColor, int stringColor) { if (text != null && text.Number > 0) { if (numberColor >= 0) { g.AddHtmlLocalized(x, y, width, height, text.Number, numberColor, back, scroll); } else { g.AddHtmlLocalized(x, y, width, height, text.Number, back, scroll); } } else if (text != null && text.String != null) { if (stringColor >= 0) { g.AddHtml(x, y, width, height, String.Format("<BASEFONT COLOR=#{0:X6}>{1}</BASEFONT>", stringColor, text.String), back, scroll); } else { g.AddHtml(x, y, width, height, text.String, back, scroll); } } }
public RankDefinition( TextDefinition name, int rank, RankFlags flags ) { m_Name = name; m_Rank = rank; m_Flags = flags; }
public CollectionTreasureMap(int level, TextDefinition tooltip, double points) : base(typeof(TreasureMap), 0x14EB, tooltip, 0x0, points) { m_Level = level; }