AlphaDragon
Sorceror
ok, That helped, I still dont understand it much but kinda figured it out. I think.
Code:
private void GetVendorItemsDisplay(StreamWriter op, PlayerVendor pv, Item item)
{
VendorItem vi = pv.GetVendorItem(item);
if ( vi == null )
return;
if ( vi.IsForSale )
{
if (pv.Owner == null || pv.Owner.Name == "1k5g6se84f895s854f884s6a") //If name same as this it will not show items in list.
return;
string ownername = (pv.Name != pv.Owner.Name ? pv.Owner.Name : " ");
string name = item.Name;
if (string.IsNullOrEmpty(name))
{
name = item.GetType().ToString();
if (name.LastIndexOf('.') >= 0)
name = name.Substring(name.LastIndexOf('.') + 1);
}
if (name.Length > 25)
name = name.Substring(0, 25);
string des = (string.IsNullOrEmpty(vi.Description) ? " " : vi.Description);
op.WriteLine( "{0} {1,-25} {2,7} {3} <br>", item.Amount, name, vi.Price.ToString(), des );
}
else if ( item is Container)
{
foreach ( Item containerItem in pv.Items)
{
op.WriteLine("This is a container item<br>");
}
}
}
Code:
PLAYER VENDORS:
***************************************************************************************
Owners Name , Shops Name, Vendors Name, Location
TESTER,3,fdsfd,Trammel - (3499, 2572, 21)
Amount,Item,Price for the Amount,Description
3 Carrot 3 c
---------------------------------------------------------------------------------------
Owners Name , Shops Name, Vendors Name, Location
fdsfd,2,Beta,Trammel - (3496, 2572, 21)
Amount,Item,Price for the Amount,Description
2 Banana 2 b
2 SulfurousAsh 999
2 GraveDust 999
2 DragonKnight Token 999
---------------------------------------------------------------------------------------
Owners Name , Shops Name, Vendors Name, Location
AlphaDragon,1,alphas,Trammel - (3494, 2572, 21)
Amount,Item,Price for the Amount,Description
1 Apple 1 a
1 BlackPearl 1
1 RecallRune 2
---------------------------------------------------------------------------------------
Owners Name , Shops Name, Vendors Name, Location
AlphaDragon,Shop Not Yet Named,Selby,Trammel - (3496, 2570, 21)
Amount,Item,Price for the Amount,Description
---------------------------------------------------------------------------------------
Owners Name , Shops Name, Vendors Name, Location
AlphaDragon,shopnameBAGER,VENDORNAMEBAGMAN,Trammel - (3497, 2568, 21)
Amount,Item,Price for the Amount,Description
This is a container item
This is a container item
This is a container item
This is a container item
This is a container item
This is a container item
1 DragonKnight Token 120
This is a container item
This is a container item
This is a container item
This is a container item
This is a container item
This is a container item
1 Boots 100 botiesDISCRIPTION
---------------------------------------------------------------------------------------
***************************************************************************************