fixed auto-attack bugs and other shenanigans
This commit is contained in:
parent
9a3660bb6d
commit
fdeb281d8b
@ -9,8 +9,6 @@ export default function listenActWebSocket(callback) {
|
|||||||
const obj = JSON.parse(e.data)
|
const obj = JSON.parse(e.data)
|
||||||
if(obj.msgtype === 'SendCharName')
|
if(obj.msgtype === 'SendCharName')
|
||||||
{
|
{
|
||||||
console.log(obj.msg.charID)
|
|
||||||
console.log(obj.msg.charName)
|
|
||||||
return callback(obj.msg)
|
return callback(obj.msg)
|
||||||
}
|
}
|
||||||
else if(obj.msgtype === 'Chat')
|
else if(obj.msgtype === 'Chat')
|
||||||
|
@ -11,8 +11,6 @@ class Action extends React.Component {
|
|||||||
|
|
||||||
const actionUrl = "https://xivapi.com/Action/"+props.action_id;
|
const actionUrl = "https://xivapi.com/Action/"+props.action_id;
|
||||||
|
|
||||||
console.log(actionUrl)
|
|
||||||
|
|
||||||
fetch(actionUrl, { mode: 'cors' })
|
fetch(actionUrl, { mode: 'cors' })
|
||||||
.then(response => response.json())
|
.then(response => response.json())
|
||||||
.then(data => {this.setState({xivapi_data: data})})
|
.then(data => {this.setState({xivapi_data: data})})
|
||||||
|
@ -27,7 +27,6 @@ class App extends React.Component {
|
|||||||
handleLogEvent(data) {
|
handleLogEvent(data) {
|
||||||
if(data.charID) {
|
if(data.charID) {
|
||||||
this.setState({me: data.charID})
|
this.setState({me: data.charID})
|
||||||
console.log(data.charID)
|
|
||||||
return
|
return
|
||||||
} //the ME data we need
|
} //the ME data we need
|
||||||
|
|
||||||
@ -41,7 +40,7 @@ class App extends React.Component {
|
|||||||
|
|
||||||
const action = parseInt(log[4],16)
|
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
|
const index = this.state.actionindex
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user