Свойство | Тип | Описание | |
---|---|---|---|
InvisiblePockets | IEnumerable |
Метод | Описание | |
---|---|---|
Add ( Item item, Pocket pocket ) : bool |
Tries to add item to pocket. Returns false if the pocket doesn't exist or there was no space.
|
|
Add ( Item item, bool tempFallback ) : bool |
Tries to add item to one of the main inventories, using the temp inv as fallback (if specified to do so). Returns false if there was no space.
|
|
Add ( |
Adds pocket to inventory.
|
|
AddBagPocket ( Item item ) : bool |
Adds pocket for item and updates item's linked pocket.
|
|
AddGold ( int amount ) : bool |
Adds new gold stacks to the inventory until the amount was added, using temp as fallback. Returns false if something went wrong, and not everything could be added.
|
|
AddMainInventory ( ) : void |
Adds main inventories (inv, personal, VIP). Call after creature's defaults (RaceInfo) have been loaded.
|
|
AddProficiency ( Item item, int amount ) : void |
Increases item's proficiency and updates client.
|
|
ChangeWeaponSet ( WeaponSet set ) : void |
Changes weapon set, if necessary, and updates clients.
|
|
Count ( bool>.Func |
Returns the amount of items matching the conditions specified.
|
|
Count ( int itemId ) : int |
Returns the amount of items with this id in the inventory.
|
|
Count ( string tag ) : int |
Returns the amount of items in the inventory that match the given tag.
|
|
CountItemsInPocket ( Pocket pocket ) : int |
Returns the number of items in the given pocket. Returns -1 if the pocket doesn't exist.
|
|
CreatureInventory ( |
Creates new creature inventory instance for creature.
|
|
Decrement ( Item item, ushort amount = 1 ) : bool |
Reduces item's amount and sends the necessary update packets. Also removes the item, if it's not a sack and its amount reaches 0.
|
|
GetAllEquipment ( ) : Item[] |
Returns a new list of all items in all equipment pockets.
|
|
GetAllEquipment ( bool>.Func |
Returns a new list of all items that match the predicate, in all equipment pockets.
|
|
GetAllItemsFrom ( Pocket pocket ) : List |
Returns list of all items in pocket. Returns null if the pocket doesn't exist.
|
|
GetCastingSpeedMod ( long entityId ) : int |
Returns casting speed modificator, based onthe WU upgrades for the given item entity id.
|
|
GetChainCastLevel ( SkillId skillId ) : int |
Returns the chain cast level for the given skill from the equipped WUUpgrades. Returns 0 if no Chain Cast upgrade could be found.
|
|
GetEquipment ( ) : Item[] |
Returns a new list of all items in all equipment pockets that aren't hair or face.
|
|
GetEquipment ( bool>.Func |
Returns a new list of all items that match the predicate, in all equipment pockets that aren't hair or face.
|
|
GetFreePocketId ( ) : Pocket |
Returns a free pocket id to be used for item bags.
|
|
GetItem ( bool>.Func |
Returns first item to match predicate, or null.
|
|
GetItem ( long entityId ) : Item |
Returns item with the id, or null.
|
|
GetItemAt ( Pocket pocket, int x, int y ) : Item |
Returns item at the location, or null.
|
|
GetItemSafe ( long entityId ) : Item |
Returns item or throws security violation exception, if item didn't exist or isn't allowed to be accessed.
|
|
GetItems ( ) : Item[] |
Returns a new list of all items in the inventory.
|
|
GetItems ( bool>.Func |
Returns a new list of all items that match the predicate.
|
|
GetMainEquipment ( ) : Item[] |
Returns a new list of all items in all main equipment pockets, meaning no style or inactive weapon pockets.
|
|
GetMainEquipment ( bool>.Func |
Returns a new list of all items in all main equipment pockets, meaning no style or inactive weapon pockets, that match the predicate.
|
|
GetManaBurnBonus ( ) : float |
Returns the ManaBurn bonus from all equipped WUUpgrades.
|
|
GetManaUseModificator ( ) : float |
Returns the ManaUse modificator from all equipped WUUpgrades.
|
|
GetPocket ( Pocket pocket ) : |
Returns given inventory pocket. Warning: Not for general usage, only use this if you know what you're doing.
|
|
Has ( Item item ) : bool |
Returns true uf the item exists in this inventory.
|
|
Has ( Pocket pocket ) : bool |
Returns true if pocket exists in this inventory.
|
|
Has ( int itemId, int amount = 1 ) : bool |
Returns whether inventory contains the item in this amount.
|
|
HasGold ( int amount ) : bool |
Returns whether inventory contains gold in this amount.
|
|
InitAdd ( Item item ) : bool |
Adds item to pocket at the position it currently has. Returns false if pocket doesn't exist.
|
|
Insert ( Item item, bool tempFallback ) : bool |
Tries to add item to one of the main inventories, using temp as fallback. Unlike "Add" the item will be filled into stacks first, if possible, before calling Add.
|
|
Insert ( Item item, bool tempFallback, List |
Tries to add item to one of the main inventories, using temp as fallback. Unlike "Add" the item will be filled into stacks first, if possible, before calling Add.
|
|
InsertStacks ( int itemId, int amount ) : bool |
Adds new stacks to the inventory until the amount was added, using temp as fallback. Returns false if something went wrong, and not everything could be added.
|
|
Move ( Item item, Pocket target, byte targetX, byte targetY ) : bool |
Used from MoveItem handler. The item is the one that's interacted with, the one picked up when taking it, the one being put into a packet when it's one the cursor. Colliding items switch places with it. |
|
MoveItemsToInvFrom ( ) : void |
Moves all items creature has in the given pockets to the main inventory.
|
|
MovePet ( |
Moving item between char and pet, used from handler.
|
|
PickUp ( Item item ) : bool |
Tries to put item into the inventory, by filling stacks and adding it. If it was completely added to the inventory, it's removed from the region the inventory's creature is in.
|
|
ReduceDurability ( Item item, int amount ) : void |
Reduces durability and updates client. Checks NoDurabilityLoss option, meaning this method won't reduce the durability if the option is set. |
|
ReduceMaxDurability ( Item item, int amount ) : void |
Reduces max durability and updates client.
|
|
Remove ( Item item ) : bool |
Removes item from inventory, if it is in it, and sends update packets.
|
|
Remove ( Pocket pocket ) : bool |
Removes pocket from inventory.
|
|
Remove ( int itemId, int amount = 1 ) : bool |
Removes the amount of items with the id from the inventory. Returns true if the specified amount was removed. Does not check amount before removing. |
|
RemoveGold ( int amount ) : bool |
Removes the amount of gold from the inventory. Returns true if the specified amount was removed.
|
|
StartLiveUpdate ( ) : void |
Subscribes inventory to events necessary for upgrade effect live updates.
|
|
UpdateStatBonuses ( ) : void |
Removes all upgrade effect bonuses from current equipment and reapplies them.
|
Метод | Описание | |
---|---|---|
ApplyDefenseBonuses ( Item item ) : void |
Applies non-upgrade Defense and Protection bonuses from the item.
|
|
ApplyUpgradeEffects ( Item item ) : void |
Applies upgrade effects from item.
|
|
ApplyUpgrades ( Item item ) : void |
Applies upgrade bonuses from the item.
|
|
CheckLeftHand ( Item item, Pocket source, Pocket target ) : void |
Unequips item in left hand/magazine, if item in right hand is moved.
|
|
CheckRightHand ( Item item, Pocket source, Pocket target ) : void |
Makes sure you can't combine invalid equipment, like 2H and shields.
|
|
CreatureInventory ( ) : System |
Initializes static information.
|
|
HandleWUUpgrades ( Item item ) : void |
Caches and applies WU upgrades for item.
|
|
OnCreatureChangedTitles ( |
Raised when inventory's creature changes titles.
|
|
OnCreatureConditionsChanged ( |
Raised when inventory's creature's conditions change.
|
|
OnCreatureLeveledUp ( |
Raised when inventory's creature leveled up.
|
|
OnCreatureSkillRankChanged ( |
Raised when one of the inventory's creature's skill's rank changes.
|
|
OnEquip ( Item item ) : void |
Called when an item is equipped, or becomes "active". Calls and sets the appropriate events and stat bonuses. Does not update the client. Before this is called, the references should be updated, so the subscribers see the character as he is *after* equipping the item. For example, to check the equipment for custom set bonuses. Afterwards the equip stats should be updated, so the client displays the changes. Both of these things aren't done inside this method, because there are cases where we have to equip/unequip multiple items, and we don't want to spam the client. You also have to take care of the visual equipment updates, for similar reasons. |
|
OnHoursTimeTick ( ErinnTime now ) : void |
Raised once ever RL hour.
|
|
OnItemEntersInventory ( Item item ) : void |
Handles events that need to happen when an item "enters" the inventory. Only called when an item is actually new to the inventory. |
|
OnItemLeavesInventory ( Item item ) : void |
Handles events that need to happen when an item "leaves" the inventory. Only called when an item is completely removed from the inventory. |
|
OnUnequip ( Item item ) : void |
Called when an item is unequipped, or becomes "inactive". Calls and removes the appropriate events and stat bonuses. Does not update the client. Before this is called, the references should be updated, so the subscribers see the character as he is *after* unequipping the item. For example, to check the equipment for custom set bonuses. Afterwards the equip stats should be updated, so the client displays the changes. Both of these things aren't done inside this method, because there are cases where we have to equip/unequip multiple items, and we don't want to spam the client. You also have to take care of the visual equipment updates, for similar reasons. |
|
PrepareBags ( Item item ) : void |
Adds bag pocket to inventory and sets it for the item if item is a bag. Call before ItemNew, otherwise the bag won't open until relog.
|
|
TryAutoAdd ( Item item, bool tempFallback ) : bool |
Tries to add item to one of the main invs or bags, wherever free space is available. Returns whether it was successful.
|
|
UnequipIfCantBeTouched ( Item item ) : void |
Moves item to inventory if it can't be touched.
|
|
UpdateChangedItems ( IEnumerable |
Sends amount update or remove packets for all items, depending on their amount.
|
|
UpdateEquipReferences ( ) : void |
Updates quick access equipment refernces.
|
|
UpdateEquipStats ( ) : void |
Sends private stat update for all equipment relevant stats.
|
public Add ( Item item, Pocket pocket ) : bool | ||
item | Item | |
Результат | bool |
public Add ( Item item, bool tempFallback ) : bool | ||
item | Item | |
tempFallback | bool | |
Результат | bool |
public Add ( |
||
inventoryPocket | ||
Результат | void |
public AddProficiency ( Item item, int amount ) : void | ||
item | Item | |
amount | int | |
Результат | void |
public ChangeWeaponSet ( WeaponSet set ) : void | ||
set | WeaponSet | |
Результат | void |
public Count ( bool>.Func |
||
predicate | bool>.Func | |
Результат | int |
public CountItemsInPocket ( Pocket pocket ) : int | ||
Результат | int |
public CreatureInventory ( |
||
creature | ||
Результат | System |
public Decrement ( Item item, ushort amount = 1 ) : bool | ||
item | Item | |
amount | ushort | |
Результат | bool |
public GetAllEquipment ( bool>.Func |
||
predicate | bool>.Func | |
Результат | Item[] |
public GetAllItemsFrom ( Pocket pocket ) : List |
||
Результат | List |
public GetCastingSpeedMod ( long entityId ) : int | ||
entityId | long | |
Результат | int |
public GetChainCastLevel ( SkillId skillId ) : int | ||
skillId | SkillId | |
Результат | int |
public GetEquipment ( bool>.Func |
||
predicate | bool>.Func | |
Результат | Item[] |
public GetItem ( bool>.Func |
||
predicate | bool>.Func | |
startAt | StartAt | /// Affects the order of the returned items, based on their position in /// the inventory. /// |
Результат | Item |
public GetItemAt ( Pocket pocket, int x, int y ) : Item | ||
x | int | |
y | int | |
Результат | Item |
public GetItemSafe ( long entityId ) : Item | ||
entityId | long | |
Результат | Item |
public GetItems ( bool>.Func |
||
predicate | bool>.Func | |
startAt | StartAt | /// Affects the order of the returned items, based on their position in /// the inventory. /// |
Результат | List |
public GetMainEquipment ( bool>.Func |
||
predicate | bool>.Func | |
Результат | Item[] |
public GetPocket ( Pocket pocket ) : |
||
Результат |
public Has ( int itemId, int amount = 1 ) : bool | ||
itemId | int | |
amount | int | |
Результат | bool |
public Insert ( Item item, bool tempFallback ) : bool | ||
item | Item | |
tempFallback | bool | Add to temp inv when all other pockets are full? |
Результат | bool |
public Insert ( Item item, bool tempFallback, List |
||
item | Item | |
tempFallback | bool | Add to temp inv when all other pockets are full? |
changed | List |
List of stacks that items were inserted into. |
Результат | bool |
public InsertStacks ( int itemId, int amount ) : bool | ||
itemId | int | Id of the item to add. |
amount | int | Amount to add, value affects the amount of stacks. |
Результат | bool |
public Move ( Item item, Pocket target, byte targetX, byte targetY ) : bool | ||
item | Item | Item to move |
target | Pocket to move it to | |
targetX | byte | |
targetY | byte | |
Результат | bool |
public MovePet ( |
||
pet | Always the pet | |
item | Item | |
other | The "other" creature, player when taking out, pet when putting in. | |
target | ||
targetX | int | |
targetY | int | |
Результат | bool |
public ReduceDurability ( Item item, int amount ) : void | ||
item | Item | |
amount | int | |
Результат | void |
public ReduceMaxDurability ( Item item, int amount ) : void | ||
item | Item | |
amount | int | |
Результат | void |
public Remove ( int itemId, int amount = 1 ) : bool | ||
itemId | int | |
amount | int | |
Результат | bool |