@rpg-engine/long-bow 0.1.90 → 0.1.93

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -6,6 +6,6 @@ export interface IItemContainerProps {
6
6
  onClose?: () => void;
7
7
  onItemClick?: (item: IItem, slotContainerType: SlotContainerType | null) => void;
8
8
  onMouseOver?: (e: any, slotIndex: number, item: IItem | null) => void;
9
- onSelected?: (optionId: string) => void;
9
+ onSelected?: (optionId: string, item: IItem) => void;
10
10
  }
11
11
  export declare const ItemContainer: React.FC<IItemContainerProps>;
@@ -7,7 +7,7 @@ interface IProps {
7
7
  itemContainer?: IItemContainer | null;
8
8
  slotContainerType: SlotContainerType | null;
9
9
  slotSpriteMask?: ItemSlotType | null;
10
- onSelected: (payload: any) => void;
10
+ onSelected: (selectedOption: string, item: IItem) => void;
11
11
  onMouseOver: (event: any, slotIndex: number, item: IItem | null, x: number, y: number) => void;
12
12
  onMouseOut?: () => void;
13
13
  onClick: (item: IItem, slotContainerType: SlotContainerType | null) => void;
@@ -5975,7 +5975,9 @@ var ItemSlot = /*#__PURE__*/mobxReactLite.observer(function (_ref) {
5975
5975
  onSelected: function onSelected(optionId) {
5976
5976
  setIsContextMenuVisible(false);
5977
5977
 
5978
- _onSelected(optionId);
5978
+ if (item) {
5979
+ _onSelected(optionId, item);
5980
+ }
5979
5981
  },
5980
5982
  onOutsideClick: function onOutsideClick() {
5981
5983
  setIsContextMenuVisible(false);
@@ -6118,8 +6120,8 @@ var ItemContainer = function ItemContainer(_ref) {
6118
6120
  onClick: function onClick(item, slotContainerType) {
6119
6121
  if (onItemClick) onItemClick(item, slotContainerType);
6120
6122
  },
6121
- onSelected: function onSelected(optionId) {
6122
- if (_onSelected) _onSelected(optionId);
6123
+ onSelected: function onSelected(optionId, item) {
6124
+ if (_onSelected) _onSelected(optionId, item);
6123
6125
  }
6124
6126
  }));
6125
6127
  }
@@ -6920,8 +6922,8 @@ var SkillsContainer = function SkillsContainer(_ref) {
6920
6922
  skillName: _.capitalize(key),
6921
6923
  bgColor: skillCategoryColor,
6922
6924
  level: skillDetails.level || 0,
6923
- skillPoints: skillDetails.skillPoints || 0,
6924
- skillPointsToNextLevel: skillDetails.skillPointsToNextLevel || 0,
6925
+ skillPoints: Math.round(skillDetails.skillPoints) || 0,
6926
+ skillPointsToNextLevel: Math.round(skillDetails.skillPointsToNextLevel) || 0,
6925
6927
  texturePath: value
6926
6928
  }));
6927
6929
  }
@@ -6939,9 +6941,9 @@ var SkillsContainer = function SkillsContainer(_ref) {
6939
6941
  }), React__default.createElement(SkillProgressBar, {
6940
6942
  skillName: 'Level',
6941
6943
  bgColor: colors.navyBlue,
6942
- level: skill.level || 0,
6943
- skillPoints: skill.experience || 0,
6944
- skillPointsToNextLevel: skill.xpToNextLevel || 0,
6944
+ level: Math.round(skill.level) || 0,
6945
+ skillPoints: Math.round(skill.experience) || 0,
6946
+ skillPointsToNextLevel: Math.round(skill.xpToNextLevel) || 0,
6945
6947
  texturePath: 'swords/broad-sword.png'
6946
6948
  }), React__default.createElement("p", null, "Combat Skills"), React__default.createElement("hr", {
6947
6949
  className: "golden"