|
|
@@ -42,9 +42,20 @@ local NEW_ROLE_MAIL_ID = 7023
|
|
|
-- 特定渠道列表
|
|
|
local TARGET_CHANNEL_ARRAY = {1, 9}
|
|
|
|
|
|
-local function sendMail(human)
|
|
|
- local mailCfg = MailExcel.mail[NEW_ROLE_MAIL_ID]
|
|
|
- MailManager.add(MailManager.SYSTEM, human.db._id, mailCfg.title, mailCfg.content, nil, mailCfg.senderName or "GM")
|
|
|
+-- 用于公会渠道创角时发送奖励邮件的邮件Id
|
|
|
+local CHANNEL_GUILD_MAIL_ID = 7037
|
|
|
+
|
|
|
+-- 公会渠道创角奖励
|
|
|
+local channel_guild_createRole_rewards = {{102,8888}, {124,20}, {1208,2}, {111,1000000}, {112,1000}, {101,2000000}, {510,4}}
|
|
|
+
|
|
|
+
|
|
|
+local function sendMail(human, mailId, items)
|
|
|
+ local mailCfg = MailExcel.mail[mailId]
|
|
|
+ if not mailCfg then
|
|
|
+ return
|
|
|
+ end
|
|
|
+
|
|
|
+ MailManager.add(MailManager.SYSTEM, human.db._id, mailCfg.title, mailCfg.content, items, mailCfg.senderName or "GM")
|
|
|
end
|
|
|
|
|
|
|
|
|
@@ -101,6 +112,19 @@ function creatFakeDb(account, serverTag)
|
|
|
return db
|
|
|
end
|
|
|
|
|
|
+-- 创角时针对渠道的额外处理
|
|
|
+local function channelHandle(human)
|
|
|
+ -- 特定渠道用户创角时发送的邮件
|
|
|
+ if table.find(TARGET_CHANNEL_ARRAY, human.phpChanelID) then
|
|
|
+ sendMail(human, NEW_ROLE_MAIL_ID)
|
|
|
+ end
|
|
|
+
|
|
|
+ -- 公会渠道创角时发送奖励邮件
|
|
|
+ if human.phpChanelID == CommonDefine.CHANNEL_TAG_GUILD1 or human.phpChanelID == CommonDefine.CHANNEL_TAG_GUILD2 then
|
|
|
+ sendMail(human, CHANNEL_GUILD_MAIL_ID, channel_guild_createRole_rewards)
|
|
|
+ end
|
|
|
+end
|
|
|
+
|
|
|
|
|
|
function createNewRole(human)
|
|
|
if _G.is_middle == true then
|
|
|
@@ -141,11 +165,7 @@ function createNewRole(human)
|
|
|
|
|
|
DataCache.Insert_PlayerUuidList(human.db._id, human.db.lv)
|
|
|
|
|
|
- -- 特定渠道用户创角时发送的邮件
|
|
|
- if table.find(TARGET_CHANNEL_ARRAY, human.phpChanelID) then
|
|
|
- sendMail(human)
|
|
|
- end
|
|
|
-
|
|
|
+ channelHandle(human)
|
|
|
|
|
|
ReportManager.register(human)
|
|
|
end
|