diff --git a/tmp_msg/sender_list.json b/tmp_msg/sender_list.json index 5dfa5ab9..51952691 100644 --- a/tmp_msg/sender_list.json +++ b/tmp_msg/sender_list.json @@ -4,7 +4,7 @@ "nationID":0, "mailbox":9000, "nation":"재야", - "color":"#000000", + "color":"#ffffff", "general":[ [31, "Hide_Dy"] ] diff --git a/twe/j_msg_contact_list.php b/twe/j_msg_contact_list.php new file mode 100644 index 00000000..20a34126 --- /dev/null +++ b/twe/j_msg_contact_list.php @@ -0,0 +1,55 @@ +query('select `no`, `name`, `nation`, `level`, `npc` from `general` where `npc` < 2') as $general) +{ + list($generalID, $generalName, $nationID, $level, $npc) = $general; + if(!isset($generalNations[$nationID])){ + $generalNations[$nationID] = []; + } + + $isChief = ($level == 12); + + $obj = [$generalID, $generalName]; + if($isChief){ + $obj[] = 1; + } + + //TODO: 빙의장 정보 추가 + $generalNations[$nationID][] = $obj; +} + +$neutral = [ + "nation"=>0, + "name"=>"재야", + "color"=>"#ffffff" +]; + +$result = array_map(function($nation){ + $nationID = $nation['nation']; + $mailbox = $nationID + 9000; + $nation = $nation['name']; + $color = ('#'.$nation['color']).replace('##','#');//xxx: #기호 없는 이전 코드 대비용 + $generals = util::array_get($generalNations[$nationID], []); + + return [ + "nationID"=>$nationID, + "mailbox"=>$mailbox, + "nation"=>$nationID, + "color"=>$color, + "general"=>$generals + ]; +}, array_merge([$neutral], getAllNationStaticInfo())); + +returnJson([ + "nation"=>$result +]); \ No newline at end of file diff --git a/twe/j_msgselect.php b/twe/j_msgselect.php deleted file mode 100644 index 2462a743..00000000 --- a/twe/j_msgselect.php +++ /dev/null @@ -1,2 +0,0 @@ -