refac: General 생성 방식 변경

- 변경한 GeneralQueryMode에 따라 Lite가 불가능
- Lite여도 된다면 GeneralLite 클래스로 변경
- 그렇지 않다면 General 클래스로 변경
- 내부에서 어떠한 연산을 할 지 알 수 없는데,
  구현 시점에서 편의에 따라 column 여부가 차이나면
  이후에 문제가 될 수 있음
- 엔진이 살짝 무거워 질 것으로 보임
This commit is contained in:
2023-08-01 16:28:29 +00:00
parent 55fca2337d
commit ad23398592
19 changed files with 25 additions and 21 deletions
+1 -1
View File
@@ -596,7 +596,7 @@ function ConquerCity(array $admin, General $general, array $city)
$lord = new General($db->queryFirstRow(
'SELECT %l FROM general WHERE nation = %i AND officer_level = %i LIMIT 1',
Util::formatListOfBackticks(General::mergeQueryColumn(['npc', 'gold', 'rice', 'experience', 'explevel', 'belong', 'dedication', 'dedlevel', 'aux'], GeneralQueryMode::Lite)[0]),
Util::formatListOfBackticks(General::mergeQueryColumn()[0]),
$defenderNationID,
12
), null, null, $city, $loseNation, $year, $month);