Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Y
ygopro-arena-api
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Packages
Packages
List
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issues
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
MyCard
ygopro-arena-api
Commits
91d769f6
Commit
91d769f6
authored
Mar 11, 2017
by
ganjingcun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
level parse
parent
04cb8f8d
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
4 deletions
+17
-4
routes/api.js
routes/api.js
+17
-4
No files found.
routes/api.js
View file @
91d769f6
...
@@ -322,12 +322,25 @@ router.get('/cardinfo', function (req, res) {
...
@@ -322,12 +322,25 @@ router.get('/cardinfo', function (req, res) {
result
.
setcode
=
row
.
setcode
result
.
setcode
=
row
.
setcode
result
.
atk
=
row
.
atk
result
.
atk
=
row
.
atk
result
.
def
=
row
.
def
result
.
def
=
row
.
def
if
(
row
.
level
<=
12
)
{
result
.
level
=
row
.
level
result
.
level
=
row
.
level
}
else
{
//转化为16位,0x01010004,前2位是左刻度,2-4是右刻度,末2位是等级
var
levelHex
=
parseInt
(
row
.
level
,
10
).
toString
(
16
);
cardLevel
=
parseInt
(
levelHex
.
slice
(
-
2
),
16
);
cardLScale
=
parseInt
(
levelHex
.
slice
(
-
8
,
-
6
),
16
);
cardRScale
=
parseInt
(
levelHex
.
slice
(
-
6
,
-
4
),
16
);
result
.
level
=
cardLevel
result
.
cardLScale
=
cardLScale
result
.
cardRScale
=
cardRScale
}
result
.
category
=
row
.
category
result
.
category
=
row
.
category
result
.
type
=
getStringValueByMysticalNumber
(
lang
,
typeOffset
,
row
.
type
)
result
.
type
=
getStringValueByMysticalNumber
(
lang
,
typeOffset
,
row
.
type
)
result
.
race
=
getStringValueByMysticalNumber
(
lang
,
raceOffset
,
row
.
race
)
result
.
race
=
getStringValueByMysticalNumber
(
lang
,
raceOffset
,
row
.
race
)
result
.
attribute
=
getStringValueByMysticalNumber
(
lang
,
attrOffset
,
row
.
attribute
)
result
.
attribute
=
getStringValueByMysticalNumber
(
lang
,
attrOffset
,
row
.
attribute
)
res
.
json
(
result
);
res
.
json
(
result
);
});
});
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment