추방 몰수 선포 등 상황에서 메시지 안 나타나는 버그 수정
This commit is contained in:
+17
-1
@@ -165,7 +165,23 @@ if($btn == "추방") {
|
|||||||
case 4: $str = "날 추방했으니 그 복수로 적국에 정보를 팔아 넘겨야겠군요. 그럼 이만."; break;
|
case 4: $str = "날 추방했으니 그 복수로 적국에 정보를 팔아 넘겨야겠군요. 그럼 이만."; break;
|
||||||
}
|
}
|
||||||
|
|
||||||
PushMsg(1, 0, $general['picture'], $general['imgsvr'], "{$general['name']}:", $nation['color'], $nation['name'], $nation['color'], $str);
|
$src = new MessageTarget(
|
||||||
|
$general['no'],
|
||||||
|
$general['name'],
|
||||||
|
$general['nation'],
|
||||||
|
$nation['name'],
|
||||||
|
$nation['color'],
|
||||||
|
GetImageURL($general['imgsvr'], $general['picture'])
|
||||||
|
);
|
||||||
|
$msg = new Message(
|
||||||
|
Message::MSGTYPE_PUBLIC,
|
||||||
|
$src,
|
||||||
|
$src,
|
||||||
|
$str,
|
||||||
|
new \DateTime(),
|
||||||
|
new \DateTime('9999-12-31')
|
||||||
|
);
|
||||||
|
$msg->send();
|
||||||
}
|
}
|
||||||
|
|
||||||
//국가 기술력 그대로
|
//국가 기술력 그대로
|
||||||
|
|||||||
@@ -1126,23 +1126,6 @@ function nationMsg() {
|
|||||||
echo "<font color=orange>".$nation['msg']."</font>";
|
echo "<font color=orange>".$nation['msg']."</font>";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
function PushMsg($type, $nation, $picture, $imgsvr, $from, $fromcolor, $to, $tocolor, $msg) {
|
|
||||||
if($nation == 0) { $nation = 0; }
|
|
||||||
if($fromcolor == "") { $fromcolor = "#FFFFFF"; }
|
|
||||||
if($to == "") { $to = "재야"; }
|
|
||||||
if($tocolor == "") { $tocolor = "#FFFFFF"; }
|
|
||||||
|
|
||||||
$date = date('Y-m-d H:i:s');
|
|
||||||
if($type == 1) { $file = "_all_msg.txt"; }
|
|
||||||
else { $file = "_nation_msg{$nation}.txt"; }
|
|
||||||
$fp = fopen(__dir__."/logs/{$file}", "a");
|
|
||||||
//로그 파일에 기록
|
|
||||||
$str = "{$type}|".StringUtil::padStringAlignRight($from,12," ")."|".StringUtil::padStringAlignRight($to,12," ")."|".$date."|".$msg."|".$fromcolor."|".$tocolor."|".$picture."|".$imgsvr;
|
|
||||||
fwrite($fp, "{$str}\n");
|
|
||||||
fclose($fp);
|
|
||||||
}
|
|
||||||
|
|
||||||
function msgprint($msg, $name, $picture, $imgsvr, $when, $num, $type) {
|
function msgprint($msg, $name, $picture, $imgsvr, $when, $num, $type) {
|
||||||
$db = DB::db();
|
$db = DB::db();
|
||||||
$connect=$db->get();
|
$connect=$db->get();
|
||||||
|
|||||||
+18
-4
@@ -286,10 +286,24 @@ function processAI($no) {
|
|||||||
case 6: $term = 30; break;
|
case 6: $term = 30; break;
|
||||||
case 7: $term = 60; break;
|
case 7: $term = 60; break;
|
||||||
}
|
}
|
||||||
if($general['npcid'] == 2000 && rand()%(24*$term) < 6) {
|
if($general['npcmsg'] != "" && rand()%(24*$term) < 3) {
|
||||||
PushMsg(1, 0, $general['picture'], $general['imgsvr'], "{$general['name']}:", $nation['color'], $nation['name'], $nation['color'], $general['npcmsg']);
|
$src = new MessageTarget(
|
||||||
} elseif($general['npcmsg'] != "" && rand()%(24*$term) < 3) {
|
$general['no'],
|
||||||
PushMsg(1, 0, $general['picture'], $general['imgsvr'], "{$general['name']}:", $nation['color'], $nation['name'], $nation['color'], $general['npcmsg']);
|
$general['name'],
|
||||||
|
$general['nation'],
|
||||||
|
$nation['name'],
|
||||||
|
$nation['color'],
|
||||||
|
GetImageURL($general['imgsvr'], $general['picture'])
|
||||||
|
);
|
||||||
|
$msg = new Message(
|
||||||
|
Message::MSGTYPE_PUBLIC,
|
||||||
|
$src,
|
||||||
|
$src,
|
||||||
|
$general['npcmsg'],
|
||||||
|
new \DateTime(),
|
||||||
|
new \DateTime('9999-12-31')
|
||||||
|
);
|
||||||
|
$msg->send();
|
||||||
}
|
}
|
||||||
|
|
||||||
//재야인경우
|
//재야인경우
|
||||||
|
|||||||
@@ -173,7 +173,23 @@ function process_24(&$general) {
|
|||||||
case 4: $str = "몰수로 인한 사기 저하는 몰수로 얻은 물자보다 더 손해란걸 모른단 말인가!"; break;
|
case 4: $str = "몰수로 인한 사기 저하는 몰수로 얻은 물자보다 더 손해란걸 모른단 말인가!"; break;
|
||||||
}
|
}
|
||||||
|
|
||||||
PushMsg(1, 0, $gen['picture'], $gen['imgsvr'], "{$gen['name']}:", $nation['color'], $nation['name'], $nation['color'], $str);
|
$src = new MessageTarget(
|
||||||
|
$gen['no'],
|
||||||
|
$gen['name'],
|
||||||
|
$gen['nation'],
|
||||||
|
$nation['name'],
|
||||||
|
$nation['color'],
|
||||||
|
GetImageURL($gen['imgsvr'], $gen['picture'])
|
||||||
|
);
|
||||||
|
$msg = new Message(
|
||||||
|
Message::MSGTYPE_PUBLIC,
|
||||||
|
$src,
|
||||||
|
$src,
|
||||||
|
$str,
|
||||||
|
new \DateTime(),
|
||||||
|
new \DateTime('9999-12-31')
|
||||||
|
);
|
||||||
|
$msg->send();
|
||||||
}
|
}
|
||||||
|
|
||||||
$genlog[] = "<C>●</>$dtype {$amount}을 몰수 당했습니다.";
|
$genlog[] = "<C>●</>$dtype {$amount}을 몰수 당했습니다.";
|
||||||
@@ -759,8 +775,30 @@ function process_62(&$general) {
|
|||||||
$msg = "【외교】{$admin['year']}년 {$admin['month']}월:{$younation['name']}에 선전포고";
|
$msg = "【외교】{$admin['year']}년 {$admin['month']}월:{$younation['name']}에 선전포고";
|
||||||
$youmsg = "【외교】{$admin['year']}년 {$admin['month']}월:{$nation['name']}에서 선전포고";
|
$youmsg = "【외교】{$admin['year']}년 {$admin['month']}월:{$nation['name']}에서 선전포고";
|
||||||
|
|
||||||
PushMsg(2, $nation['nation'], $general['picture'], $general['imgsvr'], "{$general['name']}:{$nation['name']}▶", $nation['color'], $younation['name'], $younation['color'], $msg);
|
$src = new MessageTarget(
|
||||||
PushMsg(3, $younation['nation'], $general['picture'], $general['imgsvr'], "{$general['name']}:{$nation['name']}▶", $nation['color'], $younation['name'], $younation['color'], $youmsg);
|
$general['no'],
|
||||||
|
$general['name'],
|
||||||
|
$general['nation'],
|
||||||
|
$nation['name'],
|
||||||
|
$nation['color'],
|
||||||
|
GetImageURL($general['imgsvr'], $general['picture'])
|
||||||
|
);
|
||||||
|
$dest = new MessageTarget(
|
||||||
|
0,
|
||||||
|
'',
|
||||||
|
$younation['nation'],
|
||||||
|
$younation['name'],
|
||||||
|
$younation['color']
|
||||||
|
);
|
||||||
|
$msg = new Message(
|
||||||
|
Message::MSGTYPE_NATIONAL,
|
||||||
|
$src,
|
||||||
|
$dest,
|
||||||
|
$str,
|
||||||
|
new \DateTime($general['turntime']),
|
||||||
|
new \DateTime('9999-12-31')
|
||||||
|
);
|
||||||
|
$msg->send(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
pushWorldHistory($history, $admin['year'], $admin['month']);
|
pushWorldHistory($history, $admin['year'], $admin['month']);
|
||||||
|
|||||||
Reference in New Issue
Block a user