branch sync #2
This commit is contained in:
parent
96a37544fd
commit
4e6256b8cd
39 changed files with 415 additions and 137 deletions
|
|
@ -200,10 +200,15 @@ namespace Server.Multis
|
|||
if ( Deleted )
|
||||
return;
|
||||
|
||||
if ( Core.ML )
|
||||
new TempNoHousingRegion( this );
|
||||
|
||||
KillVendors();
|
||||
Delete();
|
||||
}
|
||||
|
||||
public virtual TimeSpan RestrictedPlacingTime { get { return TimeSpan.FromHours( 1.0 ); } }
|
||||
|
||||
[CommandProperty( AccessLevel.GameMaster )]
|
||||
public virtual double BonusStorageScalar { get { return (Core.ML ? 1.2 : 1.0); } }
|
||||
|
||||
|
|
@ -3384,6 +3389,8 @@ namespace Server.Multis
|
|||
}
|
||||
}
|
||||
|
||||
#region Targets
|
||||
|
||||
public class LockdownTarget : Target
|
||||
{
|
||||
private bool m_Release;
|
||||
|
|
@ -3648,6 +3655,8 @@ namespace Server.Multis
|
|||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
public class SetSecureLevelEntry : ContextMenuEntry
|
||||
{
|
||||
private Item m_Item;
|
||||
|
|
@ -3713,4 +3722,20 @@ namespace Server.Multis
|
|||
Owner.From.SendGump( new SetSecureLevelGump( Owner.From, sec, BaseHouse.FindHouseAt( m_Item ) ) );
|
||||
}
|
||||
}
|
||||
|
||||
public class TempNoHousingRegion : BaseRegion
|
||||
{
|
||||
public TempNoHousingRegion( BaseHouse house )
|
||||
: base( null, house.Map, Region.DefaultPriority, house.Region.Area )
|
||||
{
|
||||
Register();
|
||||
|
||||
Timer.DelayCall( house.RestrictedPlacingTime, Unregister );
|
||||
}
|
||||
|
||||
public override bool AllowHousing( Mobile from, Point3D p )
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -200,6 +200,11 @@ namespace Server.Multis.Deeds
|
|||
from.SendLocalizedMessage( 501265 ); // Housing cannot be created in this area.
|
||||
break;
|
||||
}
|
||||
case HousePlacementResult.BadRegionTemp:
|
||||
{
|
||||
from.SendLocalizedMessage( 501270 ); //Lord British has decreed a 'no build' period, thus you cannot build this house at this time.
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -14,7 +14,8 @@ namespace Server.Multis
|
|||
BadStatic,
|
||||
BadItem,
|
||||
NoSurface,
|
||||
BadRegionHidden
|
||||
BadRegionHidden,
|
||||
BadRegionTemp
|
||||
}
|
||||
|
||||
public class HousePlacement
|
||||
|
|
@ -106,6 +107,9 @@ namespace Server.Multis
|
|||
|
||||
if ( !reg.AllowHousing( from, testPoint ) ) // Cannot place houses in dungeons, towns, treasure map areas etc
|
||||
{
|
||||
if ( reg.IsPartOf( typeof( TempNoHousingRegion ) ) )
|
||||
return HousePlacementResult.BadRegionTemp;
|
||||
|
||||
if ( reg.IsPartOf( typeof( TreasureRegion ) ) )
|
||||
return HousePlacementResult.BadRegionHidden;
|
||||
|
||||
|
|
|
|||
|
|
@ -423,6 +423,11 @@ namespace Server.Items
|
|||
from.SendLocalizedMessage( 501265 ); // Housing cannot be created in this area.
|
||||
break;
|
||||
}
|
||||
case HousePlacementResult.BadRegionTemp:
|
||||
{
|
||||
from.SendLocalizedMessage( 501270 ); //Lord British has decreed a 'no build' period, thus you cannot build this house at this time.
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -511,6 +516,11 @@ namespace Server.Items
|
|||
from.SendLocalizedMessage( 501265 ); // Housing cannot be created in this area.
|
||||
break;
|
||||
}
|
||||
case HousePlacementResult.BadRegionTemp:
|
||||
{
|
||||
from.SendLocalizedMessage( 501270 ); //Lord British has decreed a 'no build' period, thus you cannot build this house at this time.
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue