diff --git a/webapp/classes/GameLog.php b/webapp/classes/GameLog.php new file mode 100644 index 0000000..eb710dd --- /dev/null +++ b/webapp/classes/GameLog.php @@ -0,0 +1,13 @@ + $level, 'medals' => $solorow['medals'] - $medalcost, )); + + GameLog::Log(array( + 'medal cost: 1', + $account_id, + $level, + $medalcost, + )); } // 战斗结算 @@ -960,14 +970,16 @@ class SoloController ) ); } else { - $conn->execScript('UPDATE bag SET num=num-:subnum, modify_time=:modify_time ' . - ' WHERE accountid=:accountid AND id =:id;', - array( - ':accountid' => $account_id, - ':id' => $costitem['item_id'], - ':subnum' => $costitem['item_num'], - ':modify_time' => time() - )); + $conn->execScript( + 'UPDATE bag SET num=num-:subnum, modify_time=:modify_time ' . + ' WHERE accountid=:accountid AND id =:id;', + array( + ':accountid' => $account_id, + ':id' => $costitem['item_id'], + ':subnum' => $costitem['item_num'], + ':modify_time' => time() + ) + ); } } @@ -1254,6 +1266,13 @@ class SoloController $r->pexpire($key, 1000 * 86400); error_log($key . ':' . $infostr); } + } else { + GameLog::Log(array( + 'medal cost: 2', + $account_id, + $level, + $medalcost, + )); } $quest = new classes\Quest();