fixed auto-attack bugs and other shenanigans

dependabot/npm_and_yarn/react-scripts-4.0.3
Rawrington 5 years ago
parent 9a3660bb6d
commit fdeb281d8b
  1. 2
      src/ACTWebsocket.js
  2. 2
      src/Action.js
  3. 3
      src/App.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')

@ -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})})

@ -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

Loading…
Cancel
Save