C# Класс Aura.Channel.World.Shops.PersonalShop

Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
Buy ( Creature buyer, long itemEntityId, bool directBankTransaction ) : bool

Attempts to buy the given item for buyer, returns true if successful.

CanPlace ( Creature creature, string license ) : bool

Returns true if creature can place shop at their current location.

ChangeDescription ( string description ) : void

Changes shop's description.

ChangeTitle ( string title ) : void

Changes shop's title.

CloseFor ( Creature creature ) : void

Opens shop for given creature.

GetAllItems ( ) : List

Returns new list of all items in shop's bag.

GetBagLayout ( ) : string

Returns the layout of the bag, used in the shop open packet.

GetPricedItems ( ) : List

Returns new list of all items with prices in shop's bag.

OpenFor ( Creature creature ) : void

Opens shop for given creature.

PersonalShop ( Creature owner, Item bag, Item license ) : Aura.Channel.Network.Sending

Creates new PersonalShop instance. Does not actually create shop.

SetOverseer ( Creature overseer, long itemEntityId ) : bool

Sets the shop's overseer (brownie/pet).

SetPrice ( long itemEntityId, int price ) : bool

Sets the price for the given item, returns true on success.

SetPrices ( long itemEntityId, int price ) : bool

Sets the price for the given item, returns true on success.

SetUp ( string title, string description ) : bool

Sets up shop, spawning the prop.

TakeDown ( ) : void

Closes the shop for all customers and takes it down, removing the prop.

Приватные методы

Метод Описание
ForAllCustomers ( Action action ) : void

Executes the given action for all current customers.

GetPlacementPosition ( Position pos, byte direction ) : Position

Returns position for the shop, based on given position and direction.

GetShopPropId ( Item item ) : int

Returns the prop id to be used for the given bag.

UpdatePrice ( Item item, int price ) : void

Updates price for given item and updates clients.

Описание методов

Buy() публичный Метод

Attempts to buy the given item for buyer, returns true if successful.
public Buy ( Creature buyer, long itemEntityId, bool directBankTransaction ) : bool
buyer Aura.Channel.World.Entities.Creature
itemEntityId long
directBankTransaction bool
Результат bool

CanPlace() публичный статический Метод

Returns true if creature can place shop at their current location.
public static CanPlace ( Creature creature, string license ) : bool
creature Aura.Channel.World.Entities.Creature
license string
Результат bool

ChangeDescription() публичный Метод

Changes shop's description.
public ChangeDescription ( string description ) : void
description string
Результат void

ChangeTitle() публичный Метод

Changes shop's title.
public ChangeTitle ( string title ) : void
title string
Результат void

CloseFor() публичный Метод

Opens shop for given creature.
public CloseFor ( Creature creature ) : void
creature Aura.Channel.World.Entities.Creature
Результат void

GetAllItems() публичный Метод

Returns new list of all items in shop's bag.
public GetAllItems ( ) : List
Результат List

GetBagLayout() публичный Метод

Returns the layout of the bag, used in the shop open packet.
public GetBagLayout ( ) : string
Результат string

GetPricedItems() публичный Метод

Returns new list of all items with prices in shop's bag.
public GetPricedItems ( ) : List
Результат List

OpenFor() публичный Метод

Opens shop for given creature.
public OpenFor ( Creature creature ) : void
creature Aura.Channel.World.Entities.Creature
Результат void

PersonalShop() публичный Метод

Creates new PersonalShop instance. Does not actually create shop.
public PersonalShop ( Creature owner, Item bag, Item license ) : Aura.Channel.Network.Sending
owner Aura.Channel.World.Entities.Creature
bag Item
license Item
Результат Aura.Channel.Network.Sending

SetOverseer() публичный Метод

Sets the shop's overseer (brownie/pet).
public SetOverseer ( Creature overseer, long itemEntityId ) : bool
overseer Aura.Channel.World.Entities.Creature Set to null to remove overseer.
itemEntityId long
Результат bool

SetPrice() публичный Метод

Sets the price for the given item, returns true on success.
public SetPrice ( long itemEntityId, int price ) : bool
itemEntityId long
price int
Результат bool

SetPrices() публичный Метод

Sets the price for the given item, returns true on success.
public SetPrices ( long itemEntityId, int price ) : bool
itemEntityId long
price int
Результат bool

SetUp() публичный Метод

Sets up shop, spawning the prop.
public SetUp ( string title, string description ) : bool
title string
description string
Результат bool

TakeDown() публичный Метод

Closes the shop for all customers and takes it down, removing the prop.
public TakeDown ( ) : void
Результат void