C# Class Aura.Channel.World.Trade

Mostra file Open project: aura-project/aura

Public Methods

Method Description
Accept ( ) : void

Accepts trade request from creature 2.

AddItem ( Creature creature, Aura.Channel.World.Entities.Item item ) : void

Adds item to trade partner's window.

Cancel ( ) : void

Cancels trade, returning all items and closing the trade window.

Initiate ( ) : void

Initiates the trade, sending information to creature 1 and a trade request to creature 2.

Ready ( Creature creature ) : void

Puts creature into ready mode.

RemoveItem ( Creature creature, Aura.Channel.World.Entities.Item item ) : void

Removes item from trade partner's window.

Trade ( Creature creature1, Creature creature2 ) : Aura.Channel.Network.Sending

Creates a new trade session.

Private Methods

Method Description
Complete ( ) : void

Completes trade session.

GetNewId ( ) : long

Returns a new trade id.

TradeItems ( Creature from, Creature to ) : void

Moves all items from one creature's trade window to another's inventory.

Wait ( Creature creature ) : void

Puts creature into waiting mode.

Method Details

Accept() public method

Accepts trade request from creature 2.
public Accept ( ) : void
return void

AddItem() public method

Adds item to trade partner's window.
public AddItem ( Creature creature, Aura.Channel.World.Entities.Item item ) : void
creature Aura.Channel.World.Entities.Creature Creature that added the item.
item Aura.Channel.World.Entities.Item Item added.
return void

Cancel() public method

Cancels trade, returning all items and closing the trade window.
public Cancel ( ) : void
return void

Initiate() public method

Initiates the trade, sending information to creature 1 and a trade request to creature 2.
public Initiate ( ) : void
return void

Ready() public method

Puts creature into ready mode.
public Ready ( Creature creature ) : void
creature Aura.Channel.World.Entities.Creature
return void

RemoveItem() public method

Removes item from trade partner's window.
public RemoveItem ( Creature creature, Aura.Channel.World.Entities.Item item ) : void
creature Aura.Channel.World.Entities.Creature Creature that removed the item.
item Aura.Channel.World.Entities.Item Item removed.
return void

Trade() public method

Creates a new trade session.
public Trade ( Creature creature1, Creature creature2 ) : Aura.Channel.Network.Sending
creature1 Aura.Channel.World.Entities.Creature
creature2 Aura.Channel.World.Entities.Creature
return Aura.Channel.Network.Sending