Skip to content

Commit

Permalink
fix _getHeroIdx
Browse files Browse the repository at this point in the history
  • Loading branch information
aLIEzsss4 committed Sep 12, 2023
1 parent ae3f384 commit 1a429d5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/contracts/src/systems/PveBotSystem.sol
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ contract PveBotSystem is System {
function _getHeroIdx(address player) internal returns (bytes32 idx) {
uint32 i = Player.getHeroOrderIdx(player);

idx = bytes32(uint256((uint160(player) << 32) + ++i));
idx = bytes32((uint256(uint160(player)) << 96) + ++i);

Player.setHeroOrderIdx(player, i);
}
Expand Down

0 comments on commit 1a429d5

Please sign in to comment.