|
||
|
|||||||
| General Discussion General discussion for the RunUO community, all off-topic posts will be deleted. This forum is NOT FOR SUPPORT! |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 (permalink) |
|
Whenever i dupe something... heres an exp... If I made a katana and turned on vanquishing, then i duped the sword, only the new creation would be a vanquish katana, the first sword would just become a regular katana. I'm sure this is a well known problem with some people if not everyone. Is there a revised script to fix this?
|
|
|
|
|
|
|
#2 (permalink) |
|
Guest
Posts: n/a
|
Use this tweak i wrote:
[code:1] private static void DupeProperties ( Item src, Item dest, params string[] ignore ) { Console.WriteLine("Property dupe, src = \'{0}\' dest = \'{1}\'",src.Serial.Value,dest.Serial.Value ); PropertyInfo[] pi_src = src.GetType().GetProperties(); PropertyInfo[] pi_dest = src.GetType().GetProperties(); for ( int i = 0; i < pi_src.Length; i++ ) { bool bValid = true; for ( int j = 0; j < ignore.Length; j++ ) { if ( pi_src[i].Name == ignore[j] ) bValid = false; } if ( ( pi_dest[i].GetSetMethod() != null ) && (bValid) ) { pi_dest[i].SetValue(dest,pi_src[i].GetValue(src,nu ll),null); Console.WriteLine (" - {0} {1} = {2}", pi_dest[i].PropertyType.Name,pi_dest[i].Name,pi_de st[i].GetValue(dest,null)); } } } [/code:1] Now, put [code:1]DupeProperties ( copy as Item, item as Item,"Location","Parent");[/code:1] after [code:1]copy.MoveToWorld( from.Location, from.Map );[/code:1] on DupeTarget.OnTarget() |
|
![]() |
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|