버그 수정

This commit is contained in:
2020-05-31 04:25:36 +09:00
parent e48db0d231
commit a569c1dfaf
+25 -11
View File
@@ -1,4 +1,5 @@
<?php <?php
namespace sammo; namespace sammo;
//통합 세력장수&암행부 viewer //통합 세력장수&암행부 viewer
@@ -42,7 +43,7 @@ $viewColumns = [
'owner_name' => 9, 'owner_name' => 9,
'nation' => 0, 'nation' => 0,
'city' => 1, 'city' => 1,
'officer_level'=>0, 'officer_level' => 2,
'officer_city' => 2, 'officer_city' => 2,
'npc' => 0, 'npc' => 0,
'defence_train' => 2, 'defence_train' => 2,
@@ -61,7 +62,7 @@ $viewColumns = [
'crew' => 2, 'crew' => 2,
'train' => 2, 'train' => 2,
'atmos' => 2, 'atmos' => 2,
'killturn'=>1, 'killturn' => 0,
'turntime' => 2, 'turntime' => 2,
'picture' => 0, 'picture' => 0,
'imgsvr' => 0, 'imgsvr' => 0,
@@ -78,17 +79,29 @@ $viewColumns = [
]; ];
$customViewColumns = [ $customViewColumns = [
'officerLevel'=>1, 'officerLevel' => 0,
'officerLevelText'=>1, 'officerLevelText' => 0,
'lbonus'=>1, 'lbonus' => 0,
'ownerName'=>1, 'ownerName' => 0,
'honorText'=>1, 'honorText' => 0
'expLevelText'=>1,
]; ];
function getOfficerLevel($rawGeneral)
{
global $permission;
$level = $rawGeneral['officer_level'];
if ($level >= 5) {
return $level;
}
if ($permission > 1) {
return $level;
}
return 1;
}
$specialViewFilter = [ $specialViewFilter = [
'officerLevel' => function ($rawGeneral){ 'officerLevel' => function ($rawGeneral){
return $rawGeneral['officer_level']; return getOfficerLevel($rawGeneral);
}, },
'special' => function ($rawGeneral) { 'special' => function ($rawGeneral) {
return getGeneralSpecialDomesticName($rawGeneral['special']); return getGeneralSpecialDomesticName($rawGeneral['special']);
@@ -108,8 +121,9 @@ $specialViewFilter = [
} }
return $rawGeneral['owner_name']; return $rawGeneral['owner_name'];
}, },
'officerLevelText'=>function($rawGeneral)use($nationArr){ 'officerLevelText' => function ($rawGeneral) use ($nationArr, $specialViewFilter) {
return getOfficerLevelText($rawGeneral['officer_level'], $nationArr['level']); $level = getOfficerLevel($rawGeneral);
return getOfficerLevelText($level, $nationArr['level']);
}, },
'honorText' => function ($rawGeneral) { 'honorText' => function ($rawGeneral) {
return getHonor($rawGeneral['experience']); return getHonor($rawGeneral['experience']);