本文整理汇总了C#中Server.Multis.BaseHouse.AvailableVendorsFor方法的典型用法代码示例。如果您正苦于以下问题:C# BaseHouse.AvailableVendorsFor方法的具体用法?C# BaseHouse.AvailableVendorsFor怎么用?C# BaseHouse.AvailableVendorsFor使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Server.Multis.BaseHouse
的用法示例。
在下文中一共展示了BaseHouse.AvailableVendorsFor方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: HouseGumpAOS
public HouseGumpAOS( HouseGumpPageAOS page, Mobile from, BaseHouse house ) : base( 50, 40 )
{
m_House = house;
m_Page = page;
from.CloseGump( typeof( HouseGumpAOS ) );
//from.CloseGump( typeof( HouseListGump ) );
//from.CloseGump( typeof( HouseRemoveGump ) );
bool isCombatRestricted = house.IsCombatRestricted( from );
bool isOwner = house.IsOwner( from );
bool isCoOwner = isOwner || house.IsCoOwner( from );
bool isFriend = isCoOwner || house.IsFriend( from );
if ( isCombatRestricted )
isFriend = isCoOwner = isOwner = false;
AddPage( 0 );
if ( isFriend || page == HouseGumpPageAOS.Vendors )
{
AddBackground( 0, 0, 420, page != HouseGumpPageAOS.Vendors ? 440 : 420, 5054 );
AddImageTiled( 10, 10, 400, 100, 2624 );
AddAlphaRegion( 10, 10, 400, 100 );
AddImageTiled( 10, 120, 400, 260, 2624 );
AddAlphaRegion( 10, 120, 400, 260 );
AddImageTiled( 10, 390, 400, page != HouseGumpPageAOS.Vendors ? 40 : 20, 2624 );
AddAlphaRegion( 10, 390, 400, page != HouseGumpPageAOS.Vendors ? 40 : 20 );
AddButtonLabeled( 250, page != HouseGumpPageAOS.Vendors ? 410 : 390, 0, 1060675 ); // CLOSE
}
AddImage( 10, 10, 100 );
if ( m_House.Sign != null )
{
ArrayList lines = Wrap( m_House.Sign.GetName() );
if ( lines != null )
{
for ( int i = 0, y = (114 - (lines.Count * 14)) / 2; i < lines.Count; ++i, y += 14 )
{
string s = (string)lines[i];
AddLabel( 10 + ((160 - (s.Length * 8)) / 2), y, 0, s );
}
}
}
if ( page == HouseGumpPageAOS.Vendors )
{
AddHtmlLocalized( 10, 120, 400, 20, 1062428, LabelColor, false, false ); // <CENTER>SHOPS</CENTER>
AddList( house.AvailableVendorsFor( from ), 1, false, false, from );
return;
}
if ( !isFriend )
return;
if ( house != null )
{
AddButtonLabeled( 10, 390, GetButtonID( 0, 0 ), 1060674 ); // Banish
AddButtonLabeled( 10, 410, GetButtonID( 0, 1 ), 1011261 ); // Lift a Ban
}
/*Zycron
else
{
AddButtonLabeled( 10, 390, GetButtonID( 0, 2 ), 1060676 ); // Grant Access
AddButtonLabeled( 10, 410, GetButtonID( 0, 3 ), 1060677 ); // Revoke Access
}
Zycron*/
AddPageButton( 150, 10, GetButtonID( 1, 0 ), 1060668, HouseGumpPageAOS.Information );
AddPageButton( 150, 30, GetButtonID( 1, 1 ), 1060669, HouseGumpPageAOS.Security );
AddPageButton( 150, 50, GetButtonID( 1, 2 ), 1060670, HouseGumpPageAOS.Storage );
AddPageButton( 150, 70, GetButtonID( 1, 3 ), 1060671, HouseGumpPageAOS.Customize );
AddPageButton( 150, 90, GetButtonID( 1, 4 ), 1060672, HouseGumpPageAOS.Ownership );
switch ( page )
{
case HouseGumpPageAOS.Information:
{
AddHtmlLocalized( 20, 130, 200, 20, 1011242, LabelColor, false, false ); // Owned By:
AddLabel( 210, 130, LabelHue, GetOwnerName() );
AddHtmlLocalized( 20, 170, 380, 20, 1018032, SelectedColor, false, false ); // This house is properly placed.
AddHtmlLocalized( 20, 190, 380, 20, 1018035, SelectedColor, false, false ); // This house is of modern design.
AddHtmlLocalized( 20, 210, 380, 20, (house is HouseFoundation) ? 1060681 : 1060680, SelectedColor, false, false ); // This is a (pre | custom)-built house.
AddHtmlLocalized( 20, 230, 380, 20, house.Public ? 1060678 : 1060679, SelectedColor, false, false ); // This house is (private | open to the public).
switch ( house.DecayType )
{
case DecayType.Ageless:
case DecayType.AutoRefresh:
{
AddHtmlLocalized( 20, 250, 380, 20, 1062209, SelectedColor, false, false ); // This house is <a href = "?ForceTopic97">Automatically</a> refreshed.
//.........这里部分代码省略.........
示例2: HouseGumpAOS
public HouseGumpAOS( HouseGumpPageAOS page, Mobile from, BaseHouse house )
: base(50, 40)
{
m_House = house;
m_Page = page;
from.CloseGump( typeof( HouseGumpAOS ) );
//from.CloseGump( typeof( HouseListGump ) );
//from.CloseGump( typeof( HouseRemoveGump ) );
bool isCombatRestricted = house.IsCombatRestricted( from );
bool isOwner = house.IsOwner( from );
bool isCoOwner = isOwner || house.IsCoOwner( from );
bool isFriend = isCoOwner || house.IsFriend( from );
if ( isCombatRestricted )
isFriend = isCoOwner = isOwner = false;
AddPage( 0 );
if ( isFriend || page == HouseGumpPageAOS.Vendors )
{
AddBackground(0, 0, 420, page != HouseGumpPageAOS.Vendors ? 440 : 420, 9270);
AddImageTiled( 10, 10, 400, 100, 2624 );
//AddAlphaRegion( 10, 10, 400, 100 );
AddImageTiled( 10, 120, 400, 260, 2624 );
//AddAlphaRegion( 10, 120, 400, 260 );
AddImageTiled( 10, 390, 400, page != HouseGumpPageAOS.Vendors ? 40 : 20, 2624 );
//AddAlphaRegion( 10, 390, 400, page != HouseGumpPageAOS.Vendors ? 40 : 20 );
AddButtonLabeled( 250, page != HouseGumpPageAOS.Vendors ? 410 : 390, 0, "Fechar", true ); // CLOSE
}
AddImage( 10, 10, 100 );
if ( m_House.Sign != null )
{
ArrayList lines = Wrap( m_House.Sign.GetName() );
if ( lines != null )
{
for ( int i = 0, y = (114 - (lines.Count * 14)) / 2; i < lines.Count; ++i, y += 14 )
{
string s = (string)lines[i];
AddLabel( 10 + ((160 - (s.Length * 8)) / 2), y, 0, s );
}
}
}
if ( page == HouseGumpPageAOS.Vendors )
{
AddHtmlLocalized( 10, 120, 400, 20, 1062428, LabelColor, false, false ); // <CENTER>SHOPS</CENTER>
AddList( house.AvailableVendorsFor( from ), 1, false, false, from );
return;
}
if ( !isFriend )
return;
if ( house.Public )
{
AddButtonLabeled( 10, 390, GetButtonID( 0, 0 ), "Banir", true); // Banish
AddButtonLabeled(10, 410, GetButtonID(0, 1), "Remover Ban", true); // Lift a Ban
}
else
{
AddButtonLabeled(10, 390, GetButtonID(0, 2), "Permitir Acesso", true); // Grant Access
AddButtonLabeled(10, 410, GetButtonID(0, 3), "Remover Acesso", true); // Revoke Access
}
AddPageButton( 150, 10, GetButtonID( 1, 0 ), "INFORMAÇÕES", HouseGumpPageAOS.Information );
AddPageButton( 150, 30, GetButtonID( 1, 1 ), "SEGURANÇA", HouseGumpPageAOS.Security );
AddPageButton( 150, 50, GetButtonID( 1, 2 ), "SECURES", HouseGumpPageAOS.Storage );
AddPageButton( 150, 70, GetButtonID( 1, 3 ), "CUSTOMIZAR", HouseGumpPageAOS.Customize );
AddPageButton( 150, 90, GetButtonID( 1, 4 ), "TRANSFERIR", HouseGumpPageAOS.Ownership );
switch ( page )
{
case HouseGumpPageAOS.Information:
{
//AddHtmlLocalized( 20, 130, 200, 20, 1011242, LabelColor, false, false ); // Owned By:
AddHtml(20, 130, 200, 20, "Dono: " + GetOwnerName(), false, false); // Owned By:
//AddLabel( 210, 130, LabelHue, GetOwnerName() );
AddHtml(20, 170, 380, 20, "Esta casa está colocada corretamente", false, false); // This house is properly placed.
AddHtml(20, 190, 380, 20, "Esta casa é de estilo moderno", false, false); // This house is of modern design.
AddHtml(20, 210, 380, 20, (house is HouseFoundation) ? "Esta é uma casa customizada" : "Esta é uma casa pré-moldada", false, false); // This is a (pre | custom)-built house.
//AddHtmlLocalized(20, 230, 380, 20, house.Public ? "" : 1060679, SelectedColor, false, false); // This house is (private | open to the public).
AddHtml(20, 230, 380, 20, house.Public ? "Esta casa é pública" : "Esta casa é restrita", false, false); // This house is (private | open to the public).
switch ( house.DecayType )
{
case DecayType.Ageless:
case DecayType.AutoRefresh:
//.........这里部分代码省略.........