getVar('npc') -> getNPCType()
This commit is contained in:
@@ -65,7 +65,7 @@ class che_군량매매 extends Command\GeneralCommand{
|
||||
$this->setNation();
|
||||
|
||||
$this->minConditionConstraints=[
|
||||
ConstraintHelper::ReqCityTrader($general->getVar('npc')),
|
||||
ConstraintHelper::ReqCityTrader($general->getNPCType()),
|
||||
ConstraintHelper::OccupiedCity(true),
|
||||
ConstraintHelper::SuppliedCity(),
|
||||
];
|
||||
@@ -76,7 +76,7 @@ class che_군량매매 extends Command\GeneralCommand{
|
||||
$general = $this->generalObj;
|
||||
|
||||
$this->fullConditionConstraints=[
|
||||
ConstraintHelper::ReqCityTrader($general->getVar('npc')),
|
||||
ConstraintHelper::ReqCityTrader($general->getNPCType()),
|
||||
ConstraintHelper::OccupiedCity(true),
|
||||
ConstraintHelper::SuppliedCity(),
|
||||
];
|
||||
@@ -115,7 +115,7 @@ class che_군량매매 extends Command\GeneralCommand{
|
||||
$buyRice = $this->arg['buyRice'];
|
||||
|
||||
if($tradeRate === null){
|
||||
if($general->getVar('npc') >= 2){
|
||||
if($general->getNPCType() >= 2){
|
||||
$tradeRate = 1.0;
|
||||
}
|
||||
else{
|
||||
|
||||
@@ -135,7 +135,7 @@ class che_등용수락 extends Command\GeneralCommand{
|
||||
$destNationName = $this->destNation['name'];
|
||||
|
||||
$relYear = $env['year'] - $env['startyear'];
|
||||
if($general->getVar('npc') == 1 || $relYear >= 3){
|
||||
if($general->getNPCType() == 1 || $relYear >= 3){
|
||||
$joinedNations = $general->getAuxVar('joinedNations')??[];
|
||||
$joinedNations[] = $destNationID;
|
||||
$general->setAuxVar('joinedNations', $joinedNations);
|
||||
@@ -178,7 +178,7 @@ class che_등용수락 extends Command\GeneralCommand{
|
||||
$general->addDedication(100);
|
||||
}
|
||||
|
||||
if($general->getVar('npc') < 2){
|
||||
if($general->getNPCType() < 2){
|
||||
$general->setVar('killturn', $env['killturn']);
|
||||
}
|
||||
|
||||
|
||||
@@ -125,7 +125,7 @@ class che_랜덤임관 extends Command\GeneralCommand{
|
||||
|
||||
$destNation = null;
|
||||
|
||||
if ($general->getVar('npc') >= 2 && !$env['fiction'] && 1000 <= $env['scenario'] && $env['scenario'] < 2000) {
|
||||
if ($general->getNPCType() >= 2 && !$env['fiction'] && 1000 <= $env['scenario'] && $env['scenario'] < 2000) {
|
||||
if($notIn){
|
||||
$nations = $db->query(
|
||||
'SELECT nation.`name` as `name`,nation.nation as nation,scout,gennum,`affinity` FROM nation join general on general.nation = nation.nation and general.officer_level = 12 WHERE scout=0 and gennum<%i and nation.nation not in %li',
|
||||
@@ -276,7 +276,7 @@ class che_랜덤임관 extends Command\GeneralCommand{
|
||||
], 'nation=%i', $destNationID);
|
||||
|
||||
$relYear = $env['year'] - $env['startyear'];
|
||||
if($general->getVar('npc') == 1 || $relYear >= 3){
|
||||
if($general->getNPCType() == 1 || $relYear >= 3){
|
||||
$joinedNations = $general->getAuxVar('joinedNations')??[];
|
||||
$joinedNations[] = $destNationID;
|
||||
$general->setAuxVar('joinedNations', $joinedNations);
|
||||
|
||||
@@ -168,7 +168,7 @@ class che_임관 extends Command\GeneralCommand{
|
||||
\sammo\refreshNationStaticInfo();
|
||||
|
||||
$relYear = $env['year'] - $env['startyear'];
|
||||
if($general->getVar('npc') == 1 || $relYear >= 3){
|
||||
if($general->getNPCType() == 1 || $relYear >= 3){
|
||||
$joinedNations = $general->getAuxVar('joinedNations')??[];
|
||||
$joinedNations[] = $destNationID;
|
||||
$general->setAuxVar('joinedNations', $joinedNations);
|
||||
|
||||
@@ -64,7 +64,7 @@ class che_장비매매 extends Command\GeneralCommand{
|
||||
$this->setNation();
|
||||
|
||||
$this->minConditionConstraints=[
|
||||
ConstraintHelper::ReqCityTrader($general->getVar('npc')),
|
||||
ConstraintHelper::ReqCityTrader($general->getNPCType()),
|
||||
];
|
||||
}
|
||||
|
||||
@@ -80,7 +80,7 @@ class che_장비매매 extends Command\GeneralCommand{
|
||||
[$reqGold, $reqRice] = $this->getCost();
|
||||
|
||||
$this->fullConditionConstraints=[
|
||||
ConstraintHelper::ReqCityTrader($general->getVar('npc')),
|
||||
ConstraintHelper::ReqCityTrader($general->getNPCType()),
|
||||
ConstraintHelper::ReqCityCapacity('secu', '치안 수치', $itemClass->getReqSecu()),
|
||||
ConstraintHelper::ReqGeneralGold($reqGold),
|
||||
ConstraintHelper::ReqGeneralRice($reqRice),
|
||||
|
||||
@@ -173,7 +173,7 @@ class che_장수대상임관 extends Command\GeneralCommand{
|
||||
\sammo\refreshNationStaticInfo();
|
||||
|
||||
$relYear = $env['year'] - $env['startyear'];
|
||||
if($general->getVar('npc') == 1 || $relYear >= 3){
|
||||
if($general->getNPCType() == 1 || $relYear >= 3){
|
||||
$joinedNations = $general->getAuxVar('joinedNations')??[];
|
||||
$joinedNations[] = $destNationID;
|
||||
$general->setAuxVar('joinedNations', $joinedNations);
|
||||
|
||||
@@ -97,7 +97,7 @@ class che_하야 extends Command\GeneralCommand{
|
||||
$db->update('nation', [
|
||||
'gold'=>$db->sqleval('gold + %i', $lostGold),
|
||||
'rice'=>$db->sqleval('rice + %i', $lostRice),
|
||||
'gennum'=>$db->sqleval('gennum - %i', $general->getVar('npc')!=5?1:0)
|
||||
'gennum'=>$db->sqleval('gennum - %i', $general->getNPCType()!=5?1:0)
|
||||
], 'nation=%i', $nationID);
|
||||
\sammo\refreshNationStaticInfo();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user