From 4a6eb7cd7e2ce7c978b468b59fc0b7ccf17189d4 Mon Sep 17 00:00:00 2001
From: hxp <ale99527@vip.qq.com>
Date: 星期六, 10 十一月 2018 14:38:39 +0800
Subject: [PATCH] 4695 【后端】【1.2】新增首充赠送仙玉(老号上线重置已重置次数); 4399 【后端】【1.2.0】聊天新增支持气泡框选择功能(已购买对应VIP礼包的玩家上线默认激活对应气泡框)
---
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerVip.py | 23 +++++++++++
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GM/Commands/SetVerFix.py | 48 ++++++++++++++++++++++++
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerCoin.py | 21 ++++++++++
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChConfig.py | 6 +++
4 files changed, 98 insertions(+), 0 deletions(-)
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChConfig.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChConfig.py
index d4a9ccf..be2b304 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChConfig.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChConfig.py
@@ -4465,6 +4465,12 @@
Def_ClientServerInitOK, #跨服子服启动成功6
) = range(7)
+#版本修正标记, 使用key格式 Def_Player_Dict_VersionFix
+(
+Def_VerFix_ChatBubbleBox, # 1.2版本购买VIP礼包可获得激活气泡框道具,针对已购买过VIP礼包的老号处理;
+Def_VerFix_CTGDoublePrize, # 1.2版本开放首充双倍,重置老号充值ID对应累计充值次数;
+) = range(2)
+
##==================================================================================================
#游戏消费点类型定义
Def_CostType_List = (
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GM/Commands/SetVerFix.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GM/Commands/SetVerFix.py
new file mode 100644
index 0000000..1679ec7
--- /dev/null
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GM/Commands/SetVerFix.py
@@ -0,0 +1,48 @@
+#!/usr/bin/python
+# -*- coding: GBK -*-
+#-------------------------------------------------------------------------------
+#
+##@package GM.Commands.SetVerFix
+#
+# @todo:设置版本修复状态
+# @author hxp
+# @date 2018-11-10
+# @version 1.0
+#
+# 详细描述: 设置版本修复状态
+#
+#-------------------------------------------------------------------------------
+#"""Version = 2018-11-10 15:00"""
+#-------------------------------------------------------------------------------
+
+import PlayerControl
+import GameWorld
+import ChConfig
+
+
+## 逻辑实现
+# @param curPlayer
+# @param cmdList 参数列表
+# @return None
+def OnExec(curPlayer, cmdList):
+
+ if not cmdList:
+ GameWorld.DebugAnswer(curPlayer, "重置所有版本修复状态: SetVerFix 0")
+ GameWorld.DebugAnswer(curPlayer, "设置某个版本修复状态: SetVerFix 修复索引 状态")
+ return
+
+ if len(cmdList) == 1 and cmdList[0] == 0:
+ for i in xrange(5):
+ PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_Player_Dict_VersionFix % i, 0)
+ GameWorld.DebugAnswer(curPlayer, "重置版本修复成功!")
+ return
+
+ if len(cmdList) == 2:
+ fixIndex, value = cmdList
+ state = 1 if value else 0
+ GameWorld.SetDictValueByBit(curPlayer, ChConfig.Def_Player_Dict_VersionFix, fixIndex, state)
+ GameWorld.DebugAnswer(curPlayer, "设置版本修复状态: fixIndex=%s,state=%s" % (fixIndex, state))
+ return
+
+ return
+
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerCoin.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerCoin.py
index d193fba..6a6a226 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerCoin.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerCoin.py
@@ -56,6 +56,27 @@
def GetCoinRate(): return IpyGameDataPY.GetFuncCfg("PayRMB")
def OnLogin(curPlayer):
+
+ # 重置充值次数
+ if not GameWorld.GetDictValueByBit(curPlayer, ChConfig.Def_Player_Dict_VersionFix, ChConfig.Def_VerFix_CTGDoublePrize):
+ GameWorld.SetDictValueByBit(curPlayer, ChConfig.Def_Player_Dict_VersionFix, ChConfig.Def_VerFix_CTGDoublePrize, 1)
+ ipyDataMgr = IpyGameDataPY.IPY_Data()
+ for i in xrange(ipyDataMgr.GetCTGCount()):
+ ipyData = ipyDataMgr.GetCTGByIndex(i)
+ recordID = ipyData.GetRecordID()
+ totalBuyCount = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_CTGGoodsBuyCount % recordID)
+ todayBuyCount = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_TodayCTGCount % recordID)
+ if not totalBuyCount and not todayBuyCount:
+ continue
+ PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_CTGGoodsBuyCount % recordID, 0)
+ PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_TodayCTGCount % recordID, 0)
+ drDict = {"PlayerID":curPlayer.GetPlayerID(),"AccID":curPlayer.GetAccID(), "totalBuyCount":totalBuyCount, "todayBuyCount":todayBuyCount, "recordID":recordID}
+ DataRecordPack.SendEventPack("ResetCTGCount", drDict, curPlayer)
+ GameWorld.Log("重置充值次数: recordID=%s,totalBuyCount=%s,todayBuyCount=%s"
+ % (recordID, totalBuyCount, todayBuyCount), curPlayer.GetPlayerID())
+ else:
+ GameWorld.DebugLog("已经重置过充值次数!")
+
Sync_CoinToGoldCountInfo(curPlayer)
return
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerVip.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerVip.py
index 8ddd788..2e764df 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerVip.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerVip.py
@@ -36,6 +36,7 @@
import PlayerFamilyRedPacket
import GameFuncComm
import PlayerTeam
+import ChPlayer
import time
#---------------------------------------------------------------------
@@ -215,6 +216,28 @@
# @return None
def DoOnLogin(curPlayer, tick):
#记录登陆时间
+
+ # VIP礼包聊天气泡框
+ if not GameWorld.GetDictValueByBit(curPlayer, ChConfig.Def_Player_Dict_VersionFix, ChConfig.Def_VerFix_ChatBubbleBox):
+ GameWorld.SetDictValueByBit(curPlayer, ChConfig.Def_Player_Dict_VersionFix, ChConfig.Def_VerFix_ChatBubbleBox, 1)
+ ipyDataMgr = IpyGameDataPY.IPY_Data()
+ for i in xrange(ipyDataMgr.GetChatBubbleBoxCount()):
+ ipyData = ipyDataMgr.GetChatBubbleBoxByIndex(i)
+ needVIPLVGift = ipyData.GetNeedVIPLVGift()
+ if not needVIPLVGift:
+ continue
+ record = curPlayer.NomalDictGetProperty(ChConfig.Def_Player_Dict_VipAwardRecord)
+ hasBuy = record & pow(2, needVIPLVGift)
+ if not hasBuy:
+ continue
+ boxID = ipyData.GetBoxID()
+ ChPlayer.DoActivateChatBubbleBox(curPlayer, boxID)
+ drDict = {"PlayerID":curPlayer.GetPlayerID(),"AccID":curPlayer.GetAccID(), "needVIPLVGift":needVIPLVGift, "BoxID":boxID}
+ DataRecordPack.SendEventPack("VIPGiftActChatBubbleBox", drDict, curPlayer)
+ GameWorld.Log("老号激活VIP礼包聊天气泡框: boxID=%s,needVIPLVGift=%s" % (boxID, needVIPLVGift), curPlayer.GetPlayerID())
+ else:
+ GameWorld.DebugLog("已经激活过老号VIP气泡框")
+
Sycn_VIPMsg(curPlayer)
Sycn_VIPAwardRecord(curPlayer)
Sycn_VIPTime(curPlayer, True)
--
Gitblit v1.8.0