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
3517a1ec
Commit
3517a1ec
authored
May 02, 2023
by
hisuinohoshi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix?
parent
cec0a976
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
46 additions
and
16 deletions
+46
-16
include/game.func.php
include/game.func.php
+15
-14
include/game/battle.func.php
include/game/battle.func.php
+1
-1
include/game/itemmain.func.php
include/game/itemmain.func.php
+25
-0
include/global.func.php
include/global.func.php
+2
-0
include/state.func.php
include/state.func.php
+3
-1
No files found.
include/game.func.php
View file @
3517a1ec
...
...
@@ -646,13 +646,7 @@ function fetch_playerdata_by_name($n)
if
(
!
$db
->
num_rows
(
$result
))
return
NULL
;
$data
=
$db
->
fetch_array
(
$result
);
# 转码clbpara
if
(
!
empty
(
$data
[
'clbpara'
]))
$data
[
'clbpara'
]
=
get_clbpara
(
$data
[
'clbpara'
]);
# 判断时效性状态
if
(
!
empty
(
$data
[
'clbpara'
][
'lasttimes'
]))
check_skilllasttimes
(
$data
);
# 读取套装效果
include_once
GAME_ROOT
.
'./include/game/itemmain.func.php'
;
reload_set_items
(
$data
);
check_player_misc_states
(
$data
);
return
$data
;
}
...
...
@@ -664,13 +658,7 @@ function fetch_playerdata_by_pid($id)
if
(
!
$db
->
num_rows
(
$result
))
return
NULL
;
$data
=
$db
->
fetch_array
(
$result
);
# 转码clbpara
if
(
!
empty
(
$data
[
'clbpara'
]))
$data
[
'clbpara'
]
=
get_clbpara
(
$data
[
'clbpara'
]);
# 判断时效性状态
if
(
!
empty
(
$data
[
'clbpara'
][
'lasttimes'
]))
check_skilllasttimes
(
$data
);
# 读取套装效果
include_once
GAME_ROOT
.
'./include/game/itemmain.func.php'
;
reload_set_items
(
$data
);
check_player_misc_states
(
$data
);
return
$data
;
}
...
...
@@ -690,6 +678,19 @@ function player_save($data){
return
;
}
function
check_player_misc_states
(
&
$data
)
{
# 转码clbpara
if
(
!
empty
(
$data
[
'clbpara'
]))
$data
[
'clbpara'
]
=
get_clbpara
(
$data
[
'clbpara'
]);
# 刷新时效性状态
if
(
!
empty
(
$data
[
'clbpara'
][
'lasttimes'
]))
check_skilllasttimes
(
$data
);
# 刷新装备状态
include_once
GAME_ROOT
.
'./include/game/itemmain.func.php'
;
reload_equip_items
(
$data
);
reload_set_items
(
$data
);
return
$data
;
}
//获取安全地图范围
function
get_safe_plslist
(
$mode
=
1
)
{
...
...
include/game/battle.func.php
View file @
3517a1ec
...
...
@@ -130,7 +130,7 @@ function findcorpse(&$w_pdata){
$s_value
=
$value
.
's'
;
$sk_value
=
$value
.
'sk'
;
}
if
(
!
empty
(
$$
s_
value
))
if
(
!
empty
(
$$value
))
{
# 初始化名称样式
$
{
$value
.
'_words'
}
=
parse_info_desc
(
$$value
,
'm'
);
...
...
include/game/itemmain.func.php
View file @
3517a1ec
...
...
@@ -1460,6 +1460,31 @@ function change_subwep($s=2,&$data=NULL)
return
;
}
# 初始化玩家/NPC数据时,检查对应部位是否可装备道具、或是否缺少基础装备
function
reload_equip_items
(
&
$pa
)
{
global
$nowep
,
$noarb
,
$nosta
;
if
(
empty
(
$pa
[
'wep'
])
||
empty
(
$pa
[
'weps'
]))
{
$pa
[
'wep'
]
=
$nowep
;
$pa
[
'wepk'
]
=
'WN'
;
$pa
[
'wepe'
]
=
0
;
$pa
[
'weps'
]
=
$nosta
;
$pa
[
'wepsk'
]
=
''
;
}
if
(
empty
(
$pa
[
'arb'
])
||
empty
(
$pa
[
'arbs'
]))
{
$pa
[
'arb'
]
=
$noarb
;
$pa
[
'arbk'
]
=
'DN'
;
$pa
[
'arbe'
]
=
0
;
$pa
[
'arbs'
]
=
$nosta
;
$pa
[
'arbsk'
]
=
''
;
}
return
;
}
# 初始化玩家/NPC数据时,重载套装效果
function
reload_set_items
(
&
$pa
)
{
...
...
include/global.func.php
View file @
3517a1ec
...
...
@@ -513,6 +513,8 @@ function player_format_with_db_structure($data){
if
(
isset
(
$data
[
$key
])
&&
is_array
(
$data
[
$key
]))
$data
[
$key
]
=
json_encode
(
$data
[
$key
],
JSON_UNESCAPED_UNICODE
);
$ndata
[
$key
]
=
isset
(
$data
[
$key
])
?
$data
[
$key
]
:
''
;
}
include_once
GAME_ROOT
.
'./include/game/itemmain.func.php'
;
reload_equip_items
(
$ndata
);
return
$ndata
;
}
function
parse_info_desc
(
$info
,
$type
,
$vars
=
''
,
$short
=
0
,
$tiptype
=
0
)
...
...
include/state.func.php
View file @
3517a1ec
...
...
@@ -112,6 +112,8 @@
# 执行死亡事件(灵魂绑定等)
check_death_events
(
create_dummy_playerdata
(),
$data
,
1
);
player_save
(
$data
);
save_gameinfo
();
return
$killmsg
;
}
...
...
@@ -311,7 +313,7 @@
check_battle_achievement_rev
(
$pa
,
$pd
);
}
# 保存游戏进行状态
//include_once GAME_ROOT.'./include/system.func.php'
;
player_save
(
$pd
)
;
save_gameinfo
();
return
;
}
...
...
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