From b97d551fbbed4d6b94896bc6ba77c28209366d2b Mon Sep 17 00:00:00 2001
From: xdh <xiefantasy@qq.com>
Date: 星期四, 16 八月 2018 10:38:08 +0800
Subject: [PATCH] fix:修复首充试用时间异常问题

---
 ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChPyNetSendPack.py                                |   16 ++++++++--------
 ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/FBProcess/GameLogic_MagicWeapon.py |    2 +-
 ServerPython/CoreServerGroup/GameServer/Script/ChPyNetSendPack.py                                                     |   16 ++++++++--------
 ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerGoldGift.py                          |    7 +++----
 4 files changed, 20 insertions(+), 21 deletions(-)

diff --git a/ServerPython/CoreServerGroup/GameServer/Script/ChPyNetSendPack.py b/ServerPython/CoreServerGroup/GameServer/Script/ChPyNetSendPack.py
index c126dd8..2d78d0d 100644
--- a/ServerPython/CoreServerGroup/GameServer/Script/ChPyNetSendPack.py
+++ b/ServerPython/CoreServerGroup/GameServer/Script/ChPyNetSendPack.py
@@ -18740,6 +18740,7 @@
                   ("Cmd", c_ubyte),
                   ("SubCmd", c_ubyte),
                   ("FirstGoldRewardState", c_ubyte),    #首充奖励是否已领奖
+                  ("FirstGoldTry", c_ubyte),    #首充试用状态0-不可试用 1-可试用 2-已试用
                   ]
 
     def __init__(self):
@@ -18757,6 +18758,7 @@
         self.Cmd = 0xAA
         self.SubCmd = 0x02
         self.FirstGoldRewardState = 0
+        self.FirstGoldTry = 0
         return
 
     def GetLength(self):
@@ -18769,12 +18771,14 @@
         DumpString = '''// AA 02 首充信息 //tagMCFirstGoldInfo:
                                 Cmd:%s,
                                 SubCmd:%s,
-                                FirstGoldRewardState:%d
+                                FirstGoldRewardState:%d,
+                                FirstGoldTry:%d
                                 '''\
                                 %(
                                 self.Cmd,
                                 self.SubCmd,
-                                self.FirstGoldRewardState
+                                self.FirstGoldRewardState,
+                                self.FirstGoldTry
                                 )
         return DumpString
 
@@ -18792,7 +18796,6 @@
                   ("Cmd", c_ubyte),
                   ("SubCmd", c_ubyte),
                   ("FirstGoldRemainTime", c_int),    #首充提示剩余时间
-                  ("FirstGoldTry", c_ubyte),    #首充试用状态0-不可试用 1-可试用 2-已试用
                   ]
 
     def __init__(self):
@@ -18810,7 +18813,6 @@
         self.Cmd = 0xAA
         self.SubCmd = 0x08
         self.FirstGoldRemainTime = 0
-        self.FirstGoldTry = 0
         return
 
     def GetLength(self):
@@ -18823,14 +18825,12 @@
         DumpString = '''// AA 08 首充提示剩余时间 //tagMCFirstGoldTime:
                                 Cmd:%s,
                                 SubCmd:%s,
-                                FirstGoldRemainTime:%d,
-                                FirstGoldTry:%d
+                                FirstGoldRemainTime:%d
                                 '''\
                                 %(
                                 self.Cmd,
                                 self.SubCmd,
-                                self.FirstGoldRemainTime,
-                                self.FirstGoldTry
+                                self.FirstGoldRemainTime
                                 )
         return DumpString
 
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChPyNetSendPack.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChPyNetSendPack.py
index c126dd8..2d78d0d 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChPyNetSendPack.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChPyNetSendPack.py
@@ -18740,6 +18740,7 @@
                   ("Cmd", c_ubyte),
                   ("SubCmd", c_ubyte),
                   ("FirstGoldRewardState", c_ubyte),    #首充奖励是否已领奖
+                  ("FirstGoldTry", c_ubyte),    #首充试用状态0-不可试用 1-可试用 2-已试用
                   ]
 
     def __init__(self):
@@ -18757,6 +18758,7 @@
         self.Cmd = 0xAA
         self.SubCmd = 0x02
         self.FirstGoldRewardState = 0
+        self.FirstGoldTry = 0
         return
 
     def GetLength(self):
@@ -18769,12 +18771,14 @@
         DumpString = '''// AA 02 首充信息 //tagMCFirstGoldInfo:
                                 Cmd:%s,
                                 SubCmd:%s,
-                                FirstGoldRewardState:%d
+                                FirstGoldRewardState:%d,
+                                FirstGoldTry:%d
                                 '''\
                                 %(
                                 self.Cmd,
                                 self.SubCmd,
-                                self.FirstGoldRewardState
+                                self.FirstGoldRewardState,
+                                self.FirstGoldTry
                                 )
         return DumpString
 
@@ -18792,7 +18796,6 @@
                   ("Cmd", c_ubyte),
                   ("SubCmd", c_ubyte),
                   ("FirstGoldRemainTime", c_int),    #首充提示剩余时间
-                  ("FirstGoldTry", c_ubyte),    #首充试用状态0-不可试用 1-可试用 2-已试用
                   ]
 
     def __init__(self):
@@ -18810,7 +18813,6 @@
         self.Cmd = 0xAA
         self.SubCmd = 0x08
         self.FirstGoldRemainTime = 0
-        self.FirstGoldTry = 0
         return
 
     def GetLength(self):
@@ -18823,14 +18825,12 @@
         DumpString = '''// AA 08 首充提示剩余时间 //tagMCFirstGoldTime:
                                 Cmd:%s,
                                 SubCmd:%s,
-                                FirstGoldRemainTime:%d,
-                                FirstGoldTry:%d
+                                FirstGoldRemainTime:%d
                                 '''\
                                 %(
                                 self.Cmd,
                                 self.SubCmd,
-                                self.FirstGoldRemainTime,
-                                self.FirstGoldTry
+                                self.FirstGoldRemainTime
                                 )
         return DumpString
 
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/FBProcess/GameLogic_MagicWeapon.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/FBProcess/GameLogic_MagicWeapon.py
index ccfca2f..59657d2 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/FBProcess/GameLogic_MagicWeapon.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/FBProcess/GameLogic_MagicWeapon.py
@@ -510,7 +510,7 @@
             #副本指定线路失败了,进入首充试用引导
             if not curPlayer.GetChangeCoinPointTotal() and not curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_FirstGoldTry):
                 PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_FirstGoldTry, 1)
-                PlayerGoldGift.Sync_FirstGoldTime(curPlayer)
+                PlayerGoldGift.Sync_FirstGoldInfo(curPlayer)
         else:
             PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_FirstGoldTry, 0)
     return
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerGoldGift.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerGoldGift.py
index de50965..d4e615e 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerGoldGift.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerGoldGift.py
@@ -270,13 +270,11 @@
 def Sync_FirstGoldTime(curPlayer):
     ##通知首充提示剩余时间
     showSysTime = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_FirstGoldRemainTime)
-    firstGoldTry = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_FirstGoldTry)
-    if not showSysTime and not firstGoldTry:
+    if not showSysTime:
         return
     sendPack = ChPyNetSendPack.tagMCFirstGoldTime()
     sendPack.Clear()
     sendPack.FirstGoldRemainTime = showSysTime
-    sendPack.FirstGoldTry = firstGoldTry
     NetPackCommon.SendFakePack(curPlayer, sendPack)
     return
 
@@ -652,6 +650,7 @@
     sendPack = ChPyNetSendPack.tagMCFirstGoldInfo()
     sendPack.Clear()
     sendPack.FirstGoldRewardState = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_GoldGiftFirstRecord)
+    sendPack.FirstGoldTry = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_FirstGoldTry)
     NetPackCommon.SendFakePack(curPlayer, sendPack)
     return
 
@@ -747,7 +746,7 @@
     else:
         curItem.clear()
         GameWorld.Log('    试用首充武器 试穿失败!!tryItemID=%s'%tryItemID, curPlayer.GetID())
-    Sync_FirstGoldTime(curPlayer)
+    Sync_FirstGoldInfo(curPlayer)
     return
 
 def FirstGoldTryItemOutTime(curPlayer):

--
Gitblit v1.8.0