remove tutorialGame from game.construct
This commit is contained in:
parent
eb12a0a96e
commit
8e90e6e0e3
@ -89,7 +89,6 @@ const addState = connect(
|
||||
animText,
|
||||
gameSkillInfo,
|
||||
itemInfo,
|
||||
tutorialGame,
|
||||
} = state;
|
||||
|
||||
function selectSkillTarget(targetConstructId) {
|
||||
@ -109,7 +108,6 @@ const addState = connect(
|
||||
selectSkillTarget,
|
||||
gameSkillInfo,
|
||||
itemInfo,
|
||||
tutorialGame,
|
||||
};
|
||||
},
|
||||
|
||||
@ -118,11 +116,7 @@ const addState = connect(
|
||||
dispatch(actions.setGameEffectInfo(info));
|
||||
}
|
||||
|
||||
function setTutorialGameClear(activeSkill, tutorialGame) {
|
||||
if (activeSkill && tutorialGame) dispatch(actions.setTutorialGame(null));
|
||||
}
|
||||
|
||||
return { setGameEffectInfo, setTutorialGameClear };
|
||||
return { setGameEffectInfo };
|
||||
}
|
||||
|
||||
);
|
||||
@ -157,7 +151,6 @@ class GameConstruct extends preact.Component {
|
||||
if (newProps.animating !== this.props.animating) return true;
|
||||
if (newProps.construct !== this.props.construct) return true;
|
||||
if (newProps.player !== this.props.player) return true;
|
||||
if (newProps.tutorialGame !== this.props.tutorialGame) return true;
|
||||
if (newProps.gameSkillInfo !== this.props.gameSkillInfo) return true;
|
||||
return false;
|
||||
}
|
||||
@ -171,14 +164,12 @@ class GameConstruct extends preact.Component {
|
||||
animating,
|
||||
construct,
|
||||
player,
|
||||
tutorialGame,
|
||||
gameSkillInfo,
|
||||
// Constants
|
||||
i,
|
||||
itemInfo,
|
||||
// Functions
|
||||
selectSkillTarget,
|
||||
setTutorialGameClear,
|
||||
setGameEffectInfo,
|
||||
} = this.props;
|
||||
|
||||
@ -233,7 +224,6 @@ class GameConstruct extends preact.Component {
|
||||
<div
|
||||
onClick={() => {
|
||||
selectSkillTarget(construct.id);
|
||||
setTutorialGameClear(activeSkill, tutorialGame);
|
||||
}}
|
||||
style={ activeSkill ? { cursor: 'pointer' } : {}}
|
||||
class={`game-construct ${ko} ${cssClass}`}>
|
||||
|
||||
@ -32,6 +32,11 @@ function registerEvents(store) {
|
||||
}
|
||||
|
||||
|
||||
function clearTutorialGame() {
|
||||
store.dispatch(actions.setTutorialGame(null));
|
||||
}
|
||||
|
||||
|
||||
function setPing(ping) {
|
||||
store.dispatch(actions.setPing(ping));
|
||||
}
|
||||
@ -351,6 +356,7 @@ function registerEvents(store) {
|
||||
clearInstance,
|
||||
clearMtxActive,
|
||||
clearTutorial,
|
||||
clearTutorialGame,
|
||||
setAccount,
|
||||
setAccountInstances,
|
||||
setActiveItem,
|
||||
|
||||
@ -129,6 +129,7 @@ function createSocket(events) {
|
||||
{ game_id: gameId, construct_id: constructId, target_construct_id: targetConstructId, skill },
|
||||
]);
|
||||
events.setActiveSkill(null);
|
||||
events.clearTutorialGame();
|
||||
}
|
||||
|
||||
function sendGameSkillClear(gameId) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user