Commit 4077dcd5 authored by Nemo Ma's avatar Nemo Ma Committed by GitHub

Merge pull request #123 from hikawiier/waaagh

fix
parents b90ee2ea 389a0042
......@@ -167,7 +167,7 @@ if($gamblingon){
//打包快递给快递员 返回新生成的快递员pid
$gclb = Array('clbpara'=>Array('sponsor'=>$uid,'post'=>$bet,'postid'=>6),); //记录赞助者的uid、收货方的pid、道具位置
$gitem = Array(6,$iteminfo['item'],$iteminfo['itmk'],$iteminfo['itme'],$iteminfo['itms']*$bnum,$iteminfo['itmsk']);//打包快递
include_once GAME_ROOT.'./include/system.func.php';
//include_once GAME_ROOT.'./include/system.func.php';
$nid = addnpc($gnpctype,$gnpcsub,1,$now,$gclb,$gitem,$bdata['pls'])[0];
$gbinfo .= "快递员已带着你赞助的商品前往{$bdata['name']}所在的位置!谢谢惠顾~<br>";
//存一条发快递记录到gambling表里,一个玩家在快递被接收前不能发第二份快递。防止有人狂买低价商品挤爆players表。
......
......@@ -29,8 +29,8 @@ if($command == 'wthedit'){
save_gameinfo();
adminlog('hackedit',$ihack);
addnews($now,'syshackchg',$ihack);
include_once GAME_ROOT.'./include/system.func.php';
movehtm();
//include_once GAME_ROOT.'./include/system.func.php';
//movehtm();
}
}elseif(strpos($command, 'gsedit')===0){
$igamestate = explode('_',$command);
......@@ -65,7 +65,7 @@ if($command == 'wthedit'){
adminlog('gsedit',$igamestate);
}else{
$cmd_info = "第 $gamenum 局大逃杀紧急中止";
include_once GAME_ROOT.'./include/system.func.php';
//include_once GAME_ROOT.'./include/system.func.php';
gameover($now,'end6');
save_gameinfo();
adminlog('gameover');
......
......@@ -34,7 +34,7 @@ if($command == 'kill' || $command == 'live' || $command == 'del') {
$operlist[${'npc_'.$i}] = $npcdata[$i]['name'].'(PID:'.$npcdata[$i]['pid'].')';
$npcdata[$i]['hp'] = 0;
$npcdata[$i]['state'] = 15;
$deathnum ++;$alivenum--;
$deathnum ++;//$alivenum--;
adminlog('killnpc',$npcdata[$i]['name']);
}else{
$gfaillist[] = $npcdata[$i]['name'].'(PID:'.$npcdata[$i]['pid'].')';
......
......@@ -10,6 +10,7 @@ if(version_compare(PHP_VERSION, '4.3.0', '<')) {
exit('PHP version must >= 4.3.0!');
}
require GAME_ROOT.'./include/global.func.php';
require GAME_ROOT.'./include/system.func.php';
error_reporting(E_ALL);
set_error_handler('gameerrorhandler');
$magic_quotes_gpc = false;
......@@ -110,7 +111,7 @@ if(CURSCRIPT !== 'chat')
$hplayer = '';
$noisemode = '';
//save_gameinfo();
include_once GAME_ROOT.'./include/system.func.php';
//include_once GAME_ROOT.'./include/system.func.php';
rs_game(1+2+4+8+16+32);
//save_gameinfo();
$ginfochange = true;
......@@ -132,7 +133,7 @@ if(CURSCRIPT !== 'chat')
}
//判定增加禁区
if (($gamestate > 10)&&($now > $areatime)) {
include_once GAME_ROOT.'./include/system.func.php';
//include_once GAME_ROOT.'./include/system.func.php';
while($now>$areatime){
$o_areatime = $areatime;
$areatime += $areahour*60;
......@@ -142,7 +143,7 @@ if(CURSCRIPT !== 'chat')
}
//判定警告增加禁区
}elseif(($gamestate > 10)&&($now > $areatime - $areawarntime)&&(!$areawarn)){
include_once GAME_ROOT.'./include/system.func.php';
//include_once GAME_ROOT.'./include/system.func.php';
areawarn();
$ginfochange = true;
}
......@@ -177,15 +178,18 @@ if(CURSCRIPT !== 'chat')
}
if (($gamestate >= 40)&&($now > $afktime + $antiAFKertime * 60)) {//判定自动反挂机
include_once GAME_ROOT.'./include/system.func.php';
//include_once GAME_ROOT.'./include/system.func.php';
antiAFK();
$afktime = $now;
$ginfochange = true;
}
if($gamestate >= 40) {
$result = $db->query("SELECT pid FROM {$tablepre}players WHERE hp>0 AND type=0");
$alivenum = $db->num_rows($result);
save_gameinfo();
if($alivenum <= 1) {
include_once GAME_ROOT.'./include/system.func.php';
//include_once GAME_ROOT.'./include/system.func.php';
gameover();
}
}
......
......@@ -635,7 +635,7 @@ function event(){
// addnews($now,'death13',$name,0);
// $alivenum--;
// $deathnum++;
// include_once GAME_ROOT.'./include/system.func.php';
// //include_once GAME_ROOT.'./include/system.func.php';
// save_gameinfo();
include_once GAME_ROOT . './include/state.func.php';
death('event');
......
......@@ -978,11 +978,18 @@ function itemuse($itmn,&$data=NULL) {
//global $itm0,$itmk0,$itme0,$itms0,$itmsk0,$mode;
$itm0 = $in;$itmk0=$ik;$itme0=$ie;$itms0=$is;$itmsk0=$isk;
addnews($now,'present',$nickinfo.' '.$name,$itm,$in);
$itms1--;
/*$itms1--;
if ($itms1 <= 0) {
$log .= "<span class=\"red\">$itm</span>用光了。<br>";
$itm = $itmk = $itmsk = '';
$itme = $itms = 0;
}*/
// ?????
$itms--;
if ($itms <= 0) {
$log .= "<span class=\"red\">$itm</span>用光了。<br>";
$itm = $itmk = $itmsk = '';
$itme = $itms = 0;
}
include_once GAME_ROOT.'./include/game/itemmain.func.php';
itemget($data);
......@@ -995,11 +1002,17 @@ function itemuse($itmn,&$data=NULL) {
//global $itm0,$itmk0,$itme0,$itms0,$itmsk0,$mode;
$itm0 = $in;$itmk0=$ik;$itme0=$ie;$itms0=$is;$itmsk0=$isk;
addnews($now,'present',$nickinfo.' '.$name,$itm,$in);
$itms1--;
/*$itms1--;
if ($itms1 <= 0) {
$log .= "<span class=\"red\">$itm</span>用光了。<br>";
$itm = $itmk = $itmsk = '';
$itme = $itms = 0;
}*/
$itms--;
if ($itms <= 0) {
$log .= "<span class=\"red\">$itm</span>用光了。<br>";
$itm = $itmk = $itmsk = '';
$itme = $itms = 0;
}
include_once GAME_ROOT.'./include/game/itemmain.func.php';
itemget($data);
......
......@@ -137,8 +137,8 @@ function hack($itmn = 0) {
$hack = 1;
$clbpara['achvars']['hack'] += 1;
$log .= '入侵禁区控制系统成功了!全部禁区都被解除了!<br>';
include_once GAME_ROOT.'./include/system.func.php';
movehtm();
//include_once GAME_ROOT.'./include/system.func.php';
//movehtm();
addnews($now,'hack',get_title_desc($nick).' '.$name);
storyputchat($now,'hack');
save_gameinfo();
......
......@@ -226,7 +226,7 @@ function get_npc_helpinfo($nlist,$tooltip=1)
break;
}
}
if(isset($snpc['gd']))
if(!empty($snpc['gd']) && ($snpc['gd'] == 'm' || $snpc['gd'] == 'f'))
{
$snpc['gd'] = $snpc['gd']=='m' ? '男' : '女';
}
......
......@@ -812,6 +812,7 @@ function focus_item(&$data=NULL,$id=NULL)
$result = $db->query("SELECT * FROM {$tablepre}mapitem WHERE pls = '$pls' AND iid = '$id'");
if(!$db->num_rows($result))
{
// 这是特性
$log .= "但是你想找的东西已经不见了!<br>";
return 0;
}
......
......@@ -81,7 +81,7 @@ function roommng_create_new_room(&$udata)
if($now_room_nums)
{
$room_ids = range(1,$max_rooms);
$now_room_ids = $db->fetch_array($result);
while($now_room_ids[] = $db->fetch_array($result)['groomid']){};
$new_room_id = array_shift(array_diff($room_ids,$now_room_ids));
}
else
......@@ -157,7 +157,7 @@ function roommng_exit_room(&$udata)
if($db->num_rows($result2))
{
$udata2 = $db->fetch_array($result2);
$new_ownid = $udata2['uid'];
$new_ownid = $udata2['username'];
echo "将房主权限移交给了{$udata2['username']}<br>";
}
}
......
......@@ -311,7 +311,7 @@
check_battle_achievement_rev($pa,$pd);
}
# 保存游戏进行状态
include_once GAME_ROOT.'./include/system.func.php';
//include_once GAME_ROOT.'./include/system.func.php';
save_gameinfo();
return;
}
......
......@@ -7,7 +7,7 @@ require './include/game.func.php';
//$t_s=getmicrotime();
//require_once GAME_ROOT.'./include/JSON.php';
require_once GAME_ROOT.'./include/news.func.php';
include_once GAME_ROOT.'./include/system.func.php';
//include_once GAME_ROOT.'./include/system.func.php';
/*
$newsfile = GAME_ROOT.'./gamedata/newsinfo.php';
......
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