fix life and effects
This commit is contained in:
parent
64a9d8f51f
commit
255131730c
@ -10,7 +10,6 @@ function setAnimations(r, store, account) {
|
|||||||
if (r.event[0] === 'Cast') {
|
if (r.event[0] === 'Cast') {
|
||||||
store.dispatch(actions.setAnimText(null));
|
store.dispatch(actions.setAnimText(null));
|
||||||
|
|
||||||
debugger
|
|
||||||
const { construct, direction: [x, y] } = r.event[1];
|
const { construct, direction: [x, y] } = r.event[1];
|
||||||
const animY = y && player === account.id ? -1 : y;
|
const animY = y && player === account.id ? -1 : y;
|
||||||
const animSource = {
|
const animSource = {
|
||||||
|
|||||||
@ -23,7 +23,7 @@ class GameConstructEffects extends preact.Component {
|
|||||||
shouldComponentUpdate(newProps) {
|
shouldComponentUpdate(newProps) {
|
||||||
if (newProps.animText && newProps.animText !== this.props.animText) {
|
if (newProps.animText && newProps.animText !== this.props.animText) {
|
||||||
const [type, info] = newProps.animText.event;
|
const [type, info] = newProps.animText.event;
|
||||||
if (info.target === this.props.construct.id
|
if (info.construct === this.props.construct.id
|
||||||
&& (type === 'Effect' || type === 'Removal')) return true;
|
&& (type === 'Effect' || type === 'Removal')) return true;
|
||||||
}
|
}
|
||||||
if (newProps.construct !== this.props.construct) return true;
|
if (newProps.construct !== this.props.construct) return true;
|
||||||
|
|||||||
@ -9,7 +9,7 @@ class GameConstructLife extends preact.Component {
|
|||||||
shouldComponentUpdate(newProps) {
|
shouldComponentUpdate(newProps) {
|
||||||
if (newProps.animText && newProps.animText !== this.props.animText) {
|
if (newProps.animText && newProps.animText !== this.props.animText) {
|
||||||
const [type, info] = newProps.animText.event;
|
const [type, info] = newProps.animText.event;
|
||||||
if (info.target === this.props.construct.id
|
if (info.construct === this.props.construct.id
|
||||||
&& (type === 'Damage' || type === 'Healing' || type === 'Recharge')) return true;
|
&& (type === 'Damage' || type === 'Healing' || type === 'Recharge')) return true;
|
||||||
}
|
}
|
||||||
if (newProps.construct !== this.props.construct) return true;
|
if (newProps.construct !== this.props.construct) return true;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user