RunUO Community

This is a sample guest message. Register a free account today to become a member! Once signed in, you'll be able to participate on this site by adding your own topics and posts, as well as connect with other members through your own private inbox!

Core Addition...

Greystar

Wanderer
Core Addition...

Please add the BlessedBy property to items in the core...

the clilocs exist for it... this is what I added (following what was done in BlessedFor).

Code:
		public virtual void AddNameProperties( ObjectPropertyList list )
		{
			AddNameProperty( list );

			if ( IsSecure )
				AddSecureProperty( list );
			else if ( IsLockedDown )
				AddLockedDownProperty( list );

			Mobile blessedFor = this.BlessedFor;

			if ( blessedFor != null && !blessedFor.Deleted )
				AddBlessedForProperty( list, blessedFor );

			#region added by Greystar for PBD
			Mobile blessedBy = this.BlessedBy;

			if (blessedBy != null && !blessedBy.Deleted)
				AddBlessedByProperty(list, blessedby);
			#endregion

			if ( DisplayLootType )
				AddLootTypeProperty( list );

			if ( DisplayWeight )
				AddWeightProperty( list );

			if( QuestItem )
				AddQuestItemProperty( list );


			AppendChildNameProperties( list );
		}

Code:
		#region Added by Greystar for PBD (and consistency)
		/// <summary>
		/// Overridable. Adds the "Blessed by ~1_NAME~" property to the given <see cref="ObjectPropertyList" />.
		/// </summary>
		public virtual void AddBlessedByProperty(ObjectPropertyList list, Mobile m)
		{
			list.Add(1062634, "{0}", m.Name); // Blessed by ~1_NAME~
		}
		#endregion

also this code will need to be added probably near the definition for Blessed for

Code:
            public Mobile m_BlessedBy;

this code added near the BlessedFor property
Code:
		public Mobile BlessedBy
		{
			get
			{
				return m_BlessedFor;
			}
			set
			{
				m_BlessedBy = value;

				InvalidateProperties();
			}
		}
also you'd need to serialize and deser this new variable but it should make it show the property on items, without having to add it seperately to each file (armor/jewelry/weapons/clothing).

The RunUO Dev team used Flags to save this information... I didn't but it should still work fine

Thanks,
Greystar

PS) this is a core mod for anyone else who wants to add it.
 
Top