@@ -15,10 +15,10 @@ contract DAOFacet is Modifiers {
1515 event AddCollateralType (AavegotchiCollateralTypeIO _collateralType );
1616 event AddItemType (ItemType _itemType );
1717 event CreateHaunt (uint256 indexed _hauntId , uint256 _hauntMaxSize , uint256 _portalPrice , bytes32 _bodyColor );
18- event GrantExperience (uint256 [] _tokenIds , uint32 [] _xpValues );
18+ event GrantExperience (uint256 [] _tokenIds , uint256 [] _xpValues );
1919 event AddWearableSet (WearableSet _wearableSet );
2020 event GameManagerTransferred (address indexed previousGameManager , address indexed newGameManager );
21- event ItemTypeMaxQuantity (uint256 [] _itemIds , uint32 [] _maxQuanities );
21+ event ItemTypeMaxQuantity (uint256 [] _itemIds , uint256 [] _maxQuanities );
2222
2323 /***********************************|
2424 | Read Functions |
@@ -58,11 +58,11 @@ contract DAOFacet is Modifiers {
5858 s.collateralTypeInfo[_collateralType].modifiers = _modifiers;
5959 }
6060
61- function updateItemTypeMaxQuantity (uint256 [] calldata _itemIds , uint32 [] calldata _maxQuantities ) external onlyOwnerOrDaoOrGameManager {
61+ function updateItemTypeMaxQuantity (uint256 [] calldata _itemIds , uint256 [] calldata _maxQuantities ) external onlyOwnerOrDaoOrGameManager {
6262 require (_itemIds.length == _maxQuantities.length , "DAOFacet: _itemIds length not the same as _newQuantities length " );
6363 for (uint256 i; i < _itemIds.length ; i++ ) {
6464 uint256 itemId = _itemIds[i];
65- uint32 maxQuantity = _maxQuantities[i];
65+ uint256 maxQuantity = _maxQuantities[i];
6666 require (maxQuantity >= s.itemTypes[itemId].totalQuantity, "DAOFacet: maxQuantity is greater than existing quantity " );
6767 s.itemTypes[itemId].maxQuantity = maxQuantity;
6868 }
@@ -105,17 +105,17 @@ contract DAOFacet is Modifiers {
105105 require (totalQuantity <= s.itemTypes[itemId].maxQuantity, "DAOFacet: Total item type quantity exceeds max quantity " );
106106
107107 LibItems.addToOwner (_to, itemId, quantity);
108- s.itemTypes[itemId].totalQuantity = uint32 ( totalQuantity) ;
108+ s.itemTypes[itemId].totalQuantity = totalQuantity;
109109 }
110110 emit LibERC1155.TransferBatch (sender, address (0 ), _to, _itemIds, _quantities);
111111 LibERC1155.onERC1155BatchReceived (sender, address (0 ), _to, _itemIds, _quantities, "" );
112112 }
113113
114- function grantExperience (uint256 [] calldata _tokenIds , uint32 [] calldata _xpValues ) external onlyOwnerOrDaoOrGameManager {
114+ function grantExperience (uint256 [] calldata _tokenIds , uint256 [] calldata _xpValues ) external onlyOwnerOrDaoOrGameManager {
115115 require (_tokenIds.length == _xpValues.length , "DAOFacet: IDs must match XP array length " );
116116 for (uint256 i; i < _tokenIds.length ; i++ ) {
117117 uint256 tokenId = _tokenIds[i];
118- uint32 xp = _xpValues[i];
118+ uint256 xp = _xpValues[i];
119119 require (xp <= 1000 , "DAOFacet: Cannot grant more than 1000 XP at a time " );
120120
121121 //To test (Dan): Deal with overflow here? - Handling it just in case
0 commit comments