feat,wip: 기존 거래장 코드 정리
This commit is contained in:
@@ -13,8 +13,6 @@ use \sammo\{
|
||||
use \sammo\Constraint\Constraint;
|
||||
use \sammo\Constraint\ConstraintHelper;
|
||||
|
||||
use function sammo\tryRollbackInheritUniqueItem;
|
||||
|
||||
class che_NPC능동 extends Command\GeneralCommand{
|
||||
static protected $actionName = 'NPC능동';
|
||||
|
||||
@@ -98,7 +96,6 @@ class che_NPC능동 extends Command\GeneralCommand{
|
||||
|
||||
$this->setResultTurn(new LastTurn(static::getName(), $this->arg));
|
||||
}
|
||||
tryRollbackInheritUniqueItem($rng, $general);
|
||||
$general->applyDB($db);
|
||||
|
||||
return true;
|
||||
|
||||
@@ -15,8 +15,6 @@ use \sammo\Constraint\Constraint;
|
||||
use \sammo\Constraint\ConstraintHelper;
|
||||
use sammo\Enums\InheritanceKey;
|
||||
|
||||
use function sammo\tryRollbackInheritUniqueItem;
|
||||
|
||||
class che_모반시도 extends Command\GeneralCommand{
|
||||
static protected $actionName = '모반시도';
|
||||
|
||||
@@ -99,7 +97,6 @@ class che_모반시도 extends Command\GeneralCommand{
|
||||
$this->setResultTurn(new LastTurn(static::getName(), $this->arg));
|
||||
$general->increaseInheritancePoint(InheritanceKey::active_action, 1);
|
||||
$general->checkStatChange();
|
||||
tryRollbackInheritUniqueItem($rng, $general);
|
||||
$general->applyDB($db);
|
||||
$lordGeneral->applyDB($db);
|
||||
|
||||
|
||||
@@ -17,7 +17,6 @@ use sammo\Enums\InheritanceKey;
|
||||
|
||||
use function sammo\DeleteConflict;
|
||||
use function sammo\refreshNationStaticInfo;
|
||||
use function sammo\tryRollbackInheritUniqueItem;
|
||||
|
||||
class che_방랑 extends Command\GeneralCommand{
|
||||
static protected $actionName = '방랑';
|
||||
@@ -125,7 +124,6 @@ class che_방랑 extends Command\GeneralCommand{
|
||||
refreshNationStaticInfo();
|
||||
$general->increaseInheritancePoint(InheritanceKey::active_action, 1);
|
||||
$this->setResultTurn(new LastTurn(static::getName(), $this->arg));
|
||||
tryRollbackInheritUniqueItem($rng, $general);
|
||||
$general->applyDB($db);
|
||||
|
||||
return true;
|
||||
|
||||
@@ -21,8 +21,6 @@ use \sammo\Constraint\Constraint;
|
||||
use \sammo\Constraint\ConstraintHelper;
|
||||
use sammo\Enums\InheritanceKey;
|
||||
|
||||
use function sammo\tryRollbackInheritUniqueItem;
|
||||
|
||||
class che_선양 extends Command\GeneralCommand
|
||||
{
|
||||
static protected $actionName = '선양';
|
||||
@@ -139,7 +137,6 @@ class che_선양 extends Command\GeneralCommand
|
||||
$general->increaseInheritancePoint(InheritanceKey::active_action, 1);
|
||||
$this->setResultTurn(new LastTurn(static::getName(), $this->arg));
|
||||
$general->checkStatChange();
|
||||
tryRollbackInheritUniqueItem($rng, $general);
|
||||
$general->applyDB($db);
|
||||
$destGeneral->applyDB($db);
|
||||
|
||||
|
||||
@@ -13,8 +13,6 @@ use \sammo\{
|
||||
use \sammo\Constraint\Constraint;
|
||||
use \sammo\Constraint\ConstraintHelper;
|
||||
|
||||
use function sammo\tryRollbackInheritUniqueItem;
|
||||
|
||||
class che_소집해제 extends Command\GeneralCommand{
|
||||
static protected $actionName = '소집해제';
|
||||
|
||||
@@ -82,7 +80,6 @@ class che_소집해제 extends Command\GeneralCommand{
|
||||
$general->addDedication($ded);
|
||||
$this->setResultTurn(new LastTurn(static::getName(), $this->arg));
|
||||
$general->checkStatChange();
|
||||
tryRollbackInheritUniqueItem($rng, $general);
|
||||
$general->applyDB($db);
|
||||
|
||||
return true;
|
||||
|
||||
@@ -13,8 +13,6 @@ use \sammo\{
|
||||
use \sammo\Constraint\Constraint;
|
||||
use \sammo\Constraint\ConstraintHelper;
|
||||
|
||||
use function sammo\tryRollbackInheritUniqueItem;
|
||||
|
||||
class che_요양 extends Command\GeneralCommand{
|
||||
static protected $actionName = '요양';
|
||||
|
||||
@@ -71,7 +69,6 @@ class che_요양 extends Command\GeneralCommand{
|
||||
$general->addDedication($ded);
|
||||
$this->setResultTurn(new LastTurn(static::getName(), $this->arg));
|
||||
$general->checkStatChange();
|
||||
tryRollbackInheritUniqueItem($rng, $general);
|
||||
$general->applyDB($db);
|
||||
|
||||
return true;
|
||||
|
||||
@@ -12,7 +12,6 @@ use \sammo\Command;
|
||||
use \sammo\Json;
|
||||
|
||||
use function \sammo\searchDistance;
|
||||
use function sammo\tryRollbackInheritUniqueItem;
|
||||
|
||||
use \sammo\Constraint\ConstraintHelper;
|
||||
use sammo\CityConst;
|
||||
@@ -214,7 +213,6 @@ class che_첩보 extends Command\GeneralCommand
|
||||
$general->increaseVar('leadership_exp', 1);
|
||||
$this->setResultTurn(new LastTurn(static::getName(), $this->arg));
|
||||
$general->checkStatChange();
|
||||
tryRollbackInheritUniqueItem($rng, $general);
|
||||
$general->applyDB($db);
|
||||
|
||||
return true;
|
||||
|
||||
@@ -15,8 +15,6 @@ use \sammo\Constraint\ConstraintHelper;
|
||||
use sammo\CityConst;
|
||||
use sammo\Enums\InheritanceKey;
|
||||
|
||||
use function sammo\tryRollbackInheritUniqueItem;
|
||||
|
||||
class che_하야 extends Command\GeneralCommand{
|
||||
static protected $actionName = '하야';
|
||||
|
||||
@@ -118,7 +116,6 @@ class che_하야 extends Command\GeneralCommand{
|
||||
|
||||
$this->setResultTurn(new LastTurn(static::getName(), $this->arg));
|
||||
$general->checkStatChange();
|
||||
tryRollbackInheritUniqueItem($rng, $general);
|
||||
$general->applyDB($db);
|
||||
|
||||
return true;
|
||||
|
||||
@@ -20,7 +20,6 @@ use sammo\Event\EventHandler;
|
||||
|
||||
use function sammo\refreshNationStaticInfo;
|
||||
use function sammo\deleteNation;
|
||||
use function sammo\tryRollbackInheritUniqueItem;
|
||||
|
||||
class che_해산 extends Command\GeneralCommand{
|
||||
static protected $actionName = '해산';
|
||||
@@ -99,7 +98,6 @@ class che_해산 extends Command\GeneralCommand{
|
||||
$oldGeneral->setVar('makelimit', 12);
|
||||
$oldGeneral->applyDB($db);
|
||||
}
|
||||
tryRollbackInheritUniqueItem($rng, $general);
|
||||
$general->applyDB($db);
|
||||
|
||||
// 이벤트 핸들러 동작
|
||||
|
||||
@@ -12,7 +12,6 @@ use \sammo\LastTurn;
|
||||
use \sammo\Command;
|
||||
|
||||
use function \sammo\searchDistance;
|
||||
use function sammo\tryRollbackInheritUniqueItem;
|
||||
|
||||
use \sammo\Constraint\ConstraintHelper;
|
||||
use sammo\CityConst;
|
||||
@@ -296,7 +295,6 @@ class che_화계 extends Command\GeneralCommand
|
||||
|
||||
$this->setResultTurn(new LastTurn(static::getName(), $this->arg));
|
||||
$general->checkStatChange();
|
||||
tryRollbackInheritUniqueItem($rng, $general);
|
||||
$general->applyDB($db);
|
||||
return false;
|
||||
}
|
||||
@@ -330,7 +328,6 @@ class che_화계 extends Command\GeneralCommand
|
||||
$general->increaseRankVar(RankColumn::firenum, 1);
|
||||
$this->setResultTurn(new LastTurn(static::getName(), $this->arg));
|
||||
$general->checkStatChange();
|
||||
tryRollbackInheritUniqueItem($rng, $general);
|
||||
$general->applyDB($db);
|
||||
|
||||
return true;
|
||||
|
||||
@@ -7,8 +7,6 @@ use \sammo\JosaUtil;
|
||||
use \sammo\LastTurn;
|
||||
use \sammo\DB;
|
||||
|
||||
use function sammo\tryRollbackInheritUniqueItem;
|
||||
|
||||
class 휴식 extends Command\GeneralCommand{
|
||||
static protected $actionName = '휴식';
|
||||
|
||||
@@ -41,7 +39,6 @@ class 휴식 extends Command\GeneralCommand{
|
||||
$logger->pushGeneralActionLog("아무것도 실행하지 않았습니다. <1>$date</>");
|
||||
|
||||
$this->setResultTurn(new LastTurn());
|
||||
tryRollbackInheritUniqueItem($rng, $general);
|
||||
$general->applyDB(DB::db());
|
||||
return true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user