Go Back   RunUO - Ultima Online Emulation > RunUO > Modification Suggestions

Modification Suggestions This is where you can suggest a modifcation to RunUO!

Reply
 
Thread Tools Display Modes
Old 09-17-2006, 08:46 AM   #1 (permalink)
Newbie
 
Join Date: Jan 2004
Location: Germany
Age: 22
Posts: 51
Send a message via ICQ to Quick_silver
Default virtual OnWarmodeChanged

It would be very nice if you add the following lines to the Mobile.cs

Line 7649:
Code:
[CommandProperty( AccessLevel.GameMaster )]
		public bool Warmode
		{
			get
			{
				return m_Warmode;
			}
			set
			{
				if( m_Deleted )
					return;

				if( m_Warmode != value )
				{
					if( m_AutoManifestTimer != null )
					{
						m_AutoManifestTimer.Stop();
						m_AutoManifestTimer = null;
					}

					m_Warmode = value;
					Delta( MobileDelta.Flags );
					OnWarmodeChanged( !m_Warmode );

					if( m_NetState != null )
						Send( SetWarMode.Instantiate( value ) );

					if( !m_Warmode )
						Combatant = null;

					if( !Alive )
					{
						if( value )
							Delta( MobileDelta.GhostUpdate );
						else
							SendRemovePacket( false );
					}
				}
			}
		}

Code:
		public virtual void OnWarmodeChanged( bool oldWarmode )
		{
		}
It is very usefull for custom scripts, to Open gumps on warmode change or other events.
Making the Warmode property virtual could be also nice.
Quick_silver is offline   Reply With Quote
Old 09-17-2006, 11:17 AM   #2 (permalink)
Forum Expert
 
Courageous's Avatar
 
Join Date: Nov 2005
Location: San Diego, CA
Posts: 1,824
Default

If the WarModeChanged(), whatever the current war mode is, by the time your method is called, the old one is it's opposite. It doesn't need to be pushed onto the stack.

My opinion: there's many places in the core that could provide better support for 'hooks' like this one. Yours is a good idea.

C//
Courageous is offline   Reply With Quote
Old 09-18-2006, 04:13 AM   #3 (permalink)
Newbie
 
Join Date: Jan 2004
Location: Germany
Age: 22
Posts: 51
Send a message via ICQ to Quick_silver
Default

Ok, I think the "OldWarmode" is realy useless, but then you can remove the "oldFemale" some lines above, too.
Quick_silver is offline   Reply With Quote
Old 12-13-2006, 04:17 PM   #4 (permalink)
Newbie
 
Join Date: Jan 2004
Location: Germany
Age: 22
Posts: 51
Send a message via ICQ to Quick_silver
Default

Any comments from the coders? Is it possible to add this?
Quick_silver is offline   Reply With Quote
Old 12-13-2006, 05:19 PM   #5 (permalink)
Forum Expert
 
Kenko's Avatar
 
Join Date: Dec 2004
Location: Land of the Poor
Posts: 1,828
Send a message via MSN to Kenko
Default

Of course it is, why don't you add it yourself?
Kenko is offline   Reply With Quote
Old 12-14-2006, 06:07 AM   #6 (permalink)
Forum Expert
 
Join Date: Oct 2002
Age: 45
Posts: 4,330
Default

He's asking if the change can be supported in the official core.
HellRazor is online now   Reply With Quote
Old 07-29-2007, 06:47 AM   #7 (permalink)
Newbie
 
Join Date: Jan 2004
Location: Germany
Age: 22
Posts: 51
Send a message via ICQ to Quick_silver
Default Patch

I wrote a patch file. I Hope anyone will include it before the final release of the 2.0
Attached Files
File Type: zip Mobile_cs_Warmodechange.zip (458 Bytes, 3 views)
Quick_silver is offline   Reply With Quote
Old 09-08-2007, 03:03 PM   #8 (permalink)
Forum Administrator
 
Join Date: Jan 2003
Location: Northern Virginia
Posts: 1,530
Default

I didn't realize this was missing. Implemented SVN 237.

Code:
public virtual void OnWarmodeChanged()
Mark is offline   Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off



Powered by vBulletin® Version 3.7.0
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0 RC5