Skip to content

Commit

Permalink
Merge branch 'feat-mvp' of github.com:Mississippi-Labs/mississippi in…
Browse files Browse the repository at this point in the history
…to feat-mvp
  • Loading branch information
LidamaoHub committed Oct 18, 2023
2 parents b494996 + 638159e commit 3fdbf0d
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 5 deletions.
2 changes: 1 addition & 1 deletion packages/contracts/script/BattleConfigInit.sol
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import {BattleConfig} from "../src/codegen/Tables.sol";
import { BATTLE_CONFIG_KEY } from "../src/Constants.sol";

library BattleConfigInit {
function initGameConfig(IWorld _world) internal {
function initBattleConfig(IWorld _world) internal {
address[] memory players;
BattleConfig.set(
_world,
Expand Down
4 changes: 3 additions & 1 deletion packages/contracts/script/PostDeploy.s.sol
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import { console } from "forge-std/console.sol";
import { IWorld } from "../src/codegen/world/IWorld.sol";
import { GameConfigInit } from "./GameConfigInit.sol";
import { BattleConfigInit } from "./BattleConfigInit.sol";
import { GlobalConfigInit } from "./GlobalConfigInit.sol";
import { console } from "forge-std/console.sol";

contract PostDeploy is Script {
Expand All @@ -20,7 +21,8 @@ contract PostDeploy is Script {

// ------------------ INIT ------------------
GameConfigInit.initGameConfig(IWorld(worldAddress));
BattleConfigInit.initGameConfig(IWorld(worldAddress));
BattleConfigInit.initBattleConfig(IWorld(worldAddress));
GlobalConfigInit.initGlobalConfig(IWorld(worldAddress));

vm.stopBroadcast();

Expand Down
2 changes: 1 addition & 1 deletion packages/contracts/src/systems/BattlePrepareSystem.sol
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ contract BattlePrepareSystem is System {
//是否已超时

BattleListData memory battle = BattleList.get(_battleId);
BattleUtils.checkBattlePlayer(battle, _msgSender(), BattleState.Confirmed);
BattleUtils.checkBattlePlayer(battle, _msgSender(), BattleState.Inited);

require(block.timestamp - battle.timestamp < BattleConfig.getMaxTimeLimit(BATTLE_CONFIG_KEY), "Battle is timeout");
// 战斗是否已经选择buff
Expand Down
4 changes: 2 additions & 2 deletions packages/contracts/worlds.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"4242": {
"address": "0x2b50622F55780b14C08a288E41A08b2e2368bA4f",
"blockNumber": 27941048
"address": "0x037451EB237700458Af435ffF1CeFcac037247aD",
"blockNumber": 27950347
},
"31337": {
"address": "0x74Df809b1dfC099E8cdBc98f6a8D1F5c2C3f66f8"
Expand Down

0 comments on commit 3fdbf0d

Please sign in to comment.