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
4bd68d95
Commit
4bd68d95
authored
Apr 13, 2025
by
Nemo Ma
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update command.php
Remove Debug Strings
parent
27799937
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
11 deletions
+11
-11
command.php
command.php
+11
-11
No files found.
command.php
View file @
4bd68d95
...
@@ -443,27 +443,27 @@ if($hp > 0){
...
@@ -443,27 +443,27 @@ if($hp > 0){
$log
.=
"你选择了:<span class=
\"
yellow
\"
>
{
$dialogue_branch
[
$dialogue_id
][
$choice_index
]
}
</span><br>"
;
$log
.=
"你选择了:<span class=
\"
yellow
\"
>
{
$dialogue_branch
[
$dialogue_id
][
$choice_index
]
}
</span><br>"
;
// 添加非常明显的错误信息
// 添加非常明显的错误信息
$log
.=
"<div style='background-color: red; color: white; padding: 10px; margin: 10px; border: 2px solid black;'>对话选择调试信息: 对话 ID =
{
$dialogue_id
}
, 选择索引 =
{
$choice_index
}
</div>"
;
//
$log .= "<div style='background-color: red; color: white; padding: 10px; margin: 10px; border: 2px solid black;'>对话选择调试信息: 对话 ID = {$dialogue_id}, 选择索引 = {$choice_index}</div>";
// 如果有对应的选择结果日志,显示它
// 如果有对应的选择结果日志,显示它
$choice_log_key
=
$dialogue_id
.
'_choice_'
.
$choice_index
;
$choice_log_key
=
$dialogue_id
.
'_choice_'
.
$choice_index
;
// 调试信息,显示对话日志的键值
// 调试信息,显示对话日志的键值
$log
.=
"<!-- DEBUG: 对话 ID:
{
$dialogue_id
}
, 选择索引:
{
$choice_index
}
, 选择日志键:
{
$choice_log_key
}
-->"
;
//
$log .= "<!-- DEBUG: 对话 ID: {$dialogue_id}, 选择索引: {$choice_index}, 选择日志键: {$choice_log_key} -->";
// 显示所有可用的对话日志键
// 显示所有可用的对话日志键
$log
.=
"<!-- DEBUG: 可用的对话日志键: "
;
//
$log .= "<!-- DEBUG: 可用的对话日志键: ";
foreach
(
$dialogue_log
as
$key
=>
$value
)
{
//
foreach($dialogue_log as $key => $value) {
$log
.=
"
{
$key
}
, "
;
//
$log .= "{$key}, ";
}
//
}
$log
.=
" -->"
;
//
$log .= " -->";
if
(
isset
(
$dialogue_log
[
$choice_log_key
])
&&
!
empty
(
$dialogue_log
[
$choice_log_key
]))
{
if
(
isset
(
$dialogue_log
[
$choice_log_key
])
&&
!
empty
(
$dialogue_log
[
$choice_log_key
]))
{
$log
.=
"<!-- DEBUG: 使用选择特定日志 -->"
;
//
$log .= "<!-- DEBUG: 使用选择特定日志 -->";
$log
.=
$dialogue_log
[
$choice_log_key
];
$log
.=
$dialogue_log
[
$choice_log_key
];
}
elseif
(
isset
(
$dialogue_log
[
$dialogue_id
])
&&
!
empty
(
$dialogue_log
[
$dialogue_id
]))
{
}
elseif
(
isset
(
$dialogue_log
[
$dialogue_id
])
&&
!
empty
(
$dialogue_log
[
$dialogue_id
]))
{
// 如果没有特定选择的日志,显示通用日志
// 如果没有特定选择的日志,显示通用日志
$log
.=
"<!-- DEBUG: 使用通用日志 -->"
;
//
$log .= "<!-- DEBUG: 使用通用日志 -->";
$log
.=
$dialogue_log
[
$dialogue_id
];
$log
.=
$dialogue_log
[
$dialogue_id
];
}
else
{
}
else
{
$log
.=
"<!-- DEBUG: 没有找到对应的对话日志 -->"
;
$log
.=
"<!-- DEBUG: 没有找到对应的对话日志 -->"
;
...
@@ -480,8 +480,8 @@ if($hp > 0){
...
@@ -480,8 +480,8 @@ if($hp > 0){
// 保存玩家数据,确保选择被记录
// 保存玩家数据,确保选择被记录
$serialized_clbpara
=
serialize
(
$clbpara
);
$serialized_clbpara
=
serialize
(
$clbpara
);
$encoded_clbpara
=
base64_encode
(
$serialized_clbpara
);
$encoded_clbpara
=
base64_encode
(
$serialized_clbpara
);
$log
.=
"<!-- DEBUG: 序列化后的 clbpara 长度: "
.
strlen
(
$serialized_clbpara
)
.
" -->"
;
//
$log .= "<!-- DEBUG: 序列化后的 clbpara 长度: " . strlen($serialized_clbpara) . " -->";
$log
.=
"<!-- DEBUG: 编码后的 clbpara 长度: "
.
strlen
(
$encoded_clbpara
)
.
" -->"
;
//
$log .= "<!-- DEBUG: 编码后的 clbpara 长度: " . strlen($encoded_clbpara) . " -->";
$update_query
=
"UPDATE
{
$tablepre
}
players SET clbpara='"
.
$encoded_clbpara
.
"' WHERE pid='
$pid
'"
;
$update_query
=
"UPDATE
{
$tablepre
}
players SET clbpara='"
.
$encoded_clbpara
.
"' WHERE pid='
$pid
'"
;
$update_result
=
$db
->
query
(
$update_query
);
$update_result
=
$db
->
query
(
$update_query
);
...
...
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