From 04c549330ad3003c9c285b01e06ca8b600f02116 Mon Sep 17 00:00:00 2001
From: xdh <xiefantasy@qq.com>
Date: 星期五, 05 七月 2019 23:21:11 +0800
Subject: [PATCH] 7788 投资广播修改
---
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerGoldInvest.py | 22 +++++++++++++++++++---
1 files changed, 19 insertions(+), 3 deletions(-)
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerGoldInvest.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerGoldInvest.py
index 34dc045..0fbd2e6 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerGoldInvest.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerGoldInvest.py
@@ -30,6 +30,7 @@
import PlayerFamilyRedPacket
import time
+import re
## 获取投资理财玩家数据库字典信息值
@@ -299,9 +300,9 @@
elif investType in ChConfig.InvestGoldTypeList:
PlayerControl.WorldNotify(0, 'JadeInvestmentRadio', [curPlayer.GetName(), investGold])
elif investType == ChConfig.GoldInvestType_NewMonth:
- PlayerControl.WorldNotify(0, 'MonthInvestment', [curPlayer.GetName()])
+ PlayerControl.WorldNotify(0, 'MonthInvestment', [curPlayer.GetName(), __GetTotalGetGold(investType)])
elif investType == ChConfig.GoldInvestType_Month1:
- PlayerControl.WorldNotify(0, 'WeekInPInvestment', [curPlayer.GetName()])
+ PlayerControl.WorldNotify(0, 'WeekInPInvestment', [curPlayer.GetName(), __GetTotalGetGold(investType)])
# 更新投资时时间,投资金额,重置回报记录
curTime = GameWorld.GetCurrentTime()
@@ -326,7 +327,22 @@
GameWorld.DebugLog(" 投资成功!扣除钻石=%s" % deductGold)
return
-
+def __GetTotalGetGold(investType):
+ investMaxDayDict = IpyGameDataPY.GetFuncEvalCfg('InvestMaxDay')
+ newMaxDay = investMaxDayDict.get(str(investType), 0)
+ newTotalGold = 0
+ for day in xrange(1, newMaxDay+1):
+ ipyData = IpyGameDataPY.GetIpyGameData('Invest', investType*100+day)
+ if not ipyData:
+ continue
+ rewardDict = ipyData.GetReward()
+ awardData = 1 #__GetPDictValue(curPlayer, ChConfig.Def_PDict_GoldInvest_AwardData % newInvestType, 1)
+ if str(awardData) not in rewardDict:
+ continue
+ rewardList = rewardDict[str(awardData)]
+ gold = rewardList[0][1]
+ newTotalGold+=gold
+ return newTotalGold
#// A5 41 领取投资理财回报 #tagCMGetInvestReward
#
--
Gitblit v1.8.0