JEEG84
Sorceror
Hi guys i have found a little bug on RunUO Server : on Osi if i click my corpse after resurrection all Equipped Item (Before PG Death) return Auto-Dressed on PG, on this server this feature is missed.
Hi fix this Bug and i will share this modifiction with Community.
- Go in "RunUO/Server" Folder and open "Mobile.cs" file.
- Find "public virtual void Kill()" fuction and before this line "DeathMoveResult res = GetParentMoveResultFor( item );" add this part of Code :
- Open "Corpse.cs" File and Change "Self Looting Region" contained in "public virtual void Open( Mobile from, bool checkSelfLoot )" Function with this Fixed Code :
- Recompile Your Server and This Bug is Fixed and All Item "Equipped before PG Death" return Auto-Dressed after Corpse Retrived.
Hi fix this Bug and i will share this modifiction with Community.
- Go in "RunUO/Server" Folder and open "Mobile.cs" file.
- Find "public virtual void Kill()" fuction and before this line "DeathMoveResult res = GetParentMoveResultFor( item );" add this part of Code :
Code:
if ( ( item.Insured || item.LootType == LootType.Blessed) && item.Parent == this && item.Layer != Layer.Mount )
equip.Add( item );
- Open "Corpse.cs" File and Change "Self Looting Region" contained in "public virtual void Open( Mobile from, bool checkSelfLoot )" Function with this Fixed Code :
Code:
#region Self Looting
bool selfLoot = ( checkSelfLoot && ( from == m_Owner ) );
if ( selfLoot )
{
List<Item> items = new List<Item>( this.Items );
bool gathered = false;
for ( int k = 0; k < EquipItems.Count; ++k )
{
Item item2 = EquipItems[k];
if ( !items.Contains( item2 ) && item2.IsChildOf( from.Backpack ) )
{
items.Add( item2 );
gathered = true;
}
}
bool didntFit = false;
Container pack = from.Backpack;
bool checkRobe = true;
for ( int i = 0; !didntFit && i < items.Count; ++i )
{
Item item = items[i];
Point3D loc = item.Location;
if ( (item.Layer == Layer.Hair || item.Layer == Layer.FacialHair) || !item.Movable )
continue;
if ( checkRobe )
{
DeathRobe robe = from.FindItemOnLayer( Layer.OuterTorso ) as DeathRobe;
if ( robe != null )
{
if ( Core.SA )
{
robe.Delete();
}
else
{
Map map = from.Map;
if ( map != null && map != Map.Internal )
robe.MoveToWorld( from.Location, map );
}
}
}
if ( m_EquipItems.Contains( item ) && from.EquipItem( item ) )
{
gathered = true;
}
else if ( pack != null && pack.CheckHold( from, item, false, true ) )
{
item.Location = loc;
pack.AddItem( item );
gathered = true;
}
else
{
didntFit = true;
}
}
if ( gathered && !didntFit )
{
SetFlag( CorpseFlag.Carved, true );
if ( ItemID == 0x2006 )
{
ProcessDelta();
SendRemovePacket();
ItemID = Utility.Random( 0xECA, 9 ); // bone graphic
Hue = 0;
ProcessDelta();
}
from.PlaySound( 0x3E3 );
from.SendLocalizedMessage( 1062471 ); // You quickly gather all of your belongings.
items.Clear();
m_EquipItems.Clear();
return;
}
if ( gathered && didntFit )
from.SendLocalizedMessage( 1062472 ); // You gather some of your belongings. The rest remain on the corpse.
}
#endregion
- Recompile Your Server and This Bug is Fixed and All Item "Equipped before PG Death" return Auto-Dressed after Corpse Retrived.