fix life and effects
This commit is contained in:
@@ -23,7 +23,7 @@ class GameConstructEffects extends preact.Component {
|
||||
shouldComponentUpdate(newProps) {
|
||||
if (newProps.animText && newProps.animText !== this.props.animText) {
|
||||
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;
|
||||
}
|
||||
if (newProps.construct !== this.props.construct) return true;
|
||||
|
||||
@@ -9,7 +9,7 @@ class GameConstructLife extends preact.Component {
|
||||
shouldComponentUpdate(newProps) {
|
||||
if (newProps.animText && newProps.animText !== this.props.animText) {
|
||||
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;
|
||||
}
|
||||
if (newProps.construct !== this.props.construct) return true;
|
||||
|
||||
Reference in New Issue
Block a user