C# Class Aura.Channel.World.Shops.PersonalShop

Afficher le fichier Open project: aura-project/aura Class Usage Examples

Méthodes publiques

Méthode Description
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.

Private Methods

Méthode Description
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.

Method Details

Buy() public méthode

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
Résultat bool

CanPlace() public static méthode

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
Résultat bool

ChangeDescription() public méthode

Changes shop's description.
public ChangeDescription ( string description ) : void
description string
Résultat void

ChangeTitle() public méthode

Changes shop's title.
public ChangeTitle ( string title ) : void
title string
Résultat void

CloseFor() public méthode

Opens shop for given creature.
public CloseFor ( Creature creature ) : void
creature Aura.Channel.World.Entities.Creature
Résultat void

GetAllItems() public méthode

Returns new list of all items in shop's bag.
public GetAllItems ( ) : List
Résultat List

GetBagLayout() public méthode

Returns the layout of the bag, used in the shop open packet.
public GetBagLayout ( ) : string
Résultat string

GetPricedItems() public méthode

Returns new list of all items with prices in shop's bag.
public GetPricedItems ( ) : List
Résultat List

OpenFor() public méthode

Opens shop for given creature.
public OpenFor ( Creature creature ) : void
creature Aura.Channel.World.Entities.Creature
Résultat void

PersonalShop() public méthode

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
Résultat Aura.Channel.Network.Sending

SetOverseer() public méthode

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
Résultat bool

SetPrice() public méthode

Sets the price for the given item, returns true on success.
public SetPrice ( long itemEntityId, int price ) : bool
itemEntityId long
price int
Résultat bool

SetPrices() public méthode

Sets the price for the given item, returns true on success.
public SetPrices ( long itemEntityId, int price ) : bool
itemEntityId long
price int
Résultat bool

SetUp() public méthode

Sets up shop, spawning the prop.
public SetUp ( string title, string description ) : bool
title string
description string
Résultat bool

TakeDown() public méthode

Closes the shop for all customers and takes it down, removing the prop.
public TakeDown ( ) : void
Résultat void