외교 서신, 등용장 수락시 올바르지 않을 경우 alert

건국 시 장수 이름과 같아도 건국 가능하도록 변경
This commit is contained in:
2018-04-27 23:08:55 +09:00
parent a2d3ac9e70
commit 647c51fe0f
5 changed files with 13 additions and 10 deletions
+2 -2
View File
@@ -215,7 +215,7 @@ class DiplomaticMessage extends Message{
/**
* @return int 수행 결과 반환, ACCEPTED(등용장 소모), DECLINED(등용장 소모), INVALID 중 반환
*/
public function agreeMessage(int $receiverID):int{
public function agreeMessage(int $receiverID, string &$reason):int{
//NOTE: 올바른 유저가 agreeMessage() 호출을 한건지는 외부에서 체크 필요(Session->userID 등)
if(!$this->id){
@@ -318,7 +318,7 @@ class DiplomaticMessage extends Message{
return self::DECLINED;
}
public function declineMessage(int $receiverID):int{
public function declineMessage(int $receiverID, string &$reason):int{
if(!$this->id){
throw \RuntimeException('전송되지 않은 메시지에 거절 진행 중');
}