|
||
|
|||||||
| Modification Suggestions This is where you can suggest a modifcation to RunUO! |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 (permalink) |
|
Forum Expert
Join Date: Feb 2004
Age: 27
Posts: 1,834
|
The mobile got a public virtual void OnMapChange( Map oldMap )
but the item doesn't remember the old map in OnMapChange(). So I'd like to have that changed to something working like in the Mobile.cs, if possible. |
|
|
|
|
|
#2 (permalink) | |
|
Account Terminated
|
Quote:
|
|
|
|
|
|
|
#3 (permalink) |
|
Forum Expert
Join Date: Feb 2004
Age: 27
Posts: 1,834
|
In the Item class:
Code:
[CommandProperty( AccessLevel.Counselor, AccessLevel.GameMaster )]
public Map Map
{
get
{
return m_Map;
}
set
{
if ( m_Map != value )
{
Map old = m_Map;
if ( m_Map != null && m_Parent == null )
{
m_Map.OnLeave( this );
SendRemovePacket();
}
List<Item> items = LookupItems();
if ( items != null )
{
for ( int i = 0; i < items.Count; ++i )
items[i].Map = value;
}
m_Map = value;
if ( m_Map != null && m_Parent == null )
m_Map.OnEnter( this );
Delta( ItemDelta.Update );
this.OnMapChange();
if ( old == null || old == Map.Internal )
InvalidateProperties();
}
}
}
|
|
|
|
|
|
#6 (permalink) |
|
Newbie
Join Date: Jun 2006
Posts: 94
|
My point was to rewrite the OnMapChange function to say
public virtual void OnMapChange( Map oldmap ) { blah blah } Then where it says this.OnMapChange(); in the Map property, change it to this.OnMapChange( old ); And you are done. |
|
|
|
![]() |
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|