Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
phpdts
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
Nemo Ma
phpdts
Commits
f9f83410
Commit
f9f83410
authored
Jul 28, 2023
by
luluxia
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: 修复新前端接口部分问题;
去除了负面状态不必要的部分; 添加了获取攻击方式的函数;
parent
8aef64a7
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
25 additions
and
13 deletions
+25
-13
api.php
api.php
+25
-13
No files found.
api.php
View file @
f9f83410
...
...
@@ -424,6 +424,29 @@
}
return
$sameitem
;
}
/** 获取攻击方式 */
function
getAttackType
()
{
global
$pdata
,
$attinfo
,
$nosta
;
$w1
=
substr
(
$pdata
[
'wepk'
],
1
,
1
);
$w2
=
substr
(
$pdata
[
'wepk'
],
2
,
1
);
if
(
empty
(
$w2
)
||
is_numeric
(
$w2
))
{
$w2
=
''
;
}
if
((
$w1
==
'G'
||
$w1
==
'J'
)
&&
(
$pdata
[
'weps'
]
==
$nosta
))
{
$w1
=
'P'
;
}
$type
[
'type1'
]
=
array
(
'id'
=>
$w1
,
'name'
=>
$attinfo
[
$w1
],
);
if
(
$w2
)
{
$type
[
'type2'
]
=
array
(
'id'
=>
$w2
,
'name'
=>
$attinfo
[
$w2
],
);
}
return
$type
;
}
echo
(
json_encode
(
array
(
"page"
=>
"game"
,
/** 玩家状态 */
...
...
@@ -537,7 +560,7 @@
/** 击杀数 */
"killNum"
=>
$killnum
,
/** 负面状态 */
"debuff"
=>
$inf
?
$inf
:
[
'无'
]
,
"debuff"
=>
$inf
,
"debuffList"
=>
$infinfo
,
/** 装备 */
"equipment"
=>
array
(
...
...
@@ -678,18 +701,7 @@
"isHack"
=>
$hack
,
),
/** 攻击方式 */
"attackType"
=>
array
(
/** 方式1 */
"type1"
=>
array
(
"id"
=>
substr
(
$wepk
,
1
,
1
),
"name"
=>
$attinfo
[
substr
(
$wepk
,
1
,
1
)],
),
/** 方式2 */
"type2"
=>
array
(
"id"
=>
substr
(
$wepk
,
2
,
1
)
?
substr
(
$wepk
,
2
,
1
)
:
null
,
"name"
=>
substr
(
$wepk
,
2
,
1
)
?
$attinfo
[
substr
(
$wepk
,
2
,
1
)]
:
null
,
),
),
"attackType"
=>
getAttackType
(),
/** 视野 */
"semo"
=>
$clbpara
[
'smeo'
],
/** 合成 */
...
...
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