getVar('npc') -> getNPCType()

This commit is contained in:
2020-05-09 23:18:47 +09:00
parent d083dc36b2
commit 6e19722742
21 changed files with 51 additions and 47 deletions
+3 -3
View File
@@ -1581,11 +1581,11 @@ function tryUniqueItemLottery(General $general, string $acquireType = '아이템
$db = DB::db();
$gameStor = KVStorage::getStorage($db, 'game_env');
if ($general->getVar('npc') >= 2) {
if ($general->getNPCType() >= 2) {
return false;
}
if ($general->getVar('npc') > 6) {
if ($general->getNPCType() > 6) {
return false;
}
@@ -1729,7 +1729,7 @@ function nextRuler(General $general)
$candidate = null;
//npc or npc유저인 경우 후계 찾기
if ($general->getVar('npc') > 0) {
if ($general->getNPCType() > 0) {
$candidate = $db->queryFirstRow(
'SELECT no,name,officer_level,IF(ABS(affinity-%i)>75,150-ABS(affinity-%i),ABS(affinity-%i)) as npcmatch2 from general where nation=%i and officer_level!=12 and 1 <= npc and npc<=3 order by npcmatch2,rand() LIMIT 1',
$general->getVar('affinity'),