장수 목록 json 버그 수정
This commit is contained in:
@@ -17,7 +17,7 @@ $gameStor = KVStorage::getStorage($db, 'game_env');
|
|||||||
|
|
||||||
increaseRefresh("세력장수", 1);
|
increaseRefresh("세력장수", 1);
|
||||||
|
|
||||||
$me = $db->queryFirstRow('SELECT con, turntime, nation, officer_level, permission, penalty FROM general WHERE owner=%i', $userID);
|
$me = $db->queryFirstRow('SELECT con, turntime, belong, nation, officer_level, permission, penalty FROM general WHERE owner=%i', $userID);
|
||||||
$con = checkLimit($me['con']);
|
$con = checkLimit($me['con']);
|
||||||
if ($con >= 2) {
|
if ($con >= 2) {
|
||||||
Json::die([
|
Json::die([
|
||||||
@@ -37,42 +37,44 @@ if($reqForce && $reqType > $permission){
|
|||||||
$permission = min($reqType, $permission);
|
$permission = min($reqType, $permission);
|
||||||
$nationArr = getNationStaticInfo($nationID);
|
$nationArr = getNationStaticInfo($nationID);
|
||||||
$viewColumns = [
|
$viewColumns = [
|
||||||
'no'=>1,
|
'no'=>0,
|
||||||
'name'=>1,
|
'name'=>0,
|
||||||
'owner_name'=>9,
|
'owner_name'=>9,
|
||||||
'nation'=>1,
|
'nation'=>0,
|
||||||
'city'=>1,
|
'city'=>1,
|
||||||
'officer_level'=>9,
|
'officer_level'=>0,
|
||||||
'npc'=>1,
|
'officer_city'=>2,
|
||||||
|
'npc'=>0,
|
||||||
'defence_train'=>2,
|
'defence_train'=>2,
|
||||||
'troop'=>2,
|
'troop'=>2,
|
||||||
'injury'=>1,
|
'injury'=>0,
|
||||||
'leadership'=>1,
|
'leadership'=>0,
|
||||||
'strength'=>1,
|
'strength'=>0,
|
||||||
'intel'=>1,
|
'intel'=>0,
|
||||||
'experience'=>1,
|
'experience'=>1,
|
||||||
'explevel'=>1,
|
'explevel'=>0,
|
||||||
'dedication'=>1,
|
'dedication'=>1,
|
||||||
'dedlevel'=>1,
|
'dedlevel'=>0,
|
||||||
'gold'=>1,
|
'gold'=>0,
|
||||||
'rice'=>1,
|
'rice'=>0,
|
||||||
'crewtype'=>2,
|
'crewtype'=>2,
|
||||||
'crew'=>2,
|
'crew'=>2,
|
||||||
'train'=>2,
|
'train'=>2,
|
||||||
'atmos'=>2,
|
'atmos'=>2,
|
||||||
'killturn'=>1,
|
'killturn'=>1,
|
||||||
'turntime'=>2,
|
'turntime'=>2,
|
||||||
'picture'=>1,
|
'picture'=>0,
|
||||||
'imgsvr'=>1,
|
'imgsvr'=>0,
|
||||||
'age'=>1,
|
'age'=>0,
|
||||||
'special'=>1,
|
'special'=>0,
|
||||||
'special2'=>1,
|
'special2'=>0,
|
||||||
'personal'=>1,
|
'personal'=>0,
|
||||||
'horse'=>3,
|
'belong'=>0,
|
||||||
'weapon'=>3,
|
'horse'=>2,
|
||||||
'book'=>3,
|
'weapon'=>2,
|
||||||
'item'=>3,
|
'book'=>2,
|
||||||
'connect'=>1
|
'item'=>2,
|
||||||
|
'connect'=>0
|
||||||
];
|
];
|
||||||
|
|
||||||
$customViewColumns = [
|
$customViewColumns = [
|
||||||
@@ -122,9 +124,9 @@ $specialViewFilter = [
|
|||||||
|
|
||||||
];
|
];
|
||||||
|
|
||||||
$queryColumns = General::mergeQueryColumn(array_keys($viewColumns), 1);
|
[$queryColumns, $rankColumns] = General::mergeQueryColumn(array_keys($viewColumns), 1);
|
||||||
|
|
||||||
$rawGeneralList = Util::convertArrayToDict($db->queryAllLists('SELECT %lb from general WHERE nation = %i', $queryColumns, $nationID), 'no');
|
$rawGeneralList = Util::convertArrayToDict($db->query('SELECT %l from general WHERE nation = %i', Util::formatListOfBackticks($queryColumns), $nationID), 'no');
|
||||||
|
|
||||||
$resultColumns = [];
|
$resultColumns = [];
|
||||||
foreach($viewColumns as $column=>$reqPermission){
|
foreach($viewColumns as $column=>$reqPermission){
|
||||||
|
|||||||
Reference in New Issue
Block a user