2024-03-25 13:10:43 -07:00
|
|
|
export function getData() {
|
2023-11-11 21:31:40 -08:00
|
|
|
const dataStr = localStorage.getItem('data');
|
|
|
|
if (!dataStr)
|
|
|
|
return null;
|
2024-04-20 19:30:28 -07:00
|
|
|
return JSON.parse(atob(dataStr), (k, v) => k.endsWith('Attr') && ![ 'natureAttr', 'abilityAttr', 'passiveAttr' ].includes(k) ? BigInt(v) : v);
|
2023-11-11 21:31:40 -08:00
|
|
|
}
|
|
|
|
|
2024-03-25 13:10:43 -07:00
|
|
|
export function getSession() {
|
2023-10-18 15:01:15 -07:00
|
|
|
const sessionStr = localStorage.getItem('sessionData');
|
|
|
|
if (!sessionStr)
|
|
|
|
return null;
|
|
|
|
return JSON.parse(atob(sessionStr));
|
|
|
|
}
|