老大啊!!自己地里的草还不能自己清。虫也不行。。我给个人家的补丁的参考下。。
查找:
$f = $farm->farmlandstatus[$id]->f;
if ( $f > 0 )
{
替换:
$f = $farm->farmlandstatus[$id]->f;
$u = $farm->farmlandstatus[$id]->u;
if ( $f > 0 ){
if ($u == $UID) {
echo '{"code":0,"direction":"\u8BC1\u636E\u662F\u4E0D\u80FD\u6BC1\u706D\u7684\uFF01","farmlandIndex":'.$id.',"poptype":1,"weed":1}';
exit;
}
查找:
$id = $pieces[$key];
if ($_REQUEST['tId'] == 0)//普通杀虫
{
if ( $farmarr->farmlandstatus[$id]->g > 0 )
{
替换:
$id = $pieces[$key];
$u = $farmarr->farmlandstatus[$id]->s;
if ($_REQUEST['tId'] == 0)//普通杀虫
{
if ( $farmarr->farmlandstatus[$id]->g > 0 )
{
if ($u == $UID) {
echo '{"code":0,"direction":"\u8BC1\u636E\u662F\u4E0D\u80FD\u6BC1\u706D\u7684\uFF01","farmlandIndex":'.$id.',"poptype":1,"pest":1}';
exit;
}
查找:
$farm_Status->farmlandstatus[$id]->p = $p;
下面加上:
$farm_Status->farmlandstatus[$id]->u = $_SGLOBAL['supe_uid']; |