From 1d877dc6c7523fbc38bafa29d27d9c0c73f72eff Mon Sep 17 00:00:00 2001
From: xdh <xiefantasy@qq.com>
Date: 星期三, 13 三月 2019 10:24:15 +0800
Subject: [PATCH] 3049 【主干】【1.6】合服许愿池第一天奖励不能领取

---
 ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerControl.py |   36 ++++++++++++++++++++++--------------
 1 files changed, 22 insertions(+), 14 deletions(-)

diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerControl.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerControl.py
index 91184a0..6beeb0e 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerControl.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerControl.py
@@ -325,7 +325,7 @@
     return
 
 #---------------------------------------------------------------------
-def SendMailBatch(mailTypeKey, batchPlayerIDList, batchAddItemList=[], batchParamList=[], batchGold=[], batchGoldPaper=[], batchSilver=[], batchDetail=[]):
+def SendMailBatch(mailTypeKey, batchPlayerIDList, batchAddItemList=[], batchParamList=[], batchGold=[], batchGoldPaper=[], batchSilver=[], batchDetail=[], moneySource=ChConfig.Def_GiveMoney_Mail):
     '''批量发送邮件, 用于瞬间需要发送多封(大量)邮件的,比如一些公共副本活动等结算时
     @param mailTypeKey: 邮件模板key
     @param batchPlayerIDList: [playerIDList, playerIDList, ...]
@@ -335,14 +335,15 @@
     @param batchGoldPaper: [batchGoldPaper, batchGoldPaper, ...]
     @param batchSilver: [batchSilver, batchSilver, ...]
     @param batchDetail: [记录邮件流向用, ...]
+    @param moneySource: 货币来源
     '''
-    msgInfo = str([mailTypeKey, batchPlayerIDList, batchAddItemList, batchParamList, batchGold, batchGoldPaper, batchSilver, batchDetail])
+    msgInfo = str([mailTypeKey, batchPlayerIDList, batchAddItemList, batchParamList, batchGold, batchGoldPaper, batchSilver, batchDetail, moneySource])
     GameWorld.GetPlayerManager().GameServer_QueryPlayerResult(0, 0, 0, "SendMailBatch", msgInfo, len(msgInfo))
     GameWorld.Log("SendMailBatch %s, batchPlayerIDList=%s, batchAddItemList=%s, batchParamList=%s, batchGold=%s, batchGoldPaper=%s, batchSilver=%s" 
                   % (mailTypeKey, batchPlayerIDList, batchAddItemList, batchParamList, batchGold, batchGoldPaper, batchSilver))
     return
 
-def SendMailByKey(mailTypeKey, playerIDList, addItemList, paramList=[], gold=0, goldPaper=0, silver=0, detail=""):
+def SendMailByKey(mailTypeKey, playerIDList, addItemList, paramList=[], gold=0, goldPaper=0, silver=0, detail="", moneySource=ChConfig.Def_GiveMoney_Mail):
     '''
     @param detail: 记录邮件流向用
     '''
@@ -350,13 +351,13 @@
         mailTypeKey = ShareDefine.DefaultLackSpaceMailType
     
     content = "<MailTemplate>%s</MailTemplate>%s" % (mailTypeKey, json.dumps(paramList, ensure_ascii=False))
-    SendMail("", content, 30, playerIDList, addItemList, gold, goldPaper, silver, detail)
+    SendMail("", content, 30, playerIDList, addItemList, gold, goldPaper, silver, detail, moneySource)
     return
 
 ## 功能发放物品补偿/奖励邮件
-#  @param addItemList [(itemID, itemCnt, isBind), {或物品信息字典}, ...]
+#  @param addItemList [(itemID, itemCnt, 是否拍品), {或物品信息字典}, ...]
 #  @return
-def SendMail(title, content, getDays, playerIDList, addItemList, gold=0, goldPaper=0, silver=0, detail=""):
+def SendMail(title, content, getDays, playerIDList, addItemList, gold=0, goldPaper=0, silver=0, detail="", moneySource=ChConfig.Def_GiveMoney_Mail):
     if not playerIDList:
         return
     
@@ -381,24 +382,26 @@
         if len(mailItem) != 3:
             continue
         
-        itemID, itemCnt, isBind = mailItem
+        itemID, itemCnt, isAuctionItem = mailItem
         
         if ItemControler.GetAppointItemRealID(itemID):
             # 定制物品转化为物品信息字典
-            appointItemObj = ItemControler.GetItemByData(ItemControler.GetAppointItemDictData(itemID, isBind))
+            appointItemObj = ItemControler.GetItemByData(ItemControler.GetAppointItemDictData(itemID, isAuctionItem))
             if not appointItemObj:
-                GameWorld.ErrLog("邮件定制物品转化失败!itemID, itemCnt, isBind" % (itemID, itemCnt, isBind))
+                GameWorld.ErrLog("邮件定制物品转化失败!itemID, itemCnt, isAuctionItem" % (itemID, itemCnt, isAuctionItem))
                 continue
             combineItemList.append(ItemCommon.GetMailItemDict(appointItemObj))
             appointItemObj.Clear()
+        elif isAuctionItem:
+            combineItemList.append((itemID, itemCnt, isAuctionItem))
         else:
-            key = (itemID, isBind)
+            key = (itemID, isAuctionItem)
             itemCountDict[key] = itemCountDict.get(key, 0) + itemCnt
             
     for key, itemCnt in itemCountDict.items():
-        itemID, isBind = key
-        combineItemList.append((itemID, itemCnt, isBind))
-    cmdList = [title, content, getDays, playerIDList, combineItemList, gold, goldPaper, silver, detail]
+        itemID, isAuctionItem = key
+        combineItemList.append((itemID, itemCnt, isAuctionItem))
+    cmdList = [title, content, getDays, playerIDList, combineItemList, gold, goldPaper, silver, detail, moneySource]
     GameWorld.GetPlayerManager().GameServer_QueryPlayerResult(0, 0, 0, "SendMail", '%s' % (cmdList), len(str(cmdList)))
     return True
 
@@ -5756,7 +5759,6 @@
 # 通知GsmeServer; 
 # SendGameServerRefreshState(int inputType, int inputValue)
 
-# SetExAttr15 ~ 18 对应神兵类型等级,场景特效用
 
 # 禁言 通知gameServer
 def SetGMForbidenTalk(curPlayer, value):
@@ -5828,6 +5830,12 @@
         GameWorld.DebugLog("更新玩家所属服务器组ID: serverGroupID=%s" % serverGroupID)
     return
 
+##影响外观的3部位索引记录 123456789  123:武器格子索引 456:副手  789:衣服
+def GetFaceEquipIndexList(curPlayer):
+    attr15 = curPlayer.GetExAttr15()
+    return [attr15%1000, attr15/1000%1000, attr15/1000000]
+def SetFaceEquipIndex(curPlayer, value): return curPlayer.SetExAttr15(value)
+
 ##获得玩家威望值
 def GetPrestige(curPlayer): return 0
 def SetPrestige(curPlayer, value): return

--
Gitblit v1.8.0