- ConPVP: Help menu will no longer move players out of houses inside SafeZones.
- Player barkeeper hair changes will now correctly update in the client. - Fixed hueing and removal of player barkeeper hair. - Corrected the Self Repair mod on Brightsight Lenses. - Fixed ElvenGlasses' WeaponAttributes property to be openable in the properties gump. - Removed the Damage Increase property from Quiver of Infinity (this was replaced by Damage Modifier a while ago). - Added a system message when trying to equip a talisman owned by someone else. - Fixed a water floor tile acting like a wall in house customization.
This commit is contained in:
parent
53228d30db
commit
24eca5c9c8
7 changed files with 159 additions and 69 deletions
|
|
@ -594,13 +594,30 @@ namespace Server.Gumps
|
|||
if ( Categories[cat].Layer == Layer.FacialHair )
|
||||
{
|
||||
if ( m_Vendor.Female )
|
||||
from.SendLocalizedMessage( 1010639 ); // You cannot place facial hair on a woman!
|
||||
{
|
||||
from.SendLocalizedMessage( 1010639 ); // You cannot place facial hair on a woman!
|
||||
}
|
||||
else
|
||||
{
|
||||
int hue = m_Vendor.FacialHairHue;
|
||||
|
||||
m_Vendor.FacialHairItemID = 0;
|
||||
m_Vendor.ProcessDelta(); // invalidate item ID for clients
|
||||
|
||||
m_Vendor.FacialHairItemID = Categories[cat].Entries[ent].ItemID;
|
||||
m_Vendor.FacialHairHue = hue;
|
||||
}
|
||||
}
|
||||
else if ( Categories[cat].Layer == Layer.Hair )
|
||||
m_Vendor.HairItemID = Categories[cat].Entries[ent].ItemID;
|
||||
{
|
||||
int hue = m_Vendor.HairHue;
|
||||
|
||||
m_Vendor.HairItemID = 0;
|
||||
m_Vendor.ProcessDelta(); // invalidate item ID for clients
|
||||
|
||||
m_Vendor.HairItemID = Categories[cat].Entries[ent].ItemID;
|
||||
m_Vendor.HairHue = hue;
|
||||
}
|
||||
else
|
||||
{
|
||||
item = Categories[cat].Entries[ent].Create();
|
||||
|
|
@ -625,24 +642,37 @@ namespace Server.Gumps
|
|||
{
|
||||
if ( cat < Categories.Length && cat >= 0 )
|
||||
{
|
||||
Item item = null;
|
||||
CustomCategory category = Categories[cat];
|
||||
|
||||
List<Item> items = m_Vendor.Items;
|
||||
|
||||
for ( int i = 0; item == null && i < items.Count; ++i )
|
||||
if ( category.Layer == Layer.Hair )
|
||||
{
|
||||
Item checkitem = items[i];
|
||||
Type type = checkitem.GetType();
|
||||
|
||||
for ( int j = 0; item == null && j < Categories[cat].Entries.Length; ++j )
|
||||
{
|
||||
if ( type == Categories[cat].Entries[j].Type )
|
||||
item = checkitem;
|
||||
}
|
||||
new PVHairHuePicker( false, m_Vendor, from ).SendTo( state );
|
||||
}
|
||||
else if ( category.Layer == Layer.FacialHair )
|
||||
{
|
||||
new PVHairHuePicker( true, m_Vendor, from ).SendTo( state );
|
||||
}
|
||||
else
|
||||
{
|
||||
Item item = null;
|
||||
|
||||
if ( item != null )
|
||||
new PVHuePicker( item, m_Vendor, from ).SendTo( state );
|
||||
List<Item> items = m_Vendor.Items;
|
||||
|
||||
for ( int i = 0; item == null && i < items.Count; ++i )
|
||||
{
|
||||
Item checkitem = items[i];
|
||||
Type type = checkitem.GetType();
|
||||
|
||||
for ( int j = 0; item == null && j < category.Entries.Length; ++j )
|
||||
{
|
||||
if ( type == category.Entries[j].Type )
|
||||
item = checkitem;
|
||||
}
|
||||
}
|
||||
|
||||
if ( item != null )
|
||||
new PVHuePicker( item, m_Vendor, from ).SendTo( state );
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
|
|
@ -651,24 +681,37 @@ namespace Server.Gumps
|
|||
|
||||
if ( cat < Categories.Length && cat >= 0 )
|
||||
{
|
||||
Item item = null;
|
||||
CustomCategory category = Categories[cat];
|
||||
|
||||
List<Item> items = m_Vendor.Items;
|
||||
|
||||
for ( int i = 0; item == null && i < items.Count; ++i )
|
||||
if ( category.Layer == Layer.Hair )
|
||||
{
|
||||
Item checkitem = items[i];
|
||||
Type type = checkitem.GetType();
|
||||
|
||||
for ( int j = 0; item == null && j < Categories[cat].Entries.Length; ++j )
|
||||
{
|
||||
if ( type == Categories[cat].Entries[j].Type )
|
||||
item = checkitem;
|
||||
}
|
||||
m_Vendor.HairItemID = 0;
|
||||
}
|
||||
else if ( category.Layer == Layer.FacialHair )
|
||||
{
|
||||
m_Vendor.FacialHairItemID = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
Item item = null;
|
||||
|
||||
if ( item != null )
|
||||
item.Delete();
|
||||
List<Item> items = m_Vendor.Items;
|
||||
|
||||
for ( int i = 0; item == null && i < items.Count; ++i )
|
||||
{
|
||||
Item checkitem = items[i];
|
||||
Type type = checkitem.GetType();
|
||||
|
||||
for ( int j = 0; item == null && j < category.Entries.Length; ++j )
|
||||
{
|
||||
if ( type == category.Entries[j].Type )
|
||||
item = checkitem;
|
||||
}
|
||||
}
|
||||
|
||||
if ( item != null )
|
||||
item.Delete();
|
||||
}
|
||||
|
||||
from.SendGump( new PlayerVendorCustomizeGump( m_Vendor, from ) );
|
||||
}
|
||||
|
|
@ -683,10 +726,10 @@ namespace Server.Gumps
|
|||
private Mobile m_Vendor;
|
||||
private Mobile m_Mob;
|
||||
|
||||
public PVHuePicker( Item item, Mobile v, Mobile from ) : base( (item.Layer == Layer.Hair || item.Layer == Layer.FacialHair) ? 0xFAB : item.ItemID )
|
||||
public PVHuePicker( Item item, Mobile v, Mobile from ) : base( item.ItemID )
|
||||
{
|
||||
m_Vendor = v;
|
||||
m_Item = item;
|
||||
m_Vendor = v;
|
||||
m_Mob = from;
|
||||
}
|
||||
|
||||
|
|
@ -705,6 +748,39 @@ namespace Server.Gumps
|
|||
m_Mob.SendGump( new PlayerVendorCustomizeGump( m_Vendor, m_Mob ) );
|
||||
}
|
||||
}
|
||||
|
||||
private class PVHairHuePicker : HuePicker
|
||||
{
|
||||
private bool m_FacialHair;
|
||||
private Mobile m_Vendor;
|
||||
private Mobile m_Mob;
|
||||
|
||||
public PVHairHuePicker( bool facialHair, Mobile v, Mobile from ) : base( 0xFAB )
|
||||
{
|
||||
m_FacialHair = facialHair;
|
||||
m_Vendor = v;
|
||||
m_Mob = from;
|
||||
}
|
||||
|
||||
public override void OnResponse( int hue )
|
||||
{
|
||||
if ( m_Vendor.Deleted )
|
||||
return;
|
||||
|
||||
if ( m_Vendor is PlayerVendor && !((PlayerVendor)m_Vendor).CanInteractWith( m_Mob, true ) )
|
||||
return;
|
||||
|
||||
if ( m_Vendor is PlayerBarkeeper && !((PlayerBarkeeper)m_Vendor).IsOwner( m_Mob ) )
|
||||
return;
|
||||
|
||||
if ( m_FacialHair )
|
||||
m_Vendor.FacialHairHue = hue;
|
||||
else
|
||||
m_Vendor.HairHue = hue;
|
||||
|
||||
m_Mob.SendGump( new PlayerVendorCustomizeGump( m_Vendor, m_Mob ) );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public class NewPlayerVendorCustomizeGump : Gump
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue