Commit 2f57383e authored by hisuinohoshi's avatar hisuinohoshi

fix

修正:
- 发送至聊天框的遗言无法显示NPC类别名的问题;
- 后台管理界面无法使用清除玩家功能的问题;
parent 2ae1d254
......@@ -80,7 +80,7 @@ if($command == 'kill' || $command == 'live' || $command == 'del') {
$qryword = "UPDATE {$tablepre}players SET hp=mhp,state='0' ";
}elseif($command == 'del'){
$operword = '被清除';
$qryword = "UPDATE {$tablepre}players SET hp='0',state='16',bid='0',,weps='0',arbs='0',arhs='0',aras='0',arfs='0',arts='0',itms0='0',itms1='0',itms2='0',itms3='0',itms4='0',itms5='0',itms6='0',money='0' ";
$qryword = "UPDATE {$tablepre}players SET hp='0',state='16',bid='0',weps='0',arbs='0',arhs='0',aras='0',arfs='0',arts='0',itms0='0',itms1='0',itms2='0',itms3='0',itms4='0',itms5='0',itms6='0',money='0' ";
$operword2 = '的尸体被清除';
$qryword2 = "UPDATE {$tablepre}players SET bid='0',weps='0',arbs='0',arhs='0',aras='0',arfs='0',arts='0',itms0='0',itms1='0',itms2='0',itms3='0',itms4='0',itms5='0',itms6='0',money='0' ";
}
......
......@@ -129,22 +129,6 @@
return $smhint;
}
function print_elements_tags($e_key)
{
global $elements_info,$gamecfg,$iteminfo,$itemspkinfo;
include config('elementmix',$gamecfg);
$tinfo="已了解的特征:";
foreach($temp_etags[$e_key] as $tk => $tarr)
{
if(is_array($tarr))
{
foreach($tarr as $tm)
$tinfo.= $tk == 'dom' ? "[主]".$iteminfo[$tm]." " : "[次]".$itemspkinfo[$tm]." ";
}
}
return $tinfo;
}
/********拆解元素部分********/
# 把尸体打散成元素
function split_corpse_to_elements(&$edata,$emode)
......
......@@ -21,23 +21,7 @@
if (!$death) return;
$hp = 0;
if ($death == 'N') {
$state = 20;
} elseif ($death == 'P') {
$state = 21;
} elseif ($death == 'K') {
$state = 22;
} elseif ($death == 'G') {
$state = 23;
} elseif ($death == 'C') {
$state = 24;
} elseif ($death == 'D') {
$state = 25;
} elseif ($death == 'F') {
$state = 29;
} elseif ($death == 'J') {
$state = 23;
}elseif ($death == 'poison') {
if ($death == 'poison') {
$state = 26;
} elseif ($death == 'trap') {
$state = 27;
......@@ -101,19 +85,12 @@
$result = $db->query ( "SELECT lastword FROM {$gtablepre}users WHERE username = '$name'" );
$lastword = $db->result ( $result, 0 );
$lwname = $typeinfo [$type] . ' ' . $name;
/*$result = $db->query("SELECT pls FROM {$tablepre}players WHERE name = '$name' AND type = '$type'");
$pls = $db->result($result, 0);*/
$db->query ( "INSERT INTO {$tablepre}chat (type,`time`,send,recv,msg) VALUES ('3','$now','$lwname','$pls','$lastword')" );
}
$deathtime = $now;
//$result = $db->query("SELECT nick FROM {$tablepre}players WHERE name = '$kname' AND type = '$type'");
//$knick = $db->result($result, 0);
//$kname= !empty($knick) || $knick == 0 ? $knick.'+'.$ : 'none';
addnews ($now,'death'.$state,$dname,$type,$kname,$annex,$lastword);
//$alivenum = $db->result($db->query("SELECT COUNT(*) FROM {$tablepre}players WHERE hp>0 AND type=0"), 0);
# 执行死亡事件(灵魂绑定等)
if(!$data['type'] && empty($data['nm'])) $data['nm'] = '你';
check_death_events(create_dummy_playerdata(),$data,1);
......@@ -124,7 +101,7 @@
return $killmsg;
}
# 执行不需要考虑复活问题的击杀事件:
# 执行不需要考虑复活问题的击杀事件:
# 再重复一遍:这里的第一个参数指的是杀人者(敌对方)视角,第二个参数指的是死者(受到伤害者)视角。
function pre_kill_events(&$pa,&$pd,$active,$death)
{
......@@ -174,6 +151,7 @@
$lastword = $db->result ( $result, 0 );
}
//向聊天框发送遗言
$dname = $typeinfo[$pd['type']].' '.$pd['name']; //以前有没有来着……
$db->query ( "INSERT INTO {$tablepre}chat (type,`time`,send,recv,msg) VALUES ('3','$now','$dname','$dpls','$lastword')" );
//发送news
......
......@@ -12,7 +12,7 @@
<TD class="b1" width="95px"><span>优胜者名</span></TD>
<TD class="b1"><span>头像</span></TD>
<TD class="b1"><span>游戏结束时间</span></TD>
<TD class="b1"><span>胜利者留言</span></TD>
<TD class="b1" width="240px"><span>胜利者留言</span></TD>
<TD class="b1" width="240px"><span>使用武器</span></TD>
<TD class="b1" width="95px"><span>最高伤害</span></TD>
<TD class="b1" width="95px"><span>杀人最多</span></TD>
......
......@@ -47,7 +47,7 @@ if($command == 'info') {
}
else
{
$wdata['nickinfo'] = !empty($wdata['nick']) || $wdata['nick'] == 0 ? titles_get_desc($wdata['nick']) : '';
$wdata['nickinfo'] = (!empty($wdata['nick']) || $wdata['nick'] === '0') ? titles_get_desc($wdata['nick']) : '';
}
}
$winfo[$wdata['gid']] = $wdata;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment