diff --git a/src/components/skillsInfo/index.tsx b/src/components/skillsInfo/index.tsx
index eb6530b..081094e 100644
--- a/src/components/skillsInfo/index.tsx
+++ b/src/components/skillsInfo/index.tsx
@@ -88,7 +88,7 @@ export default function SkillsInfo() {
}
if (result && result.length > 0) {
return {
- isServant: false,
+ isServant: false,
data: result,
servantData: null,
}
@@ -170,53 +170,101 @@ export default function SkillsInfo() {
return null
}
return (
-
{
- setSkillSelected(btn.id === skillSelected ? null : btn.id)
- }}
- style={{
- left: btn.left,
- top: btn.top,
- transform: "translate(-50%, -50%)",
- }}
- >
-
{
+ setSkillSelected(btn.id === skillSelected ? null : btn.id)
+ }}
style={{
- filter: btn.size !== "big"
- ? 'brightness(0%)'
- : 'brightness(200%)'
+ left: btn.left,
+ top: btn.top,
+ transform: "translate(-50%, -50%)",
}}
- onError={(e) => {
- e.currentTarget.onerror = null; // trĂ¡nh loop
- e.currentTarget.src = getImageSkill(avatarInfo?.SkillTrees?.[btn.id]?.["1"]?.Icon, avatarSkillTree?.[btn.id]?.["1"]?.StatusAddList[0], "homdgcat") || "";
- }}
- />
- {btn.size === "big" && (
- {`${avatarData?.data.skills?.[avatarSkillTree?.[btn.id]?.["1"]?.PointID] || 0}/${avatarSkillTree?.[btn.id]?.["1"]?.MaxLevel}`}
- )}
-
+ >
+ {
+ e.currentTarget.onerror = null;
+ e.currentTarget.src = getImageSkill(avatarInfo?.SkillTrees?.[btn.id]?.["1"]?.Icon, avatarSkillTree?.[btn.id]?.["1"]?.StatusAddList[0], "homdgcat") || "";
+ }}
+ />
+ {btn.size === "big" && (
+
+ {`${avatarData?.data.skills?.[avatarSkillTree?.[btn.id]?.["1"]?.PointID] || 0}/${avatarSkillTree?.[btn.id]?.["1"]?.MaxLevel}`}
+
+
+ )}
+ {btn.size === "special" && (
+
+ )}
+ {btn.size === "memory" && (
+
+ )}
+ {btn.size === "big" && (
+
+ )}
+
- )})}
+ )
+ })}
)}
@@ -258,6 +306,18 @@ export default function SkillsInfo() {
checked={avatarData?.data.skills?.[skillInfo?.PointID] === 1}
className="toggle toggle-success"
onChange={(e) => {
+ if (traceButtons?.find((btn) => btn.id === skillSelected)?.size === "special") {
+ if (e.target.checked) {
+ const newData = cloneDeep(avatarData)
+ newData.data.skills[skillInfo?.PointID] = 1
+ setAvatar(newData)
+ return
+ }
+ const newData = cloneDeep(avatarData)
+ delete newData.data.skills[skillInfo?.PointID]
+ setAvatar(newData)
+ return
+ }
handlerChangeStatusTrace(e.target.checked)
}}
/>
diff --git a/src/constant/traceConstant.ts b/src/constant/traceConstant.ts
index 2b873fd..ed8efd5 100644
--- a/src/constant/traceConstant.ts
+++ b/src/constant/traceConstant.ts
@@ -2,10 +2,10 @@
export const traceButtonsInfo: Record = {
Knight: [
- { id: 'Point03', size: 'big', left: '51%', top: '52%' },
- { id: 'Point04', size: 'big', left: '51%', top: '35%' },
+ { id: 'Point03', size: 'big', left: '50%', top: '52%' },
+ { id: 'Point04', size: 'big', left: '50%', top: '35%' },
{ id: 'Point02', size: 'big', left: '67%', top: '55%' },
- { id: 'Point05', size: 'big', left: '51%', top: '69.5%' },
+ { id: 'Point05', size: 'big', left: '50%', top: '69.5%' },
{ id: 'Point01', size: 'big', left: '33%', top: '55%' },
{ id: 'Point08', size: 'medium', left: '50%', top: '21.5%' },
{ id: 'Point07', size: 'medium', left: '71%', top: '86%' },
@@ -22,11 +22,11 @@ export const traceButtonsInfo: Record> = {
},
Memory: {
Point16: ["Point17", "Point18"],
+ Point08: ["Point16", "Point17", "Point18"],
Point17: ["Point18"],
Point09: ["Point10", "Point11"],
Point07: ["Point14", "Point15"],