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!

Trying to hide FameTitle with an item.

Packer898

Knight
LOL ok thanks to a few PM's and smacks across the head from spider got it fixed and it works like a charm now... Just incase anyone looks this up the problem was I was putting the bool in the mask class and it should have been in playermobile.cs :eek:

Once again thanks arul, Khaz and XxSP1DERxX! +Karma for everyone!
 

arul

Sorceror
Packer898 said:
LOL ok thanks to a few PM's and smacks across the head from spider got it fixed and it works like a charm now... Just incase anyone looks this up the problem was I was putting the bool in the mask class and it should have been in playermobile.cs :eek:

Once again thanks arul, Khaz and XxSP1DERxX! +Karma for everyone!
Glad you get it work in any way ;)

Btw. thanks to anonymous people who gave me negative karma, I laughed a lot about his reason :D
 

Rabban

Sorceror
Not to beat this to death with stick, but my initial thoughts would be for the item to save the player's fame, and then set it to zero on equip, and then on unequip, replace the fame (the only problem would be you'd have to consider equipping more than one such item). Sounds relatively simple as opposed to the previous suggestions. However there would be bugs because at 0 fame, you gain fame faster AND what if you gained fame back up to 5000 or whatever and then you'd have the title showing again (so maybe disable fame gain when the item is equipped). So I guess nevermind...
 

Packer898

Knight
arul said:
Glad you get it work in any way ;)

Btw. thanks to anonymous people who gave me negative karma, I laughed a lot about his reason :D

Sorry you got negative karma for trying to help me. =( Ill try to keep you padded to make up for it. =)
 

Packer898

Knight
OOO One last question... How would I make this so that It could be other items besides helm layered ones? Its obvious that I wouldnt be able to add one for each layer so remove the FindItemOnLayer?
Code:
public override bool ShowFameTitle{ get{ return !(FindItemOnLayer( Layer.Helm ) is INoFameTitle); } }
 

arul

Sorceror
Packer898 said:
OOO One last question... How would I make this so that It could be other items besides helm layered ones? Its obvious that I wouldnt be able to add one for each layer so remove the FindItemOnLayer?
Code:
public override bool ShowFameTitle{ get{ return !(FindItemOnLayer( Layer.Helm ) is INoFameTitle); } }
I suggest this
Code:
public override bool ShowFameTitle
{
     get 
     {
            foreach ( Layer layer in Enum.GetValues( typeof( Layer ) ) )
                if ( FindItemOnLayer( layer ) is INoFameTitle )
                    return false;
            return true;
     }
}
 

Kamron

Knight
Packer, if you were doing this, then I would suggest at this point to modify the core and add the set accessor. I still would not suggest the slave set accessor.

The reason is because there are alot of layers, and this is used fairly repeatedly, so this loop would cause a slight bit more of resources to be used when its not necessary.
 

Packer898

Knight
Yeah =( I am using a modified core but wasnt wanting to recompile it again. =( But I might just do that, I will look at mobile.cs and check on doing that.
 
Top