Toggle navigation
Toggle navigation
This project
Loading...
Sign in
오윤석
/
maplespec.ga
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
4
Merge Requests
0
Wiki
Snippets
Network
Create a new issue
Builds
Commits
Issue Boards
Authored by
오윤석
2020-06-09 21:43:06 +0900
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
6e6e62a779285e8ed6cc3e515ef8c365a109dcd9
6e6e62a7
1 parent
110f899b
하이퍼스탯 데미지도 가져오도록 수정
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
5 deletions
app/node/routes/character.js
app/node/routes/character.js
View file @
6e6e62a
...
...
@@ -33,6 +33,7 @@ const getCharacterInfo = async function(nickname, characterCode) {
major
:
0
,
minor
:
0
,
majorHyper
:
0
,
damageHyper
:
0
,
criticalDamage
:
0
,
bossAttackDamage
:
0
,
ignoreGuard
:
0
,
...
...
@@ -54,14 +55,16 @@ const getCharacterInfo = async function(nickname, characterCode) {
if
(
$
(
"th"
,
this
).
length
==
1
)
{
if
(
$
(
"th span"
,
this
).
text
()
==
"하이퍼스탯"
)
{
const
values
=
$
(
"td span"
,
this
).
html
().
split
(
"<br>"
);
const
regex
=
new
RegExp
(
`
${
statModel
[
jobModel
[
character
.
job
].
major
].
korean
}
(\\d+) 증가`
);
for
(
let
i
=
0
;
i
<
values
.
length
;
i
++
)
{
const
regexResult
=
regex
.
exec
(
values
[
i
]);
if
(
!
regexResult
)
continue
;
const
regexMajor
=
new
RegExp
(
`
${
statModel
[
jobModel
[
character
.
job
].
major
].
korean
}
(\\d+) 증가`
);
const
regexDamage
=
new
RegExp
(
`^데미지 (\\d+)% 증가`
)
;
let
regexResult
;
for
(
let
i
=
0
;
i
<
values
.
length
;
i
++
)
{
if
(
regexResult
=
regexMajor
.
exec
(
values
[
i
]))
stats
[
'majorHyper'
]
=
parseInt
(
regexResult
[
1
]);
else
if
(
regexResult
=
regexDamage
.
exec
(
values
[
i
]))
stats
[
'damageHyper'
]
=
parseInt
(
regexResult
[
1
]);
}
}
}
else
{
...
...
Please
register
or
login
to post a comment