|
|
@ -4,6 +4,9 @@ import { DisplayIcon } from './DEFAULTS'; |
|
|
|
import { ExpandTooltip } from './components/ExpandTooltip'; |
|
|
|
import { ExpandTooltip } from './components/ExpandTooltip'; |
|
|
|
import { SkillTree } from './skilltree/skillTree'; |
|
|
|
import { SkillTree } from './skilltree/skillTree'; |
|
|
|
import axios from 'axios'; |
|
|
|
import axios from 'axios'; |
|
|
|
|
|
|
|
import Helmet from 'react-helmet' |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
import { useLocation,useHistory,useParams,matchPath } from 'react-router'; |
|
|
|
|
|
|
|
|
|
|
|
//Helper variables for Weapon selector with structure: [weapon_type,weapon,potential,potential_tooltip,weapon_existence_data]
|
|
|
|
//Helper variables for Weapon selector with structure: [weapon_type,weapon,potential,potential_tooltip,weapon_existence_data]
|
|
|
|
const WEAPON_WEAPONTYPE=0;const WEAPON_WEAPON=1;const WEAPON_POTENTIAL=2;const WEAPON_POTENTIAL_TOOLTIP=3;const WEAPON_EXISTENCE_DATA=4; |
|
|
|
const WEAPON_WEAPONTYPE=0;const WEAPON_WEAPON=1;const WEAPON_POTENTIAL=2;const WEAPON_POTENTIAL_TOOLTIP=3;const WEAPON_EXISTENCE_DATA=4; |
|
|
@ -286,7 +289,12 @@ function SkillTreeContainer(p){ |
|
|
|
|
|
|
|
|
|
|
|
function TestPanel(p) { |
|
|
|
function TestPanel(p) { |
|
|
|
|
|
|
|
|
|
|
|
const { GetData,LOGGEDINUSER,BUILDID,BACKENDURL,setBUILDID } = p |
|
|
|
|
|
|
|
|
|
|
|
let { BUILDID } = useParams() |
|
|
|
|
|
|
|
let history = useHistory(); |
|
|
|
|
|
|
|
let location = useLocation(); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const { GetData,LOGGEDINUSER,LOGGEDINHASH,BACKENDURL,APP_TITLE } = p |
|
|
|
|
|
|
|
|
|
|
|
const [bpGraphMax,setbpGraphMax] = useState(1000) |
|
|
|
const [bpGraphMax,setbpGraphMax] = useState(1000) |
|
|
|
const [hpGraphMax,sethpGraphMax] = useState(1000) |
|
|
|
const [hpGraphMax,sethpGraphMax] = useState(1000) |
|
|
@ -323,10 +331,6 @@ const [classNameSetter,setClassNameSetter] = useState(0) |
|
|
|
const [points,setPoints] = useState([]) |
|
|
|
const [points,setPoints] = useState([]) |
|
|
|
const [skillPointData,setSkillPointData] = useState([]) |
|
|
|
const [skillPointData,setSkillPointData] = useState([]) |
|
|
|
|
|
|
|
|
|
|
|
useEffect(()=>{ |
|
|
|
|
|
|
|
console.log(skillPointData) |
|
|
|
|
|
|
|
},[skillPointData]) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
function SaveData() { |
|
|
|
function SaveData() { |
|
|
|
var saveObj = { |
|
|
|
var saveObj = { |
|
|
|
level:level, |
|
|
|
level:level, |
|
|
@ -342,16 +346,28 @@ function SaveData() { |
|
|
|
axios.post(BACKENDURL+"/submitBuild",{ |
|
|
|
axios.post(BACKENDURL+"/submitBuild",{ |
|
|
|
id:BUILDID, |
|
|
|
id:BUILDID, |
|
|
|
username:LOGGEDINUSER, |
|
|
|
username:LOGGEDINUSER, |
|
|
|
|
|
|
|
pass:LOGGEDINHASH, |
|
|
|
creator:author, |
|
|
|
creator:author, |
|
|
|
build_name:buildName, |
|
|
|
build_name:buildName, |
|
|
|
class1:className, |
|
|
|
class1:className, |
|
|
|
class2:subclassName, |
|
|
|
class2:subclassName, |
|
|
|
data:JSON.stringify(saveObj),}) |
|
|
|
data:JSON.stringify(saveObj),}) |
|
|
|
.then((data)=>{ |
|
|
|
.then((data)=>{ |
|
|
|
setBUILDID(data.data.id) |
|
|
|
const match=matchPath(location.pathname,{ |
|
|
|
|
|
|
|
path:p.path, |
|
|
|
|
|
|
|
exact:true, |
|
|
|
|
|
|
|
strict:false |
|
|
|
|
|
|
|
}) |
|
|
|
|
|
|
|
history.push(match.path.replace("/:BUILDID","")+"/"+data.data.id) |
|
|
|
}) |
|
|
|
}) |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
function LoadData(build) { |
|
|
|
|
|
|
|
if (build) { |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
function rarityCheck(v) { |
|
|
|
function rarityCheck(v) { |
|
|
|
return v!==undefined?v.rarity!==undefined?" r"+v.rarity:"":"" |
|
|
|
return v!==undefined?v.rarity!==undefined?" r"+v.rarity:"":"" |
|
|
|
} |
|
|
|
} |
|
|
@ -387,9 +403,17 @@ useEffect(()=>{ |
|
|
|
setSkillPointData(pointsDataArr) |
|
|
|
setSkillPointData(pointsDataArr) |
|
|
|
},[className,GetData]) |
|
|
|
},[className,GetData]) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
useEffect(()=>{ |
|
|
|
|
|
|
|
LoadData(BUILDID) |
|
|
|
|
|
|
|
},[BUILDID]) |
|
|
|
|
|
|
|
|
|
|
|
//console.log(p.GetData("class",p.className,"icon"))
|
|
|
|
//console.log(p.GetData("class",p.className,"icon"))
|
|
|
|
|
|
|
|
|
|
|
|
return (<> |
|
|
|
return (<> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<Helmet> |
|
|
|
|
|
|
|
<title>{"Test - "+APP_TITLE+(BUILDID?" Build #"+BUILDID:"")}</title> |
|
|
|
|
|
|
|
</Helmet> |
|
|
|
<div className="main"> |
|
|
|
<div className="main"> |
|
|
|
<div className="containerA"> |
|
|
|
<div className="containerA"> |
|
|
|
<div className="box basicInfoBox"> |
|
|
|
<div className="box basicInfoBox"> |
|
|
|