Instructions Jenkins Doxygen

[Added] emails are now sent to guild members when guild name changes, 46/1746/1
authorIvojedi <ivojedi@swgemu.com>
Fri, 6 Jun 2014 04:04:02 +0000 (21:04 -0700)
committerIvojedi <ivojedi@swgemu.com>
Fri, 6 Jun 2014 04:04:02 +0000 (21:04 -0700)
guild leader changes, or when guild is disbanded

Change-Id: Icf11544e9b0c447cf096c9962e7d0df684c59cd8

MMOCoreORB/src/server/zone/managers/guild/GuildManager.idl
MMOCoreORB/src/server/zone/managers/guild/GuildManagerImplementation.cpp
MMOCoreORB/src/server/zone/objects/guild/RenameGuildTask.h

index 98d2c4a..66cd96a 100644 (file)
@@ -188,7 +188,7 @@ class GuildManager extends ManagedService implements Logger {
 
        public native void scheduleGuildRename(CreatureObject player, GuildObject guild);
 
-       public native void renameGuild(GuildObject guild, final string newName, final string newAbbrev);
+       public native void renameGuild(GuildObject guild, CreatureObject player, final string newName, final string newAbbrev);
 
        public native GuildObject createGuild(CreatureObject player, GuildTerminal guildTerminal, final string guildName, final string guildAbbrev);
        
index 7adbcd7..3572565 100644 (file)
@@ -282,7 +282,7 @@ void GuildManagerImplementation::scheduleGuildRename(CreatureObject* player, Gui
        //task->schedule(604800000); // 1 week
 }
 
-void GuildManagerImplementation::renameGuild(GuildObject* guild, const String& newName, const String& newAbbrev) {
+void GuildManagerImplementation::renameGuild(GuildObject* guild, CreatureObject* player, const String& newName, const String& newAbbrev) {
        Locker _lock(_this.get());
 
        if (guildList.contains(guild->getGuildKey())) {
@@ -312,6 +312,15 @@ void GuildManagerImplementation::renameGuild(GuildObject* guild, const String& n
        chatManager->broadcastMessage(gildd3);
 
        guild->setRenamePending(false);
+
+       // Send emails to guild
+       StringIdChatParameter params;
+       params.setStringId("@guildmail:namechange_text"); //%TO has renamed the guild to %TU <%TT>
+       params.setTO(player->getFirstName());
+       params.setTU(newName);
+       params.setTT(newAbbrev);
+
+       sendGuildMail("@guildmail:namechange_subject", params, guild);
 }
 
 void GuildManagerImplementation::sendGuildInformationTo(CreatureObject* player, GuildObject* guild, GuildTerminal* guildTerminal) {
@@ -524,7 +533,12 @@ void GuildManagerImplementation::transferLeadership(CreatureObject* newLeader, C
        oldLeader->sendSystemMessage("@guild:ml_success");  // PA leadership transferred.  YOu are now a normal member of the PA.
        newLeader->sendSystemMessage("@guild:ml_you_are_leader"); // You have been made leader of your PA
 
+       // Send emails to guild
+       StringIdChatParameter params;
+       params.setStringId("@guildmail:leaderchange_text"); //%TU is the new guild leader.
+       params.setTU(newLeader->getFirstName());
 
+       sendGuildMail("@guildmail:leaderchange_subject", params, guild);
 }
 
 // pre: newOwner locked ... old owner not locked
@@ -838,6 +852,13 @@ bool GuildManagerImplementation::disbandGuild(CreatureObject* player, GuildTermi
        }
        _lock.release();
 
+       // Send emails to guild
+       StringIdChatParameter params;
+       params.setStringId("@guildmail:namechange_text"); //The guild has been disbanded by %TU
+       params.setTU(player->getFirstName());
+
+       sendGuildMail("@guildmail:disband_subject", params, guild);
+
        //TODO: This could probably be moved to the GuildObject destructor!
        for (int i = 0; i < memberList->size(); ++i) {
                Locker _locker(_this.get());
index d33c32e..0e82634 100644 (file)
@@ -47,7 +47,7 @@ public:
                        return;
                }
 
-               guildManager->renameGuild(guild, newName, newAbbrev);
+               guildManager->renameGuild(guild, player, newName, newAbbrev);
        }
 };