From fdeb281d8b53f6289bcb3408eb321f9014ccd8dd Mon Sep 17 00:00:00 2001 From: Rawrington Date: Tue, 9 Jul 2019 19:02:20 +0100 Subject: [PATCH] fixed auto-attack bugs and other shenanigans --- src/ACTWebsocket.js | 2 -- src/Action.js | 2 -- src/App.js | 3 +-- 3 files changed, 1 insertion(+), 6 deletions(-) diff --git a/src/ACTWebsocket.js b/src/ACTWebsocket.js index 46ec0d3..93cb01f 100644 --- a/src/ACTWebsocket.js +++ b/src/ACTWebsocket.js @@ -9,8 +9,6 @@ export default function listenActWebSocket(callback) { const obj = JSON.parse(e.data) if(obj.msgtype === 'SendCharName') { - console.log(obj.msg.charID) - console.log(obj.msg.charName) return callback(obj.msg) } else if(obj.msgtype === 'Chat') diff --git a/src/Action.js b/src/Action.js index 166f563..0201d6e 100644 --- a/src/Action.js +++ b/src/Action.js @@ -11,8 +11,6 @@ class Action extends React.Component { const actionUrl = "https://xivapi.com/Action/"+props.action_id; - console.log(actionUrl) - fetch(actionUrl, { mode: 'cors' }) .then(response => response.json()) .then(data => {this.setState({xivapi_data: data})}) diff --git a/src/App.js b/src/App.js index a9751a1..fc7c3b2 100644 --- a/src/App.js +++ b/src/App.js @@ -27,7 +27,6 @@ class App extends React.Component { handleLogEvent(data) { if(data.charID) { this.setState({me: data.charID}) - console.log(data.charID) return } //the ME data we need @@ -41,7 +40,7 @@ class App extends React.Component { const action = parseInt(log[4],16) - if(action === 7) return //auto-attack + if(action <= 8) return //things we don't care about const index = this.state.actionindex