연감 저장방식 수정
This commit is contained in:
@@ -80,37 +80,37 @@ class ActionLogger
|
||||
public function flush()
|
||||
{
|
||||
if ($this->generalHistoryLog && $this->generalID) {
|
||||
pushGeneralHistory($this->generalID, $this->generalHistoryLog, $this->year, $this->month);
|
||||
pushGeneralHistoryLog($this->generalID, $this->generalHistoryLog, $this->year, $this->month);
|
||||
$this->generalHistoryLog = [];
|
||||
}
|
||||
|
||||
if ($this->generalActionLog && $this->generalID) {
|
||||
pushGenLog($this->generalID, $this->generalActionLog, $this->year, $this->month);
|
||||
pushGeneralActionLog($this->generalID, $this->generalActionLog, $this->year, $this->month);
|
||||
$this->generalActionLog = [];
|
||||
}
|
||||
|
||||
if ($this->generalBattleResultLog && $this->generalID) {
|
||||
pushBatRes($this->generalID, $this->generalBattleResultLog, $this->year, $this->month);
|
||||
pushBattleResultLog($this->generalID, $this->generalBattleResultLog, $this->year, $this->month);
|
||||
$this->generalBattleResultLog = [];
|
||||
}
|
||||
|
||||
if ($this->generalBattleDetailLog && $this->generalID) {
|
||||
pushBatLog($this->generalID, $this->generalBattleDetailLog, $this->year, $this->month);
|
||||
pushBattleDetailLog($this->generalID, $this->generalBattleDetailLog, $this->year, $this->month);
|
||||
$this->generalBattleDetailLog = [];
|
||||
}
|
||||
|
||||
if ($this->nationID && $this->nationalHistoryLog) {
|
||||
pushNationHistory($this->nationID, $this->nationalHistoryLog, $this->year, $this->month);
|
||||
pushNationHistoryLog($this->nationID, $this->nationalHistoryLog, $this->year, $this->month);
|
||||
$this->nationalHistoryLog = [];
|
||||
}
|
||||
|
||||
if ($this->globalHistoryLog) {
|
||||
pushWorldHistory($this->globalHistoryLog, $this->year, $this->month);
|
||||
pushGlobalHistoryLog($this->globalHistoryLog, $this->year, $this->month);
|
||||
$this->globalHistoryLog = [];
|
||||
}
|
||||
|
||||
if ($this->globalActionLog) {
|
||||
pushGeneralPublicRecord($this->globalActionLog, $this->year, $this->month);
|
||||
pushGlobalActionLog($this->globalActionLog, $this->year, $this->month);
|
||||
$this->globalActionLog = [];
|
||||
}
|
||||
}
|
||||
|
||||
@@ -164,7 +164,7 @@ class DiplomaticMessage extends Message{
|
||||
|
||||
list($result, $reason) = $this->checkDiplomaticMessageValidation($general);
|
||||
if($result !== self::ACCEPTED){
|
||||
pushGenLog($receiverID, ["<C>●</>{$reason} {$this->diplomacyName} 실패."]);
|
||||
pushGeneralActionLog($receiverID, ["<C>●</>{$reason} {$this->diplomacyName} 실패."]);
|
||||
if($result === self::DECLINED){
|
||||
$this->_declineMessage();
|
||||
}
|
||||
@@ -186,7 +186,7 @@ class DiplomaticMessage extends Message{
|
||||
}
|
||||
|
||||
if($result !== self::ACCEPTED){
|
||||
pushGenLog($receiverID, ["<C>●</>{$reason}"]);
|
||||
pushGeneralActionLog($receiverID, ["<C>●</>{$reason}"]);
|
||||
if($result === self::DECLINED){
|
||||
$this->_declineMessage();
|
||||
}
|
||||
@@ -259,13 +259,13 @@ class DiplomaticMessage extends Message{
|
||||
list($result, $reason) = $this->checkDiplomaticMessageValidation($general);
|
||||
|
||||
if($result === self::INVALID){
|
||||
pushGenLog($receiverID, ["<C>●</>{$reason} {$this->diplomacyName} 거절 불가."]);
|
||||
pushGeneralActionLog($receiverID, ["<C>●</>{$reason} {$this->diplomacyName} 거절 불가."]);
|
||||
return $result;
|
||||
}
|
||||
|
||||
$josaYi = JosaUtil::pick($this->dest->nationName, '이');
|
||||
pushGenLog($receiverID, ["<C>●</><D>{$this->src->nationName}</>의 {$this->diplomacyName} 제안을 거절했습니다."]);
|
||||
pushGenLog($this->src->generalID, ["<C>●</><Y>{$this->dest->nationName}</>{$josaYi} {$this->diplomacyName} 제안을 거절했습니다."]);
|
||||
pushGeneralActionLog($receiverID, ["<C>●</><D>{$this->src->nationName}</>의 {$this->diplomacyName} 제안을 거절했습니다."]);
|
||||
pushGeneralActionLog($this->src->generalID, ["<C>●</><Y>{$this->dest->nationName}</>{$josaYi} {$this->diplomacyName} 제안을 거절했습니다."]);
|
||||
$this->_declineMessage();
|
||||
return self::DECLINED;
|
||||
}
|
||||
|
||||
@@ -547,7 +547,7 @@ class Scenario{
|
||||
|
||||
|
||||
|
||||
pushWorldHistory($this->history, $env['year'], $env['month']);
|
||||
pushGlobalHistoryLog($this->history, $env['year'], $env['month']);
|
||||
|
||||
refreshNationStaticInfo();
|
||||
foreach(getAllNationStaticInfo() as $nation){
|
||||
|
||||
@@ -143,14 +143,14 @@ class ScoutMessage extends Message{
|
||||
list($result, $reason) = $this->checkScoutMessageValidation($receiverID);
|
||||
|
||||
if($result === self::INVALID){
|
||||
pushGenLog($receiverID, ["<C>●</>{$reason} 등용 취소 불가."]);
|
||||
pushGeneralActionLog($receiverID, ["<C>●</>{$reason} 등용 취소 불가."]);
|
||||
return $result;
|
||||
}
|
||||
|
||||
$josaRo = JosaUtil::pick($this->src->nationName, '로');
|
||||
$josaYi = JosaUtil::pick($this->dest->generalName, '이');
|
||||
pushGenLog($receiverID, ["<C>●</><D>{$this->src->nationName}</>{$josaRo} 망명을 거부했습니다."]);
|
||||
pushGenLog($this->src->generalID, ["<C>●</><Y>{$this->dest->generalName}</>{$josaYi} 등용을 거부했습니다."]);
|
||||
pushGeneralActionLog($receiverID, ["<C>●</><D>{$this->src->nationName}</>{$josaRo} 망명을 거부했습니다."]);
|
||||
pushGeneralActionLog($this->src->generalID, ["<C>●</><Y>{$this->dest->generalName}</>{$josaYi} 등용을 거부했습니다."]);
|
||||
$this->_declineMessage();
|
||||
|
||||
return self::DECLINED;
|
||||
|
||||
Reference in New Issue
Block a user