diff --git a/client/src/components/anims/absorb.jsx b/client/src/components/anims/absorb.jsx index f32f47b6..d4f99252 100644 --- a/client/src/components/anims/absorb.jsx +++ b/client/src/components/anims/absorb.jsx @@ -90,7 +90,7 @@ class Absorb extends Component { for (let i = this.animations.length - 1; i >= 0; i--) { this.animations[i].reset(); } - this.props.animCb(); + this.props.animCb && this.props.animCb(); } } diff --git a/client/src/components/anims/amplify.jsx b/client/src/components/anims/amplify.jsx index 2e82270e..86b67c7d 100644 --- a/client/src/components/anims/amplify.jsx +++ b/client/src/components/anims/amplify.jsx @@ -78,7 +78,7 @@ class Amplify extends Component { for (let i = this.animations.length - 1; i >= 0; i--) { this.animations[i].reset(); } - this.props.animCb(); + this.props.animCb && this.props.animCb(); } } diff --git a/client/src/components/anims/attack.jsx b/client/src/components/anims/attack.jsx index 6e580daf..65756c1f 100644 --- a/client/src/components/anims/attack.jsx +++ b/client/src/components/anims/attack.jsx @@ -59,7 +59,7 @@ class Attack extends Component { for (let i = this.animations.length - 1; i >= 0; i--) { this.animations[i].reset(); } - this.props.animCb(); + this.props.animCb && this.props.animCb(); } } diff --git a/client/src/components/anims/bash.circle.jsx b/client/src/components/anims/bash.circle.jsx index c202e664..866b5d59 100644 --- a/client/src/components/anims/bash.circle.jsx +++ b/client/src/components/anims/bash.circle.jsx @@ -100,7 +100,7 @@ class Bash extends Component { for (let i = this.animations.length - 1; i >= 0; i--) { this.animations[i].reset(); } - this.props.animCb(); + this.props.animCb && this.props.animCb(); } } diff --git a/client/src/components/anims/bash.jsx b/client/src/components/anims/bash.jsx index 81e43d6f..c8e3894d 100644 --- a/client/src/components/anims/bash.jsx +++ b/client/src/components/anims/bash.jsx @@ -103,7 +103,7 @@ class Bash extends Component { for (let i = this.animations.length - 1; i >= 0; i--) { this.animations[i].reset(); } - this.props.animCb(); + this.props.animCb && this.props.animCb(); } } diff --git a/client/src/components/anims/blast.jsx b/client/src/components/anims/blast.jsx index b8163225..21d985fa 100644 --- a/client/src/components/anims/blast.jsx +++ b/client/src/components/anims/blast.jsx @@ -88,7 +88,7 @@ class Blast extends Component { for (let i = this.animations.length - 1; i >= 0; i--) { this.animations[i].reset(); } - this.props.animCb(); + this.props.animCb && this.props.animCb(); } } diff --git a/client/src/components/anims/block.jsx b/client/src/components/anims/block.jsx index 5ea544a8..a962b11d 100644 --- a/client/src/components/anims/block.jsx +++ b/client/src/components/anims/block.jsx @@ -53,7 +53,7 @@ class Block extends Component { for (let i = this.animations.length - 1; i >= 0; i--) { this.animations[i].reset(); } - this.props.animCb(); + this.props.animCb && this.props.animCb(); } } diff --git a/client/src/components/anims/break.jsx b/client/src/components/anims/break.jsx index f0fb7e07..9663bce6 100644 --- a/client/src/components/anims/break.jsx +++ b/client/src/components/anims/break.jsx @@ -107,7 +107,7 @@ class Break extends Component { for (let i = this.animations.length - 1; i >= 0; i--) { this.animations[i].reset(); } - this.props.animCb(); + this.props.animCb && this.props.animCb(); } } diff --git a/client/src/components/anims/buff.jsx b/client/src/components/anims/buff.jsx index e49e556f..c73081d0 100644 --- a/client/src/components/anims/buff.jsx +++ b/client/src/components/anims/buff.jsx @@ -81,7 +81,7 @@ class Buff extends Component { for (let i = this.animations.length - 1; i >= 0; i--) { this.animations[i].reset(); } - this.props.animCb(); + this.props.animCb && this.props.animCb(); } } diff --git a/client/src/components/anims/chaos.jsx b/client/src/components/anims/chaos.jsx index 288501ba..19d5eadb 100644 --- a/client/src/components/anims/chaos.jsx +++ b/client/src/components/anims/chaos.jsx @@ -120,7 +120,7 @@ class Chaos extends Component { for (let i = this.animations.length - 1; i >= 0; i--) { this.animations[i].reset(); } - this.props.animCb(); + this.props.animCb && this.props.animCb(); } } diff --git a/client/src/components/anims/counter.jsx b/client/src/components/anims/counter.jsx index 0815f974..0ae9d709 100644 --- a/client/src/components/anims/counter.jsx +++ b/client/src/components/anims/counter.jsx @@ -85,7 +85,7 @@ class Counter extends Component { for (let i = this.animations.length - 1; i >= 0; i--) { this.animations[i].reset(); } - this.props.animCb(); + this.props.animCb && this.props.animCb(); } } diff --git a/client/src/components/anims/curse.jsx b/client/src/components/anims/curse.jsx index 8ccfb2b7..0747b1c8 100644 --- a/client/src/components/anims/curse.jsx +++ b/client/src/components/anims/curse.jsx @@ -78,7 +78,7 @@ class Curse extends Component { for (let i = this.animations.length - 1; i >= 0; i--) { this.animations[i].reset(); } - this.props.animCb(); + this.props.animCb && this.props.animCb(); } } diff --git a/client/src/components/anims/debuff.jsx b/client/src/components/anims/debuff.jsx index 72fac14f..0f68d33d 100644 --- a/client/src/components/anims/debuff.jsx +++ b/client/src/components/anims/debuff.jsx @@ -83,7 +83,7 @@ class Debuff extends Component { for (let i = this.animations.length - 1; i >= 0; i--) { this.animations[i].reset(); } - this.props.animCb(); + this.props.animCb && this.props.animCb(); } } diff --git a/client/src/components/anims/decay.jsx b/client/src/components/anims/decay.jsx index 2759b8fd..ebd67e7d 100644 --- a/client/src/components/anims/decay.jsx +++ b/client/src/components/anims/decay.jsx @@ -68,7 +68,7 @@ class Decay extends Component { for (let i = this.animations.length - 1; i >= 0; i--) { this.animations[i].reset(); } - this.props.animCb(); + this.props.animCb && this.props.animCb(); } } diff --git a/client/src/components/anims/electrify.jsx b/client/src/components/anims/electrify.jsx index 2e9a51cc..a0226894 100644 --- a/client/src/components/anims/electrify.jsx +++ b/client/src/components/anims/electrify.jsx @@ -109,7 +109,7 @@ class Electrify extends Component { for (let i = this.animations.length - 1; i >= 0; i--) { this.animations[i].reset(); } - this.props.animCb(); + this.props.animCb && this.props.animCb(); } } diff --git a/client/src/components/anims/electrocute.jsx b/client/src/components/anims/electrocute.jsx index f33432e9..0d8fdc79 100644 --- a/client/src/components/anims/electrocute.jsx +++ b/client/src/components/anims/electrocute.jsx @@ -101,7 +101,7 @@ class Electrocute extends Component { for (let i = this.animations.length - 1; i >= 0; i--) { this.animations[i].reset(); } - this.props.animCb(); + this.props.animCb && this.props.animCb(); } } diff --git a/client/src/components/anims/haste.jsx b/client/src/components/anims/haste.jsx index 8438d8f7..b93a7b68 100644 --- a/client/src/components/anims/haste.jsx +++ b/client/src/components/anims/haste.jsx @@ -83,7 +83,7 @@ class Haste extends Component { for (let i = this.animations.length - 1; i >= 0; i--) { this.animations[i].reset(); } - this.props.animCb(); + this.props.animCb && this.props.animCb(); } } diff --git a/client/src/components/anims/heal.jsx b/client/src/components/anims/heal.jsx index 78684aa0..5a36cd98 100644 --- a/client/src/components/anims/heal.jsx +++ b/client/src/components/anims/heal.jsx @@ -81,7 +81,7 @@ class Heal extends Component { for (let i = this.animations.length - 1; i >= 0; i--) { this.animations[i].reset(); } - this.props.animCb(); + this.props.animCb && this.props.animCb(); } } diff --git a/client/src/components/anims/hex.jsx b/client/src/components/anims/hex.jsx index 4be435b1..c279225d 100644 --- a/client/src/components/anims/hex.jsx +++ b/client/src/components/anims/hex.jsx @@ -88,7 +88,7 @@ class Hex extends Component { for (let i = this.animations.length - 1; i >= 0; i--) { this.animations[i].reset(); } - this.props.animCb(); + this.props.animCb && this.props.animCb(); } } diff --git a/client/src/components/anims/hybrid.jsx b/client/src/components/anims/hybrid.jsx index 0b369d7b..7f2a2a58 100644 --- a/client/src/components/anims/hybrid.jsx +++ b/client/src/components/anims/hybrid.jsx @@ -153,7 +153,7 @@ class Hybrid extends Component { for (let i = this.animations.length - 1; i >= 0; i--) { this.animations[i].reset(); } - this.props.animCb(); + this.props.animCb && this.props.animCb(); } } diff --git a/client/src/components/anims/intercept.jsx b/client/src/components/anims/intercept.jsx index 745f67f3..c5ee6b2a 100644 --- a/client/src/components/anims/intercept.jsx +++ b/client/src/components/anims/intercept.jsx @@ -96,7 +96,7 @@ class Intercept extends Component { for (let i = this.animations.length - 1; i >= 0; i--) { this.animations[i].reset(); } - this.props.animCb(); + this.props.animCb && this.props.animCb(); } } diff --git a/client/src/components/anims/link.jsx b/client/src/components/anims/link.jsx index 6f6ebf32..e20d5bbf 100644 --- a/client/src/components/anims/link.jsx +++ b/client/src/components/anims/link.jsx @@ -91,7 +91,7 @@ class Link extends Component { for (let i = this.animations.length - 1; i >= 0; i--) { this.animations[i].reset(); } - this.props.animCb(); + this.props.animCb && this.props.animCb(); } } diff --git a/client/src/components/anims/purge.jsx b/client/src/components/anims/purge.jsx index da072286..34bd6c68 100644 --- a/client/src/components/anims/purge.jsx +++ b/client/src/components/anims/purge.jsx @@ -81,7 +81,7 @@ class Purge extends Component { for (let i = this.animations.length - 1; i >= 0; i--) { this.animations[i].reset(); } - this.props.animCb(); + this.props.animCb && this.props.animCb(); } } diff --git a/client/src/components/anims/purify.jsx b/client/src/components/anims/purify.jsx index 732a6180..adc83efd 100644 --- a/client/src/components/anims/purify.jsx +++ b/client/src/components/anims/purify.jsx @@ -115,7 +115,7 @@ class Purify extends Component { for (let i = this.animations.length - 1; i >= 0; i--) { this.animations[i].reset(); } - this.props.animCb(); + this.props.animCb && this.props.animCb(); } } diff --git a/client/src/components/anims/recharge.jsx b/client/src/components/anims/recharge.jsx index 169f884e..7f224604 100644 --- a/client/src/components/anims/recharge.jsx +++ b/client/src/components/anims/recharge.jsx @@ -95,7 +95,7 @@ class Recharge extends Component { for (let i = this.animations.length - 1; i >= 0; i--) { this.animations[i].reset(); } - this.props.animCb(); + this.props.animCb && this.props.animCb(); } } diff --git a/client/src/components/anims/red.block.jsx b/client/src/components/anims/red.block.jsx index 9961344c..4adb850d 100644 --- a/client/src/components/anims/red.block.jsx +++ b/client/src/components/anims/red.block.jsx @@ -76,7 +76,7 @@ class Block extends Component { for (let i = this.animations.length - 1; i >= 0; i--) { this.animations[i].reset(); } - this.props.animCb(); + this.props.animCb && this.props.animCb(); } } diff --git a/client/src/components/anims/red.circles.jsx b/client/src/components/anims/red.circles.jsx index 74ff44ce..4b6134e1 100644 --- a/client/src/components/anims/red.circles.jsx +++ b/client/src/components/anims/red.circles.jsx @@ -82,7 +82,7 @@ class Intercept extends Component { for (let i = this.animations.length - 1; i >= 0; i--) { this.animations[i].reset(); } - this.props.animCb(); + this.props.animCb && this.props.animCb(); } } diff --git a/client/src/components/anims/reflect.jsx b/client/src/components/anims/reflect.jsx index 816f1f76..ac18ab0e 100644 --- a/client/src/components/anims/reflect.jsx +++ b/client/src/components/anims/reflect.jsx @@ -77,7 +77,7 @@ class Refl extends Component { for (let i = this.animations.length - 1; i >= 0; i--) { this.animations[i].reset(); } - this.props.animCb(); + this.props.animCb && this.props.animCb(); } } diff --git a/client/src/components/anims/restrict.jsx b/client/src/components/anims/restrict.jsx index f8c1395d..ac663cb8 100644 --- a/client/src/components/anims/restrict.jsx +++ b/client/src/components/anims/restrict.jsx @@ -102,7 +102,7 @@ class Restrict extends Component { for (let i = this.animations.length - 1; i >= 0; i--) { this.animations[i].reset(); } - this.props.animCb(); + this.props.animCb && this.props.animCb(); } } diff --git a/client/src/components/anims/ruin.jsx b/client/src/components/anims/ruin.jsx index 7022f3a0..9738d7a8 100644 --- a/client/src/components/anims/ruin.jsx +++ b/client/src/components/anims/ruin.jsx @@ -100,7 +100,7 @@ class Ruin extends Component { this.animations[i].reset(); } try { - this.props.animCb(); + this.props.animCb && this.props.animCb(); } catch (e) { console.log(e); } diff --git a/client/src/components/anims/silence.jsx b/client/src/components/anims/silence.jsx index bbd40c34..f30d1bb9 100644 --- a/client/src/components/anims/silence.jsx +++ b/client/src/components/anims/silence.jsx @@ -97,7 +97,7 @@ class Silence extends Component { for (let i = this.animations.length - 1; i >= 0; i--) { this.animations[i].reset(); } - this.props.animCb(); + this.props.animCb && this.props.animCb(); } } diff --git a/client/src/components/anims/siphon.jsx b/client/src/components/anims/siphon.jsx index f6812a05..d2f37a83 100644 --- a/client/src/components/anims/siphon.jsx +++ b/client/src/components/anims/siphon.jsx @@ -69,7 +69,7 @@ class Siphon extends Component { for (let i = this.animations.length - 1; i >= 0; i--) { this.animations[i].reset(); } - this.props.animCb(); + this.props.animCb && this.props.animCb(); } } diff --git a/client/src/components/anims/siphon.tick.jsx b/client/src/components/anims/siphon.tick.jsx index accb7b7b..4a0b82e5 100644 --- a/client/src/components/anims/siphon.tick.jsx +++ b/client/src/components/anims/siphon.tick.jsx @@ -116,7 +116,7 @@ class SiphonTick extends Component { for (let i = this.animations.length - 1; i >= 0; i--) { this.animations[i].reset(); } - this.props.animCb(); + this.props.animCb && this.props.animCb(); } } diff --git a/client/src/components/anims/slay.jsx b/client/src/components/anims/slay.jsx index 2713a569..8dbd4941 100644 --- a/client/src/components/anims/slay.jsx +++ b/client/src/components/anims/slay.jsx @@ -152,7 +152,7 @@ class Slay extends Component { for (let i = this.animations.length - 1; i >= 0; i--) { this.animations[i].reset(); } - this.props.animCb(); + this.props.animCb && this.props.animCb(); } } diff --git a/client/src/components/anims/sleep.jsx b/client/src/components/anims/sleep.jsx index a9af121b..6db4077e 100644 --- a/client/src/components/anims/sleep.jsx +++ b/client/src/components/anims/sleep.jsx @@ -140,7 +140,7 @@ class Sleep extends Component { for (let i = this.animations.length - 1; i >= 0; i--) { this.animations[i].reset(); } - this.props.animCb(); + this.props.animCb && this.props.animCb(); } } diff --git a/client/src/components/anims/strike.jsx b/client/src/components/anims/strike.jsx index 5aca4fbc..d8d0df24 100644 --- a/client/src/components/anims/strike.jsx +++ b/client/src/components/anims/strike.jsx @@ -120,7 +120,7 @@ class Strike extends Component { for (let i = this.animations.length - 1; i >= 0; i--) { this.animations[i].reset(); } - this.props.animCb(); + this.props.animCb && this.props.animCb(); } } diff --git a/client/src/components/anims/stun.jsx b/client/src/components/anims/stun.jsx index 5a8eadce..5f53c5a1 100644 --- a/client/src/components/anims/stun.jsx +++ b/client/src/components/anims/stun.jsx @@ -78,7 +78,7 @@ class Stun extends Component { for (let i = this.animations.length - 1; i >= 0; i--) { this.animations[i].reset(); } - this.props.animCb(); + this.props.animCb && this.props.animCb(); } } diff --git a/client/src/components/anims/sustain.jsx b/client/src/components/anims/sustain.jsx index dca163cb..a206e250 100644 --- a/client/src/components/anims/sustain.jsx +++ b/client/src/components/anims/sustain.jsx @@ -127,7 +127,7 @@ class Sustain extends Component { for (let i = this.animations.length - 1; i >= 0; i--) { this.animations[i].reset(); } - this.props.animCb(); + this.props.animCb && this.props.animCb(); } } diff --git a/client/src/components/anims/triage.jsx b/client/src/components/anims/triage.jsx index cf7edc15..73d11d92 100644 --- a/client/src/components/anims/triage.jsx +++ b/client/src/components/anims/triage.jsx @@ -80,7 +80,7 @@ class Triage extends Component { for (let i = this.animations.length - 1; i >= 0; i--) { this.animations[i].reset(); } - this.props.animCb(); + this.props.animCb && this.props.animCb(); } } diff --git a/client/src/components/anims/triage.tick.jsx b/client/src/components/anims/triage.tick.jsx index 06878d18..afeb6034 100644 --- a/client/src/components/anims/triage.tick.jsx +++ b/client/src/components/anims/triage.tick.jsx @@ -79,7 +79,7 @@ class TriageTick extends Component { for (let i = this.animations.length - 1; i >= 0; i--) { this.animations[i].reset(); } - this.props.animCb(); + this.props.animCb && this.props.animCb(); } } diff --git a/client/src/components/demo.jsx b/client/src/components/demo.jsx index b06b191e..9fabd2ba 100644 --- a/client/src/components/demo.jsx +++ b/client/src/components/demo.jsx @@ -173,18 +173,23 @@ function Demo(args) { setTimeout(() => { setAnimTarget({ skill: sample(itemInfo.items.filter(i => i.skill)).item, - constructId: [sample(demo[1].constructs).id], + constructId: [this.state.side ? demo[1].constructs[0].id : demo[1].constructs[1].id], player: Math.round(Math.random()), direction: 0, }); + this.setState({ side: !this.state.side }); + // setTimeout(setAnimTarget(null), 5000); - }, 2000); + }, 6000); const gameDemo = () => { return (
Outplay noobs wahtever write tomorrow, fix the tiemout shit.
+