From e47fee33c1797935a4e87c82cdaa7439a95111f6 Mon Sep 17 00:00:00 2001 From: Joshua Sigona Date: Tue, 24 Aug 2021 19:45:12 +0900 Subject: [PATCH] Committing the save button. --- src/TestPanel.js | 32 ++++++++++++++++++++++++-------- 1 file changed, 24 insertions(+), 8 deletions(-) diff --git a/src/TestPanel.js b/src/TestPanel.js index 8a64067..39aeffe 100644 --- a/src/TestPanel.js +++ b/src/TestPanel.js @@ -184,9 +184,8 @@ function SkillBox(p) { { var temp=[...p.points] var tempData=[...p.skillPointData] - while (tempData[p.page-1].length0) { temp[p.page-1]-=1 @@ -197,9 +196,8 @@ function SkillBox(p) { { var temp=[...p.points] var tempData=[...p.skillPointData] - while (tempData[p.page-1].length {p.skillTreeSkillData&&p.skillTreeSkillData.map((skill,i)=>{ var splitter = skill.split(",") - return splitter[0]!==""&&splitter[1]!==""&&splitter[2]!==""&&0?"skillActive":""} boxId={i} skillPointData={p.skillPointData} setSkillPointData={p.setSkillPointData} page={p.page} cl={p.cl} maxPoints={GetHighestLevel(splitter[2])} points={p.points} setPoints={p.setPoints} GetData={p.GetData} skill={splitter.map((numb)=>Number(numb))}/> + return splitter[0]!==""&&splitter[1]!==""&&splitter[2]!==""&&0?"skillActive":""} boxId={splitter[0]+"_"+splitter[1]} skillPointData={p.skillPointData} setSkillPointData={p.setSkillPointData} page={p.page} cl={p.cl} maxPoints={GetHighestLevel(splitter[2])} points={p.points} setPoints={p.setPoints} GetData={p.GetData} skill={splitter.map((numb)=>Number(numb))}/> })} } @@ -325,6 +323,24 @@ const [classNameSetter,setClassNameSetter] = useState(0) const [points,setPoints] = useState([]) const [skillPointData,setSkillPointData] = useState([]) +function SaveData() { + var saveObj = { + author:author, + buildName:buildName, + className:className, + subclassName:subclassName, + level:level, + secondaryLevel:secondaryLevel, + weaponId:selectedWeapon[WEAPON_WEAPON].id, + armor1Id:selectedArmor1.id, + armor2Id:selectedArmor2.id, + armor3Id:selectedArmor3.id, + points:points, + skillPointData:skillPointData + } + console.log(saveObj) +} + function rarityCheck(v) { return v!==undefined?v.rarity!==undefined?" r"+v.rarity:"":"" } @@ -400,7 +416,7 @@ useEffect(()=>{
Damage Resist.
{(p.damageResist*100).toFixed(1)}%
- +