本文整理匯總了C#中Server.Multis.BaseHouse類的典型用法代碼示例。如果您正苦於以下問題:C# BaseHouse類的具體用法?C# BaseHouse怎麽用?C# BaseHouse使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。
BaseHouse類屬於Server.Multis命名空間,在下文中一共展示了BaseHouse類的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C#代碼示例。
示例1: VendorInventory
public VendorInventory( BaseHouse house, GenericReader reader )
{
m_House = house;
int version = reader.ReadEncodedInt();
m_Owner = reader.ReadMobile();
m_VendorName = reader.ReadString();
m_ShopName = reader.ReadString();
m_Items = reader.ReadStrongItemList();
m_Gold = reader.ReadInt();
m_ExpireTime = reader.ReadDeltaTime();
if ( m_Items.Count == 0 && m_Gold == 0 )
{
Timer.DelayCall( TimeSpan.Zero, new TimerCallback( Delete ) );
}
else
{
TimeSpan delay = m_ExpireTime - DateTime.UtcNow;
m_ExpireTimer = new ExpireTimer( this, delay > TimeSpan.Zero ? delay : TimeSpan.Zero );
m_ExpireTimer.Start();
}
}
示例2: Deserialize
public override void Deserialize( GenericReader reader )
{
base.Deserialize( reader );
int version = reader.ReadInt();
switch ( version )
{
case 1:
{
m_House = reader.ReadItem() as BaseHouse;
goto case 0;
}
case 0:
{
m_Description = reader.ReadString();
m_Marked = reader.ReadBool();
m_Target = reader.ReadPoint3D();
m_TargetMap = reader.ReadMap();
CalculateHue();
break;
}
}
}
示例3: HouseSign
public HouseSign(BaseHouse owner)
: base(0xBD2)
{
this.m_Owner = owner;
this.m_OrgOwner = this.m_Owner.Owner;
this.Movable = false;
}
示例4: TentPackGump
public TentPackGump( Mobile mobile, BaseHouse house ) : base( 110, 100 )
{
m_Mobile = mobile;
m_House = house;
mobile.CloseGump( typeof( TentPackGump ) );
Closable = false;
AddPage( 0 );
AddBackground( 0, 0, 420, 280, 5054 );
AddImageTiled( 10, 10, 400, 20, 2624 );
AddAlphaRegion( 10, 10, 400, 20 );
AddHtmlLocalized( 10, 10, 400, 20, 1060635, 30720, false, false ); // <CENTER>WARNING</CENTER>
AddImageTiled( 10, 40, 400, 200, 2624 );
AddAlphaRegion( 10, 40, 400, 200 );
AddHtml( 10, 40, 400, 200, string.Format( "You are about to pack up your tent.\nYou will place the tent back in its tent bag.\nThe tent will remain behind and can be freely picked up by anyone.\nOnce the tent has been put away, anyone can attempt to place a new house or tent on the vacant land.\n Are you sure you wish to continue?" ), false, true );
AddImageTiled( 10, 250, 400, 20, 2624 );
AddAlphaRegion( 10, 250, 400, 20 );
AddButton( 10, 250, 4005, 4007, 1, GumpButtonType.Reply, 0 );
AddHtmlLocalized( 40, 250, 170, 20, 1011036, 32767, false, false ); // OKAY
AddButton( 210, 250, 4005, 4007, 0, GumpButtonType.Reply, 0 );
AddHtmlLocalized( 240, 250, 170, 20, 1011012, 32767, false, false ); // CANCEL
}
示例5: ValidatePlacement
public bool ValidatePlacement(Point3D loc)
{
Map map = m_From.Map;
if (map == null)
return false;
m_House = BaseHouse.FindHouseAt(m_From.Location, map, 20);
if (m_House == null || !m_House.IsOwner(m_From))
{
m_From.SendMessage("You must be standing in your house to place this");
return false;
}
if (loc.Y > m_From.Location.Y + YardSettings.Front || loc.Y < m_From.Location.Y - YardSettings.Back)
{
m_From.SendMessage("This is outside of your yard. Please re-try the placement");
return false;
}
if (loc.X > m_From.Location.X + YardSettings.Right || loc.X < m_From.Location.X - YardSettings.Left)
{
m_From.SendMessage("This is outside of your yard. Please re-try the placement");
return false;
}
return true;
}
示例6: VendorInventoryGump
public VendorInventoryGump(BaseHouse house, Mobile from)
: base(50, 50)
{
m_House = house;
m_Inventories = new ArrayList(house.VendorInventories);
AddBackground(0, 0, 420, 50 + 20 * m_Inventories.Count, 0x13BE);
AddImageTiled(10, 10, 400, 20, 0xA40);
AddHtmlLocalized(15, 10, 200, 20, 1062435, 0x7FFF, false, false); // Reclaim Vendor Inventory
AddHtmlLocalized(330, 10, 50, 20, 1062465, 0x7FFF, false, false); // Expires
AddImageTiled(10, 40, 400, 20 * m_Inventories.Count, 0xA40);
for (int i = 0; i < m_Inventories.Count; i++)
{
VendorInventory inventory = (VendorInventory)m_Inventories[i];
int y = 40 + 20 * i;
if (inventory.Owner == from)
AddButton(10, y, 0xFA5, 0xFA7, i + 1, GumpButtonType.Reply, 0);
AddLabel(45, y, 0x481, String.Format("{0} ({1})", inventory.ShopName, inventory.VendorName));
TimeSpan expire = inventory.ExpireTime - DateTime.UtcNow;
int hours = (int)expire.TotalHours;
AddLabel(320, y, 0x481, hours.ToString());
AddHtmlLocalized(350, y, 50, 20, 1062466, 0x7FFF, false, false); // hour(s)
}
}
示例7: CheckAccess
public static bool CheckAccess( BaseHouse house, Mobile from )
{
if ( house.Public || !house.IsAosRules )
return !house.IsBanned( from );
return house.HasAccess( from );
}
示例8: PlayerVendor
public PlayerVendor( Mobile owner, BaseHouse house )
{
Owner = owner;
House = house;
if ( BaseHouse.NewVendorSystem )
{
m_BankAccount = 0;
m_HoldGold = 4;
}
else
{
m_BankAccount = 1000;
m_HoldGold = 0;
}
ShopName = "Shop Not Yet Named";
m_SellItems = new Hashtable();
CantWalk = true;
InitStats( 75, 75, 75 );
InitBody();
InitOutfit();
TimeSpan delay = PayTimer.GetInterval();
m_PayTimer = new PayTimer( this, delay );
m_PayTimer.Start();
m_NextPayTime = DateTime.Now + delay;
}
示例9: LoginEventHandler
/*public static void Initialize()
{
EventSink.Login += new LoginEventHandler( OnLogin );
}
public static void OnLogin( LoginEventArgs e )
{
BaseHouse house = BaseHouse.FindHouseAt( e.Mobile );
if ( house != null && !house.Public && !house.IsFriend( e.Mobile ) )
e.Mobile.Location = house.BanLocation;
}*/
public HouseRegion( BaseHouse house )
: base(null, house.Map, HousePriority, GetArea( house ))
{
m_House = house;
Point3D ban = house.RelativeBanLocation;
this.GoLocation = new Point3D( house.X + ban.X, house.Y + ban.Y, house.Z + ban.Z );
}
示例10: EjectPlayerEntry
public EjectPlayerEntry(Mobile from, Mobile target)
: base(6206, 12)
{
this.m_From = from;
this.m_Target = target;
this.m_TargetHouse = BaseHouse.FindHouseAt(this.m_Target);
}
示例11: MovingCrate
public MovingCrate( BaseHouse house ) : base( 0xE3D )
{
Hue = 0x8A5;
Movable = false;
m_House = house;
}
示例12: StrongBox
public StrongBox( Mobile owner, BaseHouse house ) : base( 0xE80 )
{
m_Owner = owner;
m_House = house;
MaxItems = 25;
}
示例13: HouseRegion
public HouseRegion( BaseHouse house )
: base("", "", house.Map)
{
Priority = Region.HousePriority;
LoadFromXml = false;
m_House = house;
}
示例14: HouseSign
public HouseSign( BaseHouse owner )
: base(0xBD2)
{
m_Owner = owner;
m_OrgOwner = m_Owner.Owner;
Movable = false;
}
示例15: VendorInventory
public VendorInventory(BaseHouse house, GenericReader reader)
{
House = house;
reader.ReadEncodedInt();
Owner = reader.ReadMobile();
VendorName = reader.ReadString();
ShopName = reader.ReadString();
Items = reader.ReadStrongItemList();
Currency = reader.ReadInt();
ExpireTime = reader.ReadDeltaTime();
if (Items.Count == 0 && Currency == 0)
{
Timer.DelayCall(TimeSpan.Zero, Delete);
}
else
{
TimeSpan delay = ExpireTime - DateTime.UtcNow;
m_ExpireTimer = new ExpireTimer(this, delay > TimeSpan.Zero ? delay : TimeSpan.Zero);
m_ExpireTimer.Start();
}
}