From 59c7fdd3c0ca163e603aaa378856a189c6571d41 Mon Sep 17 00:00:00 2001 From: Martin Ambrus Date: Wed, 8 Nov 2017 11:02:15 +0100 Subject: [PATCH] refactor: Nature no longer sends automated notification, Taskmaster does --- GameEngine/Alliance.php | 4 ++-- GameEngine/Database.php | 16 ++++++++-------- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/GameEngine/Alliance.php b/GameEngine/Alliance.php index 95d94973..edb84c91 100755 --- a/GameEngine/Alliance.php +++ b/GameEngine/Alliance.php @@ -154,7 +154,7 @@ class Alliance { // send invitation via in-game messages $database->sendMessage( $UserData['id'], - 2, + 4, 'Alliance invitation.', $database->escape("Hi, ".$UserData['username']."!\n\nThis is to inform you that you have been invited to join an alliance. To accept this invitation, please visit your Embassy.\n\nYours sincerely,\nServer Robot :)"), 0, @@ -489,7 +489,7 @@ class Alliance { // send the new founder an in-game message, notifying them of their election $database->sendMessage( $newleader, - 2, + 4, 'You are now leader of your alliance', "Hi!\n\nThis is to inform you that the former leader of your alliance - ".$database->escape($session->username).", has decided to quit and elected you as his replacement. You now gain full access, administration and responsibilities to your alliance.\n\nGood luck!\n\nYours sincerely,\nServer Robot :)", 0, diff --git a/GameEngine/Database.php b/GameEngine/Database.php index 6f85e475..401db164 100755 --- a/GameEngine/Database.php +++ b/GameEngine/Database.php @@ -1597,7 +1597,7 @@ class MYSQLi_DB implements IDbConnection { if ($row['owner'] != $owner) { $this->sendMessage( (int) $row['owner'], - 2, + 4, 'New Message in Alliance Forum', "Hi!\n\n".$this->escape($session->username)." posted a new message into your common topic. Here\\'s a link that will get you there: forum link\n\nYours sincerely,\nServer Robot :)", 0, @@ -3001,7 +3001,7 @@ class MYSQLi_DB implements IDbConnection { if ($demolition) { $this->sendMessage( $userData['id'], - 2, + 4, 'You left the alliance', $this->escape("Hi, ".$userData['username']."!\n\nThis is to inform you that due to a finished demolition of your last Embassy, you have now successfully left your alliance.\n\nYours sincerely,\nServer Robot :)"), 0, @@ -3014,7 +3014,7 @@ class MYSQLi_DB implements IDbConnection { // player has been removed from the alliance $this->sendMessage( $userData['id'], - 2, + 4, 'An attack has forced you to leave the alliance', $this->escape("Hi, ".$userData['username']."!\n\nThis is to inform you that due to a successful attack and destruction of your last Embassy, you have been forced to leave your alliance.\n\nTo re-establish your position in this alliance, you will need to build a new Embassy and ask the leader to send you an invite again.\n\nYours sincerely,\nServer Robot :)"), 0, @@ -3069,7 +3069,7 @@ class MYSQLi_DB implements IDbConnection { // notify them via in-game messaging $this->sendMessage( $member['id'], - 2, + 4, 'Your alliance was disbanded', ( ($member['id'] == $userData['id']) @@ -3113,7 +3113,7 @@ class MYSQLi_DB implements IDbConnection { // notify new leader via in-game messaging $this->sendMessage( $newleader, - 2, + 4, 'You are now the alliance leader', $this->escape("Hi, ".$member['username']."!\n\nThis is to inform you that there was a successful attack on player ".$userData['username']." which has damaged their Embassy badly enough that they are no longer able to sustain the leadership of your alliance.\n\nSince your Embassy level is of a sufficient level, you have been auto-elected to the position of a new leader of your alliance with all duties and responsibilities thereof.\n\nYours sincerely,\nServer Robot :)"), 0, @@ -3142,7 +3142,7 @@ class MYSQLi_DB implements IDbConnection { foreach ($members as $member) { $this->sendMessage( $member['id'], - 2, + 4, 'Your alliance was dispersed', ( ($member['id'] == $userData['id']) @@ -3177,7 +3177,7 @@ class MYSQLi_DB implements IDbConnection { if ($keepCurrentPlayer || (!$keepCurrentPlayer && $member['id'] != $userData['id'])) $this->sendMessage( $member['id'], - 2, + 4, 'Your alliance has a new leader', ( ($member['id'] == $userData['id']) @@ -3209,7 +3209,7 @@ class MYSQLi_DB implements IDbConnection { // notify the evicted player $this->sendMessage( $userData['id'], - 2, + 4, 'An attack has forced you to leave the alliance', $this->escape("Hi, ".$userData['username']."!\n\nThis is to inform you that due to a successful attack and destruction of your last Embassy, you have been forced to leave your alliance.\n\nTo re-establish your position in this alliance, you will need to build a new Embassy and ask the newly auto-elected leader to send you an invite again.\n\nYours sincerely,\nServer Robot :)"), 0,