C# Class Mooege.Core.GS.Players.Inventory

Inheritance: IMessageConsumer, IRevealable
Mostra file Open project: mdz444/mooege

Public Methods

Method Description
AddGoldAmount ( int amount ) : void
BuyItem ( Item originalItem ) : void
Consume ( Mooege.Net.GS.GameClient client, GameMessage message ) : void
DestroyInventoryItem ( Item item ) : void
EquipItem ( Item item, int slot ) : void

Used for equiping item after game starts TOOD: Needs rewrite

GetGoldAmount ( ) : int
GetItem ( uint itemId ) : Item
GetRune ( int skillIndex ) : Item

Returns rune in skill's socket

GetVisualEquipment ( ) : D3.Hero.VisualEquipment
HandleInventoryRequestMoveMessage ( Mooege.Net.GS.Message.Definitions.Inventory.InventoryRequestMoveMessage request ) : void

Handles a request to move an item within the inventory. This covers moving items within the backpack, from equipment slot to backpack and from backpack to equipment slot

HandleInventoryRequestQuickMoveMessage ( InventoryRequestQuickMoveMessage request ) : void

Handles a request to move an item from stash the inventory and back

HasInventorySpace ( Item item ) : bool
Inventory ( Player owner ) : System
LoadFromDB ( ) : void
OnInventorySplitStackMessage ( InventorySplitStackMessage msg ) : void

Transfers an amount from one stack to a free space

OnInventoryStackTransferMessage ( InventoryStackTransferMessage msg ) : void

Transfers an amount from one stack to another

PickUp ( Item item ) : bool

Picks an item up after client request

PickUpGold ( uint itemID ) : void
RemoveGoldAmount ( int amount ) : void
RemoveRune ( int skillIndex ) : Item

Visually removes rune from skill. Also removes effect of that rune

Reveal ( Player player ) : bool
SaveToDB ( ) : void
SendVisualInventory ( Player player ) : void

Refreshes the visual appearance of the hero

SetRune ( Item rune, int powerSNOId, int skillIndex ) : void

Visually adds rune to skill (move from backpack to runes' slot)

SpawnItem ( Item item ) : void
Unreveal ( Player player ) : bool

Private Methods

Method Description
AcceptMoveRequest ( Item item ) : void
FindSameItems ( int gbid ) : List
IsValidEquipmentRequest ( Item item, int equipmentSlot ) : bool

Checks if Item can be equipped at that slot. Handels equipment for Two-Handed-Weapons.

OnBuySharedStashSlots ( RequestBuySharedStashSlotsMessage requestBuySharedStashSlotsMessage ) : void
OnInventoryDropItemMessage ( InventoryDropItemMessage msg ) : void
OnInventoryRequestUseMessage ( InventoryRequestUseMessage inventoryRequestUseMessage ) : void
SaveItemToDB ( DBGameAccount dbGameAccount, DBToon dbToon, EquipmentSlotId slotId, Item item ) : void

Method Details

AddGoldAmount() public method

public AddGoldAmount ( int amount ) : void
amount int
return void

BuyItem() public method

public BuyItem ( Item originalItem ) : void
originalItem Item
return void

Consume() public method

public Consume ( Mooege.Net.GS.GameClient client, GameMessage message ) : void
client Mooege.Net.GS.GameClient
message GameMessage
return void

DestroyInventoryItem() public method

public DestroyInventoryItem ( Item item ) : void
item Item
return void

EquipItem() public method

Used for equiping item after game starts TOOD: Needs rewrite
public EquipItem ( Item item, int slot ) : void
item Item
slot int
return void

GetGoldAmount() public method

public GetGoldAmount ( ) : int
return int

GetItem() public method

public GetItem ( uint itemId ) : Item
itemId uint
return Item

GetRune() public method

Returns rune in skill's socket
public GetRune ( int skillIndex ) : Item
skillIndex int
return Item

GetVisualEquipment() public method

public GetVisualEquipment ( ) : D3.Hero.VisualEquipment
return D3.Hero.VisualEquipment

HandleInventoryRequestMoveMessage() public method

Handles a request to move an item within the inventory. This covers moving items within the backpack, from equipment slot to backpack and from backpack to equipment slot
public HandleInventoryRequestMoveMessage ( Mooege.Net.GS.Message.Definitions.Inventory.InventoryRequestMoveMessage request ) : void
request Mooege.Net.GS.Message.Definitions.Inventory.InventoryRequestMoveMessage
return void

HandleInventoryRequestQuickMoveMessage() public method

Handles a request to move an item from stash the inventory and back
public HandleInventoryRequestQuickMoveMessage ( InventoryRequestQuickMoveMessage request ) : void
request InventoryRequestQuickMoveMessage
return void

HasInventorySpace() public method

public HasInventorySpace ( Item item ) : bool
item Item
return bool

Inventory() public method

public Inventory ( Player owner ) : System
owner Player
return System

LoadFromDB() public method

public LoadFromDB ( ) : void
return void

OnInventorySplitStackMessage() public method

Transfers an amount from one stack to a free space
public OnInventorySplitStackMessage ( InventorySplitStackMessage msg ) : void
msg InventorySplitStackMessage
return void

OnInventoryStackTransferMessage() public method

Transfers an amount from one stack to another
public OnInventoryStackTransferMessage ( InventoryStackTransferMessage msg ) : void
msg InventoryStackTransferMessage
return void

PickUp() public method

Picks an item up after client request
public PickUp ( Item item ) : bool
item Item
return bool

PickUpGold() public method

public PickUpGold ( uint itemID ) : void
itemID uint
return void

RemoveGoldAmount() public method

public RemoveGoldAmount ( int amount ) : void
amount int
return void

RemoveRune() public method

Visually removes rune from skill. Also removes effect of that rune
public RemoveRune ( int skillIndex ) : Item
skillIndex int
return Item

Reveal() public method

public Reveal ( Player player ) : bool
player Player
return bool

SaveToDB() public method

public SaveToDB ( ) : void
return void

SendVisualInventory() public method

Refreshes the visual appearance of the hero
public SendVisualInventory ( Player player ) : void
player Player
return void

SetRune() public method

Visually adds rune to skill (move from backpack to runes' slot)
public SetRune ( Item rune, int powerSNOId, int skillIndex ) : void
rune Item
powerSNOId int
skillIndex int
return void

SpawnItem() public method

public SpawnItem ( Item item ) : void
item Item
return void

Unreveal() public method

public Unreveal ( Player player ) : bool
player Player
return bool