getGeneralTurnBrief 연동 코드 수정
This commit is contained in:
@@ -286,7 +286,9 @@ for($j=0; $j < $gencount; $j++) {
|
|||||||
|
|
||||||
if($ourGeneral && !$isNPC){
|
if($ourGeneral && !$isNPC){
|
||||||
$turnText = [];
|
$turnText = [];
|
||||||
foreach(getGeneralTurnBrief($general, 1) as $turnRawIdx=>$turn){
|
$generalObj = new General($general, null, 0, 0, false);
|
||||||
|
$turnBrief = getGeneralTurnBrief($genralObj, $generalTurnList[$generalObj->getID()]);
|
||||||
|
foreach($turnBrief as $turnRawIdx=>$turn){
|
||||||
$turnIdx = $turnRawIdx+1;
|
$turnIdx = $turnRawIdx+1;
|
||||||
$turnText[] = "{$turnIdx} : $turn";
|
$turnText[] = "{$turnIdx} : $turn";
|
||||||
}
|
}
|
||||||
|
|||||||
+5
-6
@@ -175,14 +175,13 @@ foreach ($generals as &$general) {
|
|||||||
|
|
||||||
if ($general['npc'] < 2) {
|
if ($general['npc'] < 2) {
|
||||||
$generalObj = new General($general, null, 0, 0, false);
|
$generalObj = new General($general, null, 0, 0, false);
|
||||||
$turnBrief = getGeneralTurnBrief($genralObj, $generalTurnList[$general['no']]);
|
$turnBrief = getGeneralTurnBrief($genralObj, $generalTurnList[$generalObj->getID()]);
|
||||||
$turntext = [];
|
$turntext = [];
|
||||||
$turn = getGeneralTurnBrief($general, 1, 0);
|
|
||||||
|
|
||||||
foreach($turnBrief as $turnIdx=>$text) {
|
foreach($turnBrief as $turnRawIdx=>$turn){
|
||||||
$text = StringUtil::subStringForWidth($text, 0, 41);
|
$turn = StringUtil::subStringForWidth($turn, 0, 41);
|
||||||
$printIdx = $turnIdx+1;
|
$turnIdx = $turnRawIdx+1;
|
||||||
$turntext[] = " $printIdx : $text";
|
$turntext[] = " $turnIdx : $turn";
|
||||||
}
|
}
|
||||||
$general['turntext'] = join("<br>\n", $turntext);
|
$general['turntext'] = join("<br>\n", $turntext);
|
||||||
}
|
}
|
||||||
|
|||||||
+8
-6
@@ -83,7 +83,9 @@ function myCommandList() {
|
|||||||
echo "로그인 되어있지 않습니다.";
|
echo "로그인 되어있지 않습니다.";
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
$turn = getGeneralTurnBrief($me, 2);
|
$generalObj = new General($me, null, 1, 1, false);
|
||||||
|
$turnList = $db->query('SELECT turn_idx, action, arg FROM general_turn WHERE general_id = %i ORDER BY turn_idx ASC', $generalObj->getID());
|
||||||
|
$turnBrief = getGeneralTurnBrief($generalObj, $turnList);
|
||||||
|
|
||||||
echo "<table width=300 height=700 class='tb_layout bg2'>
|
echo "<table width=300 height=700 class='tb_layout bg2'>
|
||||||
<form name=clock>
|
<form name=clock>
|
||||||
@@ -99,19 +101,19 @@ function myCommandList() {
|
|||||||
|
|
||||||
$totaldate = $me['turntime'];
|
$totaldate = $me['turntime'];
|
||||||
|
|
||||||
for($i=0; $i < 24; $i++) {
|
foreach($turnBrief as $rawTurnIdx => $turn) {
|
||||||
if($month == 13) {
|
if($month == 13) {
|
||||||
$month = 1;
|
$month = 1;
|
||||||
$year++;
|
$year++;
|
||||||
}
|
}
|
||||||
$j = $i + 1;
|
$turnIdx = $rawTurnIdx + 1;
|
||||||
$turndate = substr($totaldate,11, 5);
|
$turndate = substr($totaldate,11, 5);
|
||||||
echo "
|
echo "
|
||||||
<tr height=28>
|
<tr height=28>
|
||||||
<td width=24 align=center height=24 id=bg0><b>$j</b></td>
|
<td width=24 align=center height=24 class='bg0'><b>$turnIdx</b></td>
|
||||||
<td width=71 align=center height=24 id=bg1 style='overflow:hidden;'><b>{$year}年 {$month}月</b></td>
|
<td width=71 align=center height=24 class='bg1' style='overflow:hidden;'><b>{$year}年 {$month}月</b></td>
|
||||||
<td width=42 align=center bgcolor=black><b>$turndate</b></td>
|
<td width=42 align=center bgcolor=black><b>$turndate</b></td>
|
||||||
<td width=150 align=center height=24 style=table-layout:fixed;>$turn[$i]</td>
|
<td width=150 align=center height=24 style=table-layout:fixed;>{$turn}</td>
|
||||||
</tr>";
|
</tr>";
|
||||||
$month++;
|
$month++;
|
||||||
$totaldate = addTurn($totaldate, $admin['turnterm']);
|
$totaldate = addTurn($totaldate, $admin['turnterm']);
|
||||||
|
|||||||
@@ -12,6 +12,7 @@ function getGeneralTurnBrief(General $generalObj, array $turnList) {
|
|||||||
}
|
}
|
||||||
return $result;
|
return $result;
|
||||||
|
|
||||||
|
//TODO: 정리가 끝나면 삭제
|
||||||
$turn = [];
|
$turn = [];
|
||||||
$turn[0] = $general["turn0"];
|
$turn[0] = $general["turn0"];
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user