This commit is contained in:
mark 2009-01-30 23:12:13 +00:00
parent ea0e037770
commit 96a37544fd
17 changed files with 211 additions and 163 deletions

View file

@ -320,8 +320,8 @@ namespace Server.Engines.VeteranRewards
new RewardEntry( etherealSteeds, 1049748, typeof( EtherealBeetle ) )
/*new RewardEntry( houseAddOns, 0, typeof( AnkhDecoration ) )*/
} ),
//TODO: 6th year player statue MArkers
//TODO: 7th year Decorative CAnnon
//TODO: 6th year player statue Markers
//TODO: 7th year Decorative Cannon
//TODO: 8th year Weapon Engraving Tool
//TODO: 9th year Ridable polar bear
};

View file

@ -88,45 +88,53 @@ namespace Server.Gumps
return;
}
Item toGive = null;
if ( m_House.IsAosRules )
if ( m_Mobile.AccessLevel >= AccessLevel.GameMaster )
{
if ( m_House.Price > 0 )
toGive = new BankCheck( m_House.Price );
m_Mobile.SendMessage( "You do not get a refund for your house as you are not a player" );
}
else
{
Item toGive = null;
if ( m_House.IsAosRules )
{
if ( m_House.Price > 0 )
toGive = new BankCheck( m_House.Price );
else
toGive = m_House.GetDeed();
}
else
{
toGive = m_House.GetDeed();
}
else
{
toGive = m_House.GetDeed();
if ( toGive == null && m_House.Price > 0 )
toGive = new BankCheck( m_House.Price );
}
if ( toGive == null && m_House.Price > 0 )
toGive = new BankCheck( m_House.Price );
}
if ( toGive != null )
{
BankBox box = m_Mobile.BankBox;
if ( box.TryDropItem( m_Mobile, toGive, false ) )
if ( toGive != null )
{
if ( toGive is BankCheck )
m_Mobile.SendLocalizedMessage( 1060397, ((BankCheck)toGive).Worth.ToString() ); // ~1_AMOUNT~ gold has been deposited into your bank box.
BankBox box = m_Mobile.BankBox;
m_House.RemoveKeys( m_Mobile );
m_House.Delete();
if ( box.TryDropItem( m_Mobile, toGive, false ) )
{
if ( toGive is BankCheck )
m_Mobile.SendLocalizedMessage( 1060397, ( (BankCheck)toGive ).Worth.ToString() ); // ~1_AMOUNT~ gold has been deposited into your bank box.
m_House.RemoveKeys( m_Mobile );
m_House.Delete();
}
else
{
toGive.Delete();
m_Mobile.SendLocalizedMessage( 500390 ); // Your bank box is full.
}
}
else
{
toGive.Delete();
m_Mobile.SendLocalizedMessage( 500390 ); // Your bank box is full.
m_Mobile.SendMessage( "Unable to refund house." );
}
}
else
{
m_Mobile.SendMessage( "Unable to refund house." );
}
}
else
{

View file

@ -6,12 +6,15 @@ using Server.Network;
namespace Server.Items
{
[FlipableAttribute( 0xe80, 0x9a8 )]
[FlipableAttribute( 0xE80, 0x9A8 )]
public class StrongBox : BaseContainer, IChopable
{
private Mobile m_Owner;
private BaseHouse m_House;
public override double DefaultWeight{ get{ return 100; } }
public override int LabelNumber { get { return 1023712; } }
public StrongBox( Mobile owner, BaseHouse house ) : base( 0xE80 )
{
m_Owner = owner;

View file

@ -65,6 +65,11 @@ namespace Server.Items
break;
}
}
if ( !( m_Commodity is ICommodity ) ) //Apparently, there may be items out there with this. Funky.
{
Timer.DelayCall( TimeSpan.Zero, this.Delete );
}
}
public CommodityDeed( Item commodity ) : base( 0x14F0 )
@ -100,7 +105,7 @@ namespace Server.Items
{
base.GetProperties( list );
if ( m_Commodity != null )
if ( m_Commodity != null && m_Commodity is ICommodity )
list.Add( 1060658, "#{0}\t{1}", ((ICommodity)m_Commodity).DescriptionNumber, m_Commodity.Amount ); // ~1_val~: ~2_val~
}
@ -108,7 +113,7 @@ namespace Server.Items
{
base.OnSingleClick( from );
if ( m_Commodity != null )
if ( m_Commodity != null && m_Commodity is ICommodity )
from.Send( new UnicodeMessage( Serial, ItemID, MessageType.Label, 0x3B2, 3, "ENU", "", ((ICommodity)m_Commodity).Description ) );
}

View file

@ -296,15 +296,8 @@ namespace Server.Items
m_FacialHair = facialhair;
#if false
// This corpse does not turn to bones if:
// (the owner is not a player) and (the owner doesn't have a human body)
m_NoBones = !owner.Player && !owner.Body.IsHuman;
#else
// This corpse does not turn to bones if:
// (the owner is not a player)
// This corpse does not turn to bones if: the owner is not a player
m_NoBones = !owner.Player;
#endif
m_Looters = new List<Mobile>();
m_EquipItems = equipItems;

View file

@ -301,7 +301,7 @@ namespace Server.Items
if ( book == null )
return;
book.m_Entries = new List<RunebookEntry>(); //Currently, when duping, it just copies over the ref over the already made blank ArrayList
book.m_Entries = new List<RunebookEntry>();
for ( int i = 0; i < m_Entries.Count; i++ )
{

View file

@ -202,6 +202,7 @@ namespace Server.Items
else if ( targeted is Item )
{
Item item = (Item)targeted;
int reqCharges = (int)Math.Max( 1, Math.Ceiling( item.TotalWeight / 10.0 ) );
if ( !item.IsChildOf( from.Backpack ) )
{
@ -227,9 +228,13 @@ namespace Server.Items
{
MessageHelper.SendLocalizedMessageTo( m_Bag, from, 1054110, 0x59 ); // Your bank box is full.
}
else if ( Core.ML && reqCharges > m_Bag.Charges )
{
from.SendLocalizedMessage( 1079932 ); //You don't have enough charges to send that much weight
}
else
{
m_Bag.Charges--;
m_Bag.Charges -= (Core.ML ? reqCharges : 1);
MessageHelper.SendLocalizedMessageTo( m_Bag, from, 1054150, 0x59 ); // The item was placed in your bank box.
}

View file

@ -3351,6 +3351,10 @@ namespace Server.Items
if( Core.ML )
{
Attributes.WeaponDamage += (int)(from.Skills.ArmsLore.Value / 20);
if ( Attributes.WeaponDamage > 50 )
Attributes.WeaponDamage = 50;
from.CheckSkill( SkillName.ArmsLore, 0, 100 );
}
}

View file

@ -382,6 +382,8 @@ namespace Server.Mobiles
{
private BaseMount m_Mount;
public override double DefaultWeight { get { return 0; } }
public MountItem( BaseMount mount, int itemID ) : base( itemID )
{
Layer = Layer.Mount;

View file

@ -25,26 +25,26 @@ namespace Server.Mobiles
{
private const int MaxSell = 500;
protected abstract ArrayList SBInfos{ get; }
protected abstract ArrayList SBInfos { get; }
private ArrayList m_ArmorBuyInfo = new ArrayList();
private ArrayList m_ArmorSellInfo = new ArrayList();
private DateTime m_LastRestock;
public override bool CanTeach{ get{ return true; } }
public override bool CanTeach { get { return true; } }
public override bool PlayerRangeSensitive{ get{ return true; } }
public override bool PlayerRangeSensitive { get { return true; } }
public virtual bool IsActiveVendor{ get{ return true; } }
public virtual bool IsActiveBuyer{ get{ return IsActiveVendor; } } // response to vendor SELL
public virtual bool IsActiveSeller{ get{ return IsActiveVendor; } } // repsonse to vendor BUY
public virtual bool IsActiveVendor { get { return true; } }
public virtual bool IsActiveBuyer { get { return IsActiveVendor; } } // response to vendor SELL
public virtual bool IsActiveSeller { get { return IsActiveVendor; } } // repsonse to vendor BUY
public virtual NpcGuild NpcGuild{ get{ return NpcGuild.None; } }
public virtual NpcGuild NpcGuild { get { return NpcGuild.None; } }
public virtual bool IsInvulnerable{ get{ return true; } }
public virtual bool IsInvulnerable { get { return true; } }
public override bool ShowFameTitle{ get{ return false; } }
public override bool ShowFameTitle { get { return false; } }
public virtual bool IsValidBulkOrder( Item item )
{
@ -76,7 +76,7 @@ namespace Server.Mobiles
Town town = Town.FromRegion( this.Region );
if ( town != null )
return (100 + town.Tax);
return ( 100 + town.Tax );
return 100;
}
@ -84,7 +84,7 @@ namespace Server.Mobiles
public void UpdateBuyInfo()
{
int priceScalar = GetPriceScalar();
IBuyItemInfo[] buyinfo = (IBuyItemInfo[])m_ArmorBuyInfo.ToArray( typeof( IBuyItemInfo ) );
if ( buyinfo != null )
@ -100,7 +100,8 @@ namespace Server.Mobiles
private Mobile m_From;
private BaseVendor m_Vendor;
public BulkOrderInfoEntry( Mobile from, BaseVendor vendor ) : base( 6152, 6 )
public BulkOrderInfoEntry( Mobile from, BaseVendor vendor )
: base( 6152, 6 )
{
m_From = from;
m_Vendor = vendor;
@ -113,10 +114,10 @@ namespace Server.Mobiles
TimeSpan ts = m_Vendor.GetNextBulkOrder( m_From );
int totalSeconds = (int)ts.TotalSeconds;
int totalHours = (totalSeconds + 3599) / 3600;
int totalMinutes = (totalSeconds + 59) / 60;
int totalHours = ( totalSeconds + 3599 ) / 3600;
int totalMinutes = ( totalSeconds + 59 ) / 60;
if ( ((Core.SE ) ? totalMinutes == 0 : totalHours == 0) )
if ( ( ( Core.SE ) ? totalMinutes == 0 : totalHours == 0 ) )
{
m_From.SendLocalizedMessage( 1049038 ); // You can get an order now.
@ -134,8 +135,8 @@ namespace Server.Mobiles
{
int oldSpeechHue = m_Vendor.SpeechHue;
m_Vendor.SpeechHue = 0x3B2;
if( Core.SE )
if ( Core.SE )
m_Vendor.SayTo( m_From, 1072058, totalMinutes.ToString() ); // An offer may be available in about ~1_minutes~ minutes.
else
m_Vendor.SayTo( m_From, 1049039, totalHours.ToString() ); // An offer may be available in about ~1_hours~ hours.
@ -146,7 +147,8 @@ namespace Server.Mobiles
}
}
public BaseVendor( string title ) : base( AIType.AI_Vendor, FightMode.None, 2, 1, 0.5, 2 )
public BaseVendor( string title )
: base( AIType.AI_Vendor, FightMode.None, 2, 1, 0.5, 2 )
{
LoadSBInfo();
@ -170,8 +172,9 @@ namespace Server.Mobiles
m_LastRestock = DateTime.Now;
}
public BaseVendor( Serial serial ) : base( serial )
public BaseVendor( Serial serial )
: base( serial )
{
}
@ -215,7 +218,7 @@ namespace Server.Mobiles
public abstract void InitSBInfo();
public virtual bool IsTokunoVendor{ get{ return ( Map == Map.Tokuno ); } }
public virtual bool IsTokunoVendor { get { return ( Map == Map.Tokuno ); } }
protected void LoadSBInfo()
{
@ -294,7 +297,7 @@ namespace Server.Mobiles
public virtual VendorShoeType ShoeType
{
get{ return VendorShoeType.Shoes; }
get { return VendorShoeType.Shoes; }
}
public virtual int RandomBrightHue()
@ -352,7 +355,7 @@ namespace Server.Mobiles
if ( !Region.IsPartOf( "Gargoyle City" ) )
return false;
if ( Body != 0x2F6 || (Hue & 0x8000) == 0 )
if ( Body != 0x2F6 || ( Hue & 0x8000 ) == 0 )
TurnToGargoyle();
return true;
@ -551,7 +554,7 @@ namespace Server.Mobiles
List<ObjectPropertyList> opls = null;
for (int idx=0;idx<buyInfo.Length;idx++)
for ( int idx = 0; idx < buyInfo.Length; idx++ )
{
IBuyItemInfo buyItem = (IBuyItemInfo)buyInfo[idx];
@ -559,10 +562,10 @@ namespace Server.Mobiles
continue;
// NOTE: Only GBI supported; if you use another implementation of IBuyItemInfo, this will crash
GenericBuyInfo gbi = (GenericBuyInfo) buyItem;
GenericBuyInfo gbi = (GenericBuyInfo)buyItem;
IEntity disp = gbi.GetDisplayEntity();
list.Add( new BuyItemState( buyItem.Name, cont.Serial, disp == null ? (Serial) 0x7FC0FFEE : disp.Serial, buyItem.Price, buyItem.Amount, buyItem.ItemID, buyItem.Hue ) );
list.Add( new BuyItemState( buyItem.Name, cont.Serial, disp == null ? (Serial)0x7FC0FFEE : disp.Serial, buyItem.Price, buyItem.Amount, buyItem.ItemID, buyItem.Hue ) );
count++;
if ( opls == null ) {
@ -585,7 +588,7 @@ namespace Server.Mobiles
Item item = playerItems[i];
if ( (item.LastMoved + InventoryDecayTime) <= DateTime.Now )
if ( ( item.LastMoved + InventoryDecayTime ) <= DateTime.Now )
item.Delete();
}
@ -596,7 +599,7 @@ namespace Server.Mobiles
int price = 0;
string name = null;
foreach( IShopSellInfo ssi in sellInfo )
foreach ( IShopSellInfo ssi in sellInfo )
{
if ( ssi.IsSellable( item ) )
{
@ -631,7 +634,7 @@ namespace Server.Mobiles
if ( from.NetState == null )
return;
if ( from.NetState.IsPost6017 )
from.Send( new VendorBuyContent6017( list ) );
else
@ -712,7 +715,7 @@ namespace Server.Mobiles
foreach ( Item item in items )
{
if ( item is Container && ((Container)item).Items.Count != 0 )
if ( item is Container && ( (Container)item ).Items.Count != 0 )
continue;
if ( item.IsStandardLoot() && item.Movable && ssi.IsSellable( item ) )
@ -742,7 +745,7 @@ namespace Server.Mobiles
SayTo( from, 1045130 ); // That order is for some other shopkeeper.
return false;
}
else if ( (dropped is SmallBOD && !((SmallBOD)dropped).Complete) || (dropped is LargeBOD && !((LargeBOD)dropped).Complete) )
else if ( ( dropped is SmallBOD && !( (SmallBOD)dropped ).Complete ) || ( dropped is LargeBOD && !( (LargeBOD)dropped ).Complete ) )
{
SayTo( from, 1045131 ); // You have not completed the order yet.
return false;
@ -752,9 +755,9 @@ namespace Server.Mobiles
int gold, fame;
if ( dropped is SmallBOD )
((SmallBOD)dropped).GetRewards( out reward, out gold, out fame );
( (SmallBOD)dropped ).GetRewards( out reward, out gold, out fame );
else
((LargeBOD)dropped).GetRewards( out reward, out gold, out fame );
( (LargeBOD)dropped ).GetRewards( out reward, out gold, out fame );
from.SendSound( 0x3D );
@ -849,7 +852,7 @@ namespace Server.Mobiles
if ( cont == null || !cont.TryDropItem( buyer, item, false ) )
item.MoveToWorld( buyer.Location, buyer.Map );
for (int i=1;i<amount;i++)
for ( int i = 1; i < amount; i++ )
{
item = bii.GetEntity() as Item;
@ -872,7 +875,7 @@ namespace Server.Mobiles
m.PlaySound( m.GetIdleSound() );
if ( m is BaseCreature )
((BaseCreature)m).SetControlMaster( buyer );
( (BaseCreature)m ).SetControlMaster( buyer );
for ( int i = 1; i < amount; ++i )
{
@ -884,7 +887,7 @@ namespace Server.Mobiles
m.MoveToWorld( buyer.Location, buyer.Map );
if ( m is BaseCreature )
((BaseCreature)m).SetControlMaster( buyer );
( (BaseCreature)m ).SetControlMaster( buyer );
}
}
}
@ -934,7 +937,7 @@ namespace Server.Mobiles
{
ProcessSinglePurchase( buy, gbi, validBuy, ref controlSlots, ref fullPurchase, ref totalCost );
}
else if ( item.RootParent == this )
else if ( item != this.BuyPack && item.IsChildOf( this.BuyPack ) )
{
if ( amount > item.Amount )
amount = item.Amount;
@ -1104,14 +1107,14 @@ namespace Server.Mobiles
public virtual bool CheckVendorAccess( Mobile from )
{
GuardedRegion reg = (GuardedRegion) this.Region.GetRegion( typeof( GuardedRegion ) );
GuardedRegion reg = (GuardedRegion)this.Region.GetRegion( typeof( GuardedRegion ) );
if ( reg != null && !reg.CheckVendorAccess( this, from ) )
return false;
if ( this.Region != from.Region )
{
reg = (GuardedRegion) from.Region.GetRegion( typeof( GuardedRegion ) );
reg = (GuardedRegion)from.Region.GetRegion( typeof( GuardedRegion ) );
if ( reg != null && !reg.CheckVendorAccess( this, from ) )
return false;
@ -1146,10 +1149,10 @@ namespace Server.Mobiles
foreach ( SellItemResponse resp in list )
{
if ( resp.Item.RootParent != seller || resp.Amount <= 0 || !resp.Item.IsStandardLoot() || !resp.Item.Movable || (resp.Item is Container && ((Container)resp.Item).Items.Count != 0) )
if ( resp.Item.RootParent != seller || resp.Amount <= 0 || !resp.Item.IsStandardLoot() || !resp.Item.Movable || ( resp.Item is Container && ( (Container)resp.Item ).Items.Count != 0 ) )
continue;
foreach( IShopSellInfo ssi in info )
foreach ( IShopSellInfo ssi in info )
{
if ( ssi.IsSellable( resp.Item ) )
{
@ -1163,7 +1166,7 @@ namespace Server.Mobiles
{
SayTo( seller, true, "You may only sell {0} items at a time!", MaxSell );
return false;
}
}
else if ( Sold == 0 )
{
return true;
@ -1171,10 +1174,10 @@ namespace Server.Mobiles
foreach ( SellItemResponse resp in list )
{
if ( resp.Item.RootParent != seller || resp.Amount <= 0 || !resp.Item.IsStandardLoot() || !resp.Item.Movable || (resp.Item is Container && ((Container)resp.Item).Items.Count != 0) )
if ( resp.Item.RootParent != seller || resp.Amount <= 0 || !resp.Item.IsStandardLoot() || !resp.Item.Movable || ( resp.Item is Container && ( (Container)resp.Item ).Items.Count != 0 ) )
continue;
foreach( IShopSellInfo ssi in info )
foreach ( IShopSellInfo ssi in info )
{
if ( ssi.IsSellable( resp.Item ) )
{
@ -1232,7 +1235,7 @@ namespace Server.Mobiles
resp.Item.Delete();
}
GiveGold += ssi.GetSellPriceFor( resp.Item )*amount;
GiveGold += ssi.GetSellPriceFor( resp.Item ) * amount;
break;
}
}
@ -1262,7 +1265,7 @@ namespace Server.Mobiles
}
//no cliloc for this?
//SayTo( seller, true, "Thank you! I bought {0} item{1}. Here is your {2}gp.", Sold, (Sold > 1 ? "s" : ""), GiveGold );
return true;
}
@ -1270,7 +1273,7 @@ namespace Server.Mobiles
{
base.Serialize( writer );
writer.Write( (int) 1 ); // version
writer.Write( (int)1 ); // version
ArrayList sbInfos = this.SBInfos;
@ -1298,7 +1301,7 @@ namespace Server.Mobiles
if ( doubled > 0 )
{
writer.WriteEncodedInt( 1 + ((j * sbInfos.Count) + i) );
writer.WriteEncodedInt( 1 + ( ( j * sbInfos.Count ) + i ) );
writer.WriteEncodedInt( doubled );
}
}
@ -1320,48 +1323,48 @@ namespace Server.Mobiles
switch ( version )
{
case 1:
{
int index;
while ( (index = reader.ReadEncodedInt()) > 0 )
{
int doubled = reader.ReadEncodedInt();
int index;
if ( sbInfos != null )
while ( ( index = reader.ReadEncodedInt() ) > 0 )
{
index -= 1;
int sbInfoIndex = index % sbInfos.Count;
int buyInfoIndex = index / sbInfos.Count;
if ( sbInfoIndex >= 0 && sbInfoIndex < sbInfos.Count )
int doubled = reader.ReadEncodedInt();
if ( sbInfos != null )
{
SBInfo sbInfo = (SBInfo)sbInfos[sbInfoIndex];
ArrayList buyInfo = sbInfo.BuyInfo;
index -= 1;
int sbInfoIndex = index % sbInfos.Count;
int buyInfoIndex = index / sbInfos.Count;
if ( buyInfo != null && buyInfoIndex >= 0 && buyInfoIndex < buyInfo.Count )
if ( sbInfoIndex >= 0 && sbInfoIndex < sbInfos.Count )
{
GenericBuyInfo gbi = (GenericBuyInfo)buyInfo[buyInfoIndex];
SBInfo sbInfo = (SBInfo)sbInfos[sbInfoIndex];
ArrayList buyInfo = sbInfo.BuyInfo;
int amount = 20;
switch ( doubled )
if ( buyInfo != null && buyInfoIndex >= 0 && buyInfoIndex < buyInfo.Count )
{
case 1: amount = 40; break;
case 2: amount = 80; break;
case 3: amount = 160; break;
case 4: amount = 320; break;
case 5: amount = 640; break;
case 6: amount = 999; break;
}
GenericBuyInfo gbi = (GenericBuyInfo)buyInfo[buyInfoIndex];
gbi.Amount = gbi.MaxAmount = amount;
int amount = 20;
switch ( doubled )
{
case 1: amount = 40; break;
case 2: amount = 80; break;
case 3: amount = 160; break;
case 4: amount = 320; break;
case 5: amount = 640; break;
case 6: amount = 999; break;
}
gbi.Amount = gbi.MaxAmount = amount;
}
}
}
}
}
break;
}
break;
}
}
if ( IsParagon )
@ -1413,7 +1416,8 @@ namespace Server.ContextMenus
{
private BaseVendor m_Vendor;
public VendorBuyEntry( Mobile from, BaseVendor vendor ) : base( 6103, 8 )
public VendorBuyEntry( Mobile from, BaseVendor vendor )
: base( 6103, 8 )
{
m_Vendor = vendor;
Enabled = vendor.CheckVendorAccess( from );
@ -1429,7 +1433,8 @@ namespace Server.ContextMenus
{
private BaseVendor m_Vendor;
public VendorSellEntry( Mobile from, BaseVendor vendor ) : base( 6104, 8 )
public VendorSellEntry( Mobile from, BaseVendor vendor )
: base( 6104, 8 )
{
m_Vendor = vendor;
Enabled = vendor.CheckVendorAccess( from );
@ -1459,7 +1464,7 @@ namespace Server
bool IsSellable( Item item );
//What do we sell?
Type[] Types{ get; }
Type[] Types { get; }
//does the vendor resell this item?
bool IsResellable( Item item );
@ -1470,27 +1475,27 @@ namespace Server
//get a new instance of an object (we just bought it)
IEntity GetEntity();
int ControlSlots{ get; }
int ControlSlots { get; }
int PriceScalar{ get; set; }
int PriceScalar { get; set; }
//display price of the item
int Price{ get; }
int Price { get; }
//display name of the item
string Name{ get; }
string Name { get; }
//display hue
int Hue{ get; }
int Hue { get; }
//display id
int ItemID{ get; }
int ItemID { get; }
//amount in stock
int Amount{ get; set; }
int Amount { get; set; }
//max amount in stock
int MaxAmount{ get; }
int MaxAmount { get; }
//Attempt to restock with item, (return true if restock sucessful)
bool Restock( Item item, int amount );

View file

@ -894,32 +894,32 @@ namespace Server.Multis
int cost = newPrice - oldPrice;
if ( !this.Deleted ) { // Temporary Fix. We should be booting a client out of customization mode in the delete handler.
if ( from.AccessLevel >= AccessLevel.GameMaster && cost != 0 )
{
from.SendMessage( "{0} gold would have been {1} your bank if you were not a GM.", cost.ToString(), ((cost > 0 )? "withdrawn from" : "deposited into" ) );
}
else
{
if ( cost > 0 )
{
if ( Banker.Withdraw( from, cost ) )
{
from.SendLocalizedMessage( 1060398, cost.ToString() ); // ~1_AMOUNT~ gold has been withdrawn from your bank box.
}
else
{
from.SendLocalizedMessage( 1061903 ); // You cannot commit this house design, because you do not have the necessary funds in your bank box to pay for the upgrade. Please back up your design, obtain the required funds, and commit your design again.
return;
}
}
else if ( cost < 0 )
{
if ( from.AccessLevel >= AccessLevel.GameMaster && cost != 0 )
{
from.SendMessage( "{0} gold would have been {1} your bank if you were not a GM.", cost.ToString(), ((cost > 0 )? "withdrawn from" : "deposited into" ) );
}
else
{
if ( cost > 0 )
{
if ( Banker.Withdraw( from, cost ) )
{
from.SendLocalizedMessage( 1060398, cost.ToString() ); // ~1_AMOUNT~ gold has been withdrawn from your bank box.
}
else
{
from.SendLocalizedMessage( 1061903 ); // You cannot commit this house design, because you do not have the necessary funds in your bank box to pay for the upgrade. Please back up your design, obtain the required funds, and commit your design again.
return;
}
}
else if ( cost < 0 )
{
if ( Banker.Deposit( from, -cost ) )
from.SendLocalizedMessage( 1060397, ( -cost ).ToString() ); // ~1_AMOUNT~ gold has been deposited into your bank box.
else
return;
}
}
from.SendLocalizedMessage( 1060397, ( -cost ).ToString() ); // ~1_AMOUNT~ gold has been deposited into your bank box.
else
return;
}
}
}
/* Client chose to commit current design state

View file

@ -2,7 +2,6 @@ using System;
using System.Collections;
using System.Collections.Generic;
using Server;
using Server.Items;
using Server.Regions;
namespace Server.Multis

View file

@ -583,6 +583,12 @@ namespace Server.Spells
return false;
}
if( caster != null && caster.AccessLevel == AccessLevel.Player && caster.Region.IsPartOf( typeof( Regions.Jail ) ) )
{
caster.SendLocalizedMessage( 1042632 ); // You'll need a better jailbreak plan then that!
return false;
}
m_TravelCaster = caster;
m_TravelType = type;