UO-Dev Arama


Yazar: Bilinmiyor
Tarih: 01-09-2009 00:07


Paylaş : Paylaş

Kod:
using System;
using System.Collections;
using Server;
using Server.Network;
using Server.Multis;

namespace Server.Gumps
{
public class ReclaimVendorGump : Gump
{
private BaseHouse m_House;
private ArrayList m_Vendors;

public ReclaimVendorGump( BaseHouse house ) : base( 50, 50 )
{
m_House = house;
m_Vendors = new ArrayList( house.InternalizedVendors );

AddBackground( 0, 0, 170, 50 + m_Vendors.Count * 20, 0x13BE );

AddImageTiled( 10, 10, 150, 20, 0xA40 );
AddHtmlLocalized( 10, 10, 150, 20, 1061827, 0x7FFF, false, false ); // <CENTER>Reclaim Vendor</CENTER>

AddImageTiled( 10, 40, 150, m_Vendors.Count * 20, 0xA40 );

for ( int i = 0; i < m_Vendors.Count; i++ )
{
Mobile m = (Mobile) m_Vendors[i];

int y = 40 + i * 20;

AddButton( 10, y, 0xFA5, 0xFA7, i + 1, GumpButtonType.Reply, 0 );
AddLabel( 45, y, 0x481, m.Name );
}
}

public override void OnResponse( NetState sender, RelayInfo info )
{
Mobile from = sender.Mobile;

if ( info.ButtonID == 0 || !m_House.IsActive || !m_House.IsInside( from ) || !m_House.IsOwner( from ) || !from.CheckAlive() )
return;

int index = info.ButtonID - 1;

if ( index < 0 || index >= m_Vendors.Count )
return;

Mobile mob = (Mobile) m_Vendors[index];

if ( !m_House.InternalizedVendors.Contains( mob ) )
return;

if ( mob.Deleted )
{
m_House.InternalizedVendors.Remove( mob );
}
else
{
bool vendor, contract;
BaseHouse.IsThereVendor( from.Location, from.Map, out vendor, out contract );

if ( vendor )
{
from.SendLocalizedMessage( 1062677 ); // You cannot place a vendor or barkeep at this location.
}
else if ( contract )
{
from.SendLocalizedMessage( 1062678 ); // You cannot place a vendor or barkeep on top of a rental contract!
}
else
{
m_House.InternalizedVendors.Remove( mob );
mob.MoveToWorld( from.Location, from.Map );
}
}
}
}
}



Yorumlar

Henüz yorum yapılmamıştır.

Oylamalar

Oylama :
Üyelerin oylama ortalaması (10 dışında) : Henüz Oylanmamış   
Oylar: 0

Benzer Sayfalar

SayfalarYorumlarGönderenTarih
Ev Vendor Sistemi0TheRaskol15-05-2010
Gump Studio 1.80basic27-01-2010
Gump tooltip art is wrong size0MagLor31-10-2009
Who Gump0Rowall01-09-2009
Warning Gump0Rowall01-09-2009


Keywords:

ultima online, RunUO, ultima online download, sphere scripting, role play, uo grafik, second age ultima, uo loop, macroman, pvp server, server kurulumu, sphere, multool, ml mulls, 56b 55r 55i, htmlgumps, client 4x, client edit, sphere release, osi, rp server, sunucular, ghost mouse, inside uo, kingdom reborn, stygian abyss, uo nasıl oynanır, mondain's legacy, age of shadows, world build, grandmaster, ultima online pvp, player dosyaları, ultima online indir, frp game, RunUO 1.0.0, razor, uo rice, hue editör, skill tools, ultima online patch, axis, world build, verdata, verdata patcher, map editör, gump editör, mul patcher, aos mulls, scriptler, anim edit, anim publish, hues mul, hosting vps, event dialog, account sistemi, skill gain, static yapımı,