지난 턴 관리 부분 이상한 부분 수정
This commit is contained in:
@@ -8,13 +8,10 @@ class TurnExecutionHelper
|
|||||||
* @var General $generalObj;
|
* @var General $generalObj;
|
||||||
*/
|
*/
|
||||||
protected $generalObj;
|
protected $generalObj;
|
||||||
protected $turn = null;
|
|
||||||
protected $nationTurn = null;
|
|
||||||
|
|
||||||
public function __construct(array $rawGeneral, int $year, int $month)
|
public function __construct(array $rawGeneral, int $year, int $month)
|
||||||
{
|
{
|
||||||
$this->generalObj = new General($rawGeneral, null, $year, $month);
|
$this->generalObj = new General($rawGeneral, null, $year, $month);
|
||||||
$this->turn = $turn;
|
|
||||||
$this->nationTurn = $nationTurn;
|
$this->nationTurn = $nationTurn;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -119,18 +116,7 @@ class TurnExecutionHelper
|
|||||||
}
|
}
|
||||||
|
|
||||||
$general->clearActivatedSkill();
|
$general->clearActivatedSkill();
|
||||||
return $general->getResultTurn();
|
|
||||||
}
|
|
||||||
|
|
||||||
function updateTurnTime($commandClassName){
|
|
||||||
$db = DB::db();
|
|
||||||
$gameStor = KVStorage::getStorage($db, 'game_env');
|
|
||||||
|
|
||||||
$general = $this->getGeneral();
|
|
||||||
$generalID = $general->getRaw('no');
|
|
||||||
$logger = $general->getLogger();
|
|
||||||
|
|
||||||
$generalName = $general->getName();
|
|
||||||
$killTurn = $gameStor->killturn;
|
$killTurn = $gameStor->killturn;
|
||||||
|
|
||||||
if($general->getVar('npc') >= 2){
|
if($general->getVar('npc') >= 2){
|
||||||
@@ -146,6 +132,19 @@ class TurnExecutionHelper
|
|||||||
$general->setVar('killturn', $killTurn);
|
$general->setVar('killturn', $killTurn);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return $general->getResultTurn();
|
||||||
|
}
|
||||||
|
|
||||||
|
function updateTurnTime(){
|
||||||
|
$db = DB::db();
|
||||||
|
$gameStor = KVStorage::getStorage($db, 'game_env');
|
||||||
|
|
||||||
|
$general = $this->getGeneral();
|
||||||
|
$generalID = $general->getRaw('no');
|
||||||
|
$logger = $general->getLogger();
|
||||||
|
|
||||||
|
$generalName = $general->getName();
|
||||||
|
|
||||||
// 삭턴장수 삭제처리
|
// 삭턴장수 삭제처리
|
||||||
if($general->getVar('killturn') <= 0){
|
if($general->getVar('killturn') <= 0){
|
||||||
// npc유저 삭턴시 npc로 전환
|
// npc유저 삭턴시 npc로 전환
|
||||||
@@ -234,7 +233,7 @@ WHERE turntime < %s ORDER BY turntime ASC, `no` ASC',
|
|||||||
$hasNationTurn = true;
|
$hasNationTurn = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
$turnObj = new static($generalWork, $turn, $nationTurn, $year, $month);
|
$turnObj = new static($generalWork, $year, $month);
|
||||||
if(!$turnObj->processBlocked()){
|
if(!$turnObj->processBlocked()){
|
||||||
$turnObj->preprocessCommand();
|
$turnObj->preprocessCommand();
|
||||||
if($hasNationTurn){
|
if($hasNationTurn){
|
||||||
|
|||||||
Reference in New Issue
Block a user