From 21c4e463b7e28092ed991cae48172c95498728f5 Mon Sep 17 00:00:00 2001
From: hxp <ale99527@vip.qq.com>
Date: 星期四, 28 三月 2019 18:04:18 +0800
Subject: [PATCH] 6373 【后端】【2.0】删除无用功能代码、封包、配置(旧商城系统)

---
 /dev/null                                                                             |  549 ------------------------------------------
 ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script.ini               |   40 ---
 ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/PyNetPack.ini            |   12 
 ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChPyNetPack.py    |   60 ----
 ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/DataRecordPack.py |   18 -
 ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/NPC/NPCCommon.py  |    2 
 ServerPython/CoreServerGroup/GameServer/Script/ChPyNetPack.py                         |   60 ----
 ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChConfig.py       |    2 
 8 files changed, 0 insertions(+), 743 deletions(-)

diff --git a/ServerPython/CoreServerGroup/GameServer/Script/ChPyNetPack.py b/ServerPython/CoreServerGroup/GameServer/Script/ChPyNetPack.py
index 270a833..c6fc84e 100644
--- a/ServerPython/CoreServerGroup/GameServer/Script/ChPyNetPack.py
+++ b/ServerPython/CoreServerGroup/GameServer/Script/ChPyNetPack.py
@@ -7423,66 +7423,6 @@
 
 
 #------------------------------------------------------
-# A5 32 购买商城物品 #tagCMBuyStoreItem
-
-class  tagCMBuyStoreItem(Structure):
-    _pack_ = 1
-    _fields_ = [
-                  ("Cmd", c_ubyte),
-                  ("SubCmd", c_ubyte),
-                  ("Type", c_ubyte),    #1钻石,2绑定钻石,3银子,4银票
-                  ("ItemID", c_int),    #物品ID
-                  ("BuyCount", c_ushort),    #购买数量
-                  ]
-
-    def __init__(self):
-        self.Clear()
-        self.Cmd = 0xA5
-        self.SubCmd = 0x32
-        return
-
-    def ReadData(self, stringData, _pos=0, _len=0):
-        self.Clear()
-        memmove(addressof(self), stringData[_pos:], self.GetLength())
-        return _pos + self.GetLength()
-
-    def Clear(self):
-        self.Cmd = 0xA5
-        self.SubCmd = 0x32
-        self.Type = 0
-        self.ItemID = 0
-        self.BuyCount = 0
-        return
-
-    def GetLength(self):
-        return sizeof(tagCMBuyStoreItem)
-
-    def GetBuffer(self):
-        return string_at(addressof(self), self.GetLength())
-
-    def OutputString(self):
-        DumpString = '''// A5 32 购买商城物品 //tagCMBuyStoreItem:
-                                Cmd:%s,
-                                SubCmd:%s,
-                                Type:%d,
-                                ItemID:%d,
-                                BuyCount:%d
-                                '''\
-                                %(
-                                self.Cmd,
-                                self.SubCmd,
-                                self.Type,
-                                self.ItemID,
-                                self.BuyCount
-                                )
-        return DumpString
-
-
-m_NAtagCMBuyStoreItem=tagCMBuyStoreItem()
-ChNetPackDict[eval("0x%02x%02x"%(m_NAtagCMBuyStoreItem.Cmd,m_NAtagCMBuyStoreItem.SubCmd))] = m_NAtagCMBuyStoreItem
-
-
-#------------------------------------------------------
 #A5 01 坐骑激活 #tagPlayerActivateHorse
 
 class  tagPlayerActivateHorse(Structure):
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/PyNetPack.ini b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/PyNetPack.ini
index 34083f1..6167b17 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/PyNetPack.ini
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/PyNetPack.ini
@@ -453,18 +453,6 @@
 PacketSubCMD_1 = 0x30
 PacketCallFunc_1 = OnPlayerBuySomething
 
-;商城物品购买
-[PlayerSuperMarket]
-ScriptName = Player\PlayerSuperMarket.py
-Writer = xcc
-Releaser = xcc
-RegType = 0
-RegisterPackCount = 1
-
-PacketCMD_1 = 0xA5
-PacketSubCMD_1 = 0x32
-PacketCallFunc_1 = OnBuyStoreItem
-
 ;签到
 [PlayerSignDay]
 ScriptName = Player\PlayerSignDay.py
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script.ini b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script.ini
index c6ee2ce..ac53458 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script.ini
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script.ini
@@ -1114,18 +1114,6 @@
 PacketSubCMD_2=0x1
 PacketCallFunc_2=OnPlayerSetTruckMode
 
-;精力系统
-[PlayerEnergySys]
-ScriptName = Player\PlayerEnergySys.py
-Writer = panwei
-Releaser = panwei
-RegType = 0
-RegisterPackCount = 1
-
-PacketCMD_1=0x3
-PacketSubCMD_1=0x2C
-PacketCallFunc_1=FightAssistantSystem
-
 ;家族争霸赛
 [PlayerFamilyBattle]
 ScriptName = Player\PlayerFamilyBattle.py
@@ -1137,34 +1125,6 @@
 PacketCMD_1=0xF
 PacketSubCMD_1=0x14
 PacketCallFunc_1=EnrollFamilyVS
-
-;商城相关
-[PlayerSuperMarket]
-ScriptName = Player\PlayerSuperMarket.py
-Writer = Alee
-Releaser = Alee
-RegType = 0
-RegisterPackCount = 5
-
-PacketCMD_1=0x3
-PacketSubCMD_1=0x17
-PacketCallFunc_1=WatchStoreItem
-
-PacketCMD_2=0x3
-PacketSubCMD_2=0x18
-PacketCallFunc_2=BuyStoreItem
-
-PacketCMD_3=0x1
-PacketSubCMD_3=0xF
-PacketCallFunc_3=GetCoinReq
-
-PacketCMD_4=0x1
-PacketSubCMD_4=0x10
-PacketCallFunc_4=CoinChangeReq
-
-PacketCMD_5=0x7
-PacketSubCMD_5=0x3E
-PacketCallFunc_5=GetGuaranteeGift
 
 ;晶魄系统
 [PlayerFineSoul]
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChConfig.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChConfig.py
index 7ba1625..0643e8f 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChConfig.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChConfig.py
@@ -802,8 +802,6 @@
 Def_PlayerTotalMoney_Silver = 2000000000
 #流向记录变更最小金币值(小于该值的暂不记录, 仅限金币)
 Def_DRRecord_Min_Silver = 500000
-#大额度交易记录
-Def_LargeTrade_Gold = 50 * 1000
 Def_LargeTrade_Silver = 1000 * 1000
 #初始化装备背包格子数
 Def_PackCnt_Equip = 130
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChPyNetPack.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChPyNetPack.py
index 270a833..c6fc84e 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChPyNetPack.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChPyNetPack.py
@@ -7423,66 +7423,6 @@
 
 
 #------------------------------------------------------
-# A5 32 购买商城物品 #tagCMBuyStoreItem
-
-class  tagCMBuyStoreItem(Structure):
-    _pack_ = 1
-    _fields_ = [
-                  ("Cmd", c_ubyte),
-                  ("SubCmd", c_ubyte),
-                  ("Type", c_ubyte),    #1钻石,2绑定钻石,3银子,4银票
-                  ("ItemID", c_int),    #物品ID
-                  ("BuyCount", c_ushort),    #购买数量
-                  ]
-
-    def __init__(self):
-        self.Clear()
-        self.Cmd = 0xA5
-        self.SubCmd = 0x32
-        return
-
-    def ReadData(self, stringData, _pos=0, _len=0):
-        self.Clear()
-        memmove(addressof(self), stringData[_pos:], self.GetLength())
-        return _pos + self.GetLength()
-
-    def Clear(self):
-        self.Cmd = 0xA5
-        self.SubCmd = 0x32
-        self.Type = 0
-        self.ItemID = 0
-        self.BuyCount = 0
-        return
-
-    def GetLength(self):
-        return sizeof(tagCMBuyStoreItem)
-
-    def GetBuffer(self):
-        return string_at(addressof(self), self.GetLength())
-
-    def OutputString(self):
-        DumpString = '''// A5 32 购买商城物品 //tagCMBuyStoreItem:
-                                Cmd:%s,
-                                SubCmd:%s,
-                                Type:%d,
-                                ItemID:%d,
-                                BuyCount:%d
-                                '''\
-                                %(
-                                self.Cmd,
-                                self.SubCmd,
-                                self.Type,
-                                self.ItemID,
-                                self.BuyCount
-                                )
-        return DumpString
-
-
-m_NAtagCMBuyStoreItem=tagCMBuyStoreItem()
-ChNetPackDict[eval("0x%02x%02x"%(m_NAtagCMBuyStoreItem.Cmd,m_NAtagCMBuyStoreItem.SubCmd))] = m_NAtagCMBuyStoreItem
-
-
-#------------------------------------------------------
 #A5 01 坐骑激活 #tagPlayerActivateHorse
 
 class  tagPlayerActivateHorse(Structure):
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/DataRecordPack.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/DataRecordPack.py
index 770f6ea..3cf2797 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/DataRecordPack.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/DataRecordPack.py
@@ -430,24 +430,6 @@
     #发送封包
     SendEventPack("PlayerCoinAfterCharge", dataDict, curPlayer)
     return
-    
-    
-## 玩家商城购买物品
-#  @param curPlayer: 玩家实例
-#  @param buyItemID: 购买物品id
-#  @param buyItemCount: 购买物品数量
-#  @param buyItemGUID: GUID
-#  @return: None
-def DR_PlayerSupermarket(curPlayer, buyItemID, buyItemCount, buyItemGUID):
-
-    dataDict = {'PlayerID':curPlayer.GetPlayerID(), 'PlayerName':curPlayer.GetPlayerName(), 
-                'AccID':curPlayer.GetAccID(), 'ItemID':buyItemID, 'ItemCount':buyItemCount, 
-                'ItemGUID':buyItemGUID}
-
-    #发送封包
-    SendEventPack("PlayerSupermarket", dataDict, curPlayer)
-    return
-
 
 ## 玩家升级
 #  @param curPlayer: 玩家实例
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/NPC/NPCCommon.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/NPC/NPCCommon.py
index 15d6446..5e67837 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/NPC/NPCCommon.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/NPC/NPCCommon.py
@@ -44,11 +44,9 @@
 import PlayerActivity
 import PlayerSuccess
 import BossHurtMng
-import PlayerSuperMarket
 import GameLogic_FamilyInvade
 import GameLogic_GatherSoul
 import FormulaControl
-import PlayerMagicWeapon
 import PlayerBossReborn
 import PlayerFairyCeremony
 import PlayerNewFairyCeremony
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerSuperMarket.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerSuperMarket.py
deleted file mode 100644
index fe06c10..0000000
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerSuperMarket.py
+++ /dev/null
@@ -1,549 +0,0 @@
-#!/usr/bin/python
-# -*- coding: GBK -*-
-#-------------------------------------------------------------------------------
-#
-#-------------------------------------------------------------------------------
-#
-##@package PlayerSuperMarket
-#
-# @todo: 商城相关
-# @author Alee
-# @date 2010-12-22 18:00
-# @version 4.1
-#
-# 详细描述: 商城相关,商城封包在这边处理
-# @change: "2010-12-24 18:00" Alee 添加贴心活动功能
-# @change: "2010-12-28 17:40" Alee 添加表验证避免刷物品
-# @change: "2010-12-29 11:40" Alee 添加购买商城购买物品不花钱和不是活动贴心福袋验证
-# @change: "2010-12-29 13:50" Alee 添加领取物品个数
-# @change: "2011-01-31 17:30" Alee 商城购买家族验证,避免发包
-
-# @change: "2011-02-16 11:30" Alee 添加贴心相应系统提示
-# @change: "2011-02-21 09:30" Alee 修改商城购买背包不足的提示
-# @change: "2011-02-22 11:30" panwei 拔除台湾大陆相关版本切换代码
-# @change: "2011-04-07 14:30" panwei Psyco优化
-# @change: "2011-04-27 11:00" Alee 玩家数据流向记录
-
-# @change: "2011-05-03 14:20" chenxuewei 系统提示少传了一个参数
-# @change: "2011-05-06 15:20" Alee 玩家保证点超过100给提示
-# @change: "2011-06-17 11:00" Alee 保证点增减流向记录
-# @change: "2011-08-02 18:00" panwei 添加玩家家族活跃度新增来源
-# @change: "2011-09-20 22:30" Alee 流向中不可用换行符号
-# @change: "2011-11-23 14:00" jiang 商城购物添加家族活跃度系统提示
-# @change: "2012-01-16 17:30" chengaobao 将物品去除绑定
-# @change: "2012-01-21 12:30" chengaobao 将设置绑定的接口封装至ItemControler中
-# @change: "2012-03-24 19:30" wdb 点券兑换元宝修改
-# @change: "2012-04-12 16:30" jiang 去除元宝消费增加活跃度改至付款成功以后统一操作
-# @change: "2012-06-26 18:00" jiang 补齐oss记录
-# @change: "2012-06-27 15:30" whx 增加setCount错误oss记录
-# @change: "2012-08-10 15:00" zhangxi 修改OSS记录
-# @change: "2013-12-09 11:30" hxp 系统提示
-# @change: "2014-01-08 13:20" hxp 增加商城购物钻石计费点事件同步,在PayMoney内层处理
-# @change: "2014-05-06 16:40" xcc 增加商城物品购买
-# @change: "2014-08-06 14:00" hxp 增加购买商城物品时可配置全服广播购买信息
-# @change: "2014-10-17 14:20" Alee 查询点券必须在进入地图之后避免逻辑顺序错误
-# @change: "2014-12-17 12:10" ljd 增加VIP商城VIP等级限制
-# @change: "2016-07-20 14:30" hxp 消费点流向整理
-# @change: "2016-10-08 16:30" hxp 修改商城物品价格获取方式,方便其他功能获取价格
-#---------------------------------------------------------------------
-#"""Version = 2016-10-08 16:30"""
-#---------------------------------------------------------------------
-#导入
-import GameWorld
-import IPY_GameWorld
-import ChConfig
-import PlayerControl
-import ItemControler
-import ItemCommon
-import QuestCommon
-import ShareDefine
-import ReadChConfig
-import PlayerActivity
-import DataRecordPack
-  
-#===============================================================================
-# 
-# //03 17 查看商城物品
-# struct    tagCWatchStoreItem
-# {
-#    BYTE        AreaIndex;   区域(1:金子 2:银子)
-#    BYTE        MenuIndex;    菜单
-#    BYTE        TypeIndex;    分类Index(>0)
-#    BYTE        PageIndex;    页面
-# };
-#===============================================================================
-##客户端封包响应 //03 17 查看商城物品
-#@param index 玩家索引
-#@param tick 时间戳
-#@return 返回值无意义
-#@remarks 客户端封包响应 //03 17 查看商城物品
-def WatchStoreItem(index, tick):
-    curPlayer = GameWorld.GetPlayerManager().GetPlayerByIndex(index)
-    
-    if tick - curPlayer.GetTickByType(ChConfig.TYPE_Player_Tick_WatchStoreInfo) \
-            <= ChConfig.TYPE_Player_Tick_Time[ChConfig.TYPE_Player_Tick_WatchStoreInfo]:
-        #查看商城限制间隔0.5秒,不给提示,避免攻击服务器
-        return
-    
-    curPlayer.SetTickByType(ChConfig.TYPE_Player_Tick_WatchStoreInfo, tick)
-    
-    #获得查看商城封包
-    sendPack = IPY_GameWorld.IPY_CWatchStoreItem()
-    areaIndex = sendPack.GetAreaIndex()            # 区域
-    menuIndex = sendPack.GetMenuIndex()            # 菜单
-    typeIndex = sendPack.GetTypeIndex()            # 分类索引
-    pageIndex = sendPack.GetPageIndex()            # 页面
-#    GameWorld.Log('商城:%s,%s,%s,%s'%(areaIndex, menuIndex, typeIndex, pageIndex))
-    #回包给客户端
-    curPlayer.Sync_StoreItem(areaIndex, menuIndex, typeIndex, pageIndex)
-    
-#===============================================================================
-# 03 18 购买商城物品
-# 
-# struct  tagCBuyStoreItem
-# {
-#    BYTE        AreaIndex;   区域(1:金子 2:银子)
-#    BYTE        MenuIndex;    菜单
-#    BYTE        TypeIndex;    分类Index(>0)
-#    BYTE        PageIndex;    页面
-#    BYTE        ItemInPage;   这个物品在哪一页
-#    WORD        Count;        数量
-# }
-#===============================================================================
-##客户端封包响应 03 18 购买商城物品
-#@param index 玩家索引
-#@param tick 时间戳
-#@return 返回值无意义
-#@remarks 客户端封包响应 03 18 购买商城物品
-def BuyStoreItem(index, tick):
-    #GameWorld.GetPsycoFunc(__Func_BuyStoreItem)(index, tick)
-    return
-
-##客户端封包响应 03 18 购买商城物品
-#@param index 玩家索引
-#@param tick 时间戳
-#@return 返回值无意义
-#@remarks 客户端封包响应 03 18 购买商城物品
-def __Func_BuyStoreItem(index, tick):
-    curPlayer = GameWorld.GetPlayerManager().GetPlayerByIndex(index)
-    
-#    #交易等事件中无法使用
-#    if not FunctionNPCCommon.CheckPlayerCanStateEvent(curPlayer):
-#        return
-#    if ItemControler.GetItemPackSpace(curPlayer, IPY_GameWorld.rptItem) < 1:
-#        #Task_WinLost_RoomLack02 您的背包空间不足,请整理背包后再来
-#        PlayerControl.NotifyCode(curPlayer , "Task_WinLost_RoomLack02")
-#        return
-
-    #交易等事件中无法使用
-    if curPlayer.GetPlayerAction() not in  ChConfig.Def_PlayerState_Store:
-        #GeRen_admin_306641 对不起,您当前状态无法进行此操作,操作无效
-        PlayerControl.NotifyCode(curPlayer, "GeRen_admin_306641")
-        return
-    
-    sendPack = IPY_GameWorld.IPY_CBuyStoreItem()
-    areaIndex = sendPack.GetAreaIndex()            # 区域
-    menuIndex = sendPack.GetMenuIndex()            # 菜单
-    typeIndex = sendPack.GetTypeIndex()            # 分类索引
-    pageIndex = sendPack.GetPageIndex()            # 页面
-    itemInPage = sendPack.GetItemInPage()          # 物品本页面索引
-    itemCount = sendPack.GetCount()                # 购买数量
-    
-    #商城表数据
-    buyStoreItem = GameWorld.GetGameData().FindDBStoreItem(areaIndex, menuIndex, 
-                                                           typeIndex, pageIndex, itemInPage)
-    if not buyStoreItem:
-        GameWorld.ErrLog("没有数据购买物品失败,区域 %s 菜单 %s 分类 %s 页面 %s 页数 %s 数量 %s"%(
-                areaIndex, menuIndex, typeIndex, pageIndex, itemInPage, itemCount),
-                curPlayer.GetID())
-        return
-    
-    isBind = False
-    storeItemPrice = 0    # 销售总额
-    priceType = 0         # 货币类型
-    
-    #元宝,礼券使用记录
-    useGold = 0
-    useGoldPaper = 0
-    
-    costGold = buyStoreItem.GetGold()     # 单价元宝
-    costGoldPaper = buyStoreItem.GetGoldPaper()    # 单价礼券
-    itemIDByBuy = buyStoreItem.GetItemID()
-    
-    #判断支付类型和金额
-    if costGold > 0:
-        storeItemPrice = costGold*itemCount
-        priceType = IPY_GameWorld.TYPE_Price_Gold_Money
-        useGold = storeItemPrice
-
-    #礼券
-    elif costGoldPaper > 0:
-        storeItemPrice = costGoldPaper*itemCount
-        priceType = IPY_GameWorld.TYPE_Price_Gold_Paper
-        useGoldPaper = storeItemPrice
-    
-    else:
-        GameWorld.ErrLog("商城免费物品 %s"%itemIDByBuy)
-        return
-
-#    #银子
-#    elif buyStoreItem.GetSilver():
-#        storeItemPrice = buyStoreItem.GetSilver()*itemCount
-#        priceType = IPY_GameWorld.TYPE_Price_Silver_Money
-#
-#    #银票
-#    elif buyStoreItem.GetSilverPaper():
-#        storeItemPrice = buyStoreItem.GetSilverPaper()*itemCount
-#        priceType = IPY_GameWorld.TYPE_Price_Silver_Paper
-
-    if storeItemPrice == 0 or priceType == 0:
-        GameWorld.ErrLog('商城购买物品异常, 元宝和礼券无法购买 = %s'%(itemIDByBuy))
-        return
-    
-    #记录购买时间
-    timeStr = GameWorld.GetCurrentDataTimeStr()
-    
-    #判断有没钱,再创建物品
-    if not PlayerControl.HaveMoney(curPlayer, priceType, storeItemPrice):
-        #金钱不足的记录
-        curPlayer.Sync_StoreItemRecord(timeStr, itemIDByBuy, 0, 0, 0, 'GoldShop_Shoping_MoneyLost')
-        return
-       
-    if priceType == IPY_GameWorld.TYPE_Price_Gold_Paper:
-        isBind = True
-        
-    itemControler = ItemControler.PlayerItemControler(curPlayer)
-    
-    #是否可以放入背包
-    if itemControler.CanPutInItem(IPY_GameWorld.rptItem, itemIDByBuy, itemCount, isBind) != True:
-        PlayerControl.NotifyCode(curPlayer, "GeRen_lhs_202580")
-        #背包不足的记录
-        curPlayer.Sync_StoreItemRecord(timeStr, itemIDByBuy, 0, 0, 0, 'GoldShop_Shoping_BagLost')
-        return
-        
-    #生成物品
-    curItemTag = ItemCommon.CreateSingleItem(itemIDByBuy)
-    
-    if not curItemTag:
-        GameWorld.ErrLog('商城创建物品异常:%s'%(itemIDByBuy))
-        return
-    
-    infoDict = {"ItemID":itemIDByBuy, "ItemCount":itemCount, ChConfig.Def_Cost_Reason_SonKey:itemIDByBuy}
-    if not PlayerControl.PayMoney(curPlayer, priceType, storeItemPrice, ChConfig.Def_Cost_BuyStoreItem, infoDict, itemCount):
-        return
-    
-    #添加家族活跃度
-    addFamilyValue = SMShoppingByGoldAddFamilyVale(curPlayer, priceType, storeItemPrice)
-    
-    ItemControler.SetItemCount(curItemTag, itemCount, 
-                               curPlayer.GetPlayerID(), curPlayer.GetAccID(), curPlayer.GetPlayerName())
-            
-#    GameWorld.Log('绑定:%s 付费类型(金子1银子3):%s  金额:%s'%(
-#    curItemTag.GetIsBind(), priceType, storeItemPrice))
-    
-    PlayerControl.NotifyCode(curPlayer, "ObtainRes01", [itemIDByBuy, itemCount])
-    
-    # 记录玩家商城购买物品
-    DataRecordPack.DR_PlayerSupermarket(curPlayer, itemIDByBuy, itemCount, curItemTag.GetGUID())
-    #新加详细记录
-    curPlayer.Interface_GoldRec(itemIDByBuy, itemCount, curItemTag.GetName(), useGold, useGoldPaper)
-    
-    #放入背包
-    itemControler.PutInItem(IPY_GameWorld.rptItem, curItemTag)
-
-    #商城交易记录
-    NoteLargeTrade(curPlayer, priceType, storeItemPrice, itemIDByBuy, itemCount)
-    
-    #购买成功的记录
-    curPlayer.Sync_StoreItemRecord(timeStr, itemIDByBuy, itemCount, priceType, 
-                                   storeItemPrice, 'GoldShop_Shoping_Success')
-    return
-
-def GetStoreItemInfo(itemID):
-    storeItemDict = ReadChConfig.GetEvalChConfig("StoreItem")
-    if itemID not in storeItemDict:
-        GameWorld.ErrLog("未配置商城物品价格信息, itemID=%s" % itemID)
-        return
-    return storeItemDict[itemID]
-
-def GetStoreItemPrice(itemID, priceType):
-    ''' 获取商城物品对应价格 '''
-    
-    itemPriceInfo = GetStoreItemInfo(itemID)
-    if not itemPriceInfo:
-        return 0
-    
-    priceKeyDict = {
-                    IPY_GameWorld.TYPE_Price_Gold_Money:"Gold",
-                    IPY_GameWorld.TYPE_Price_Gold_Paper:"GoldPaper",
-                    IPY_GameWorld.TYPE_Price_Silver_Money:"Silver",
-                    IPY_GameWorld.TYPE_Price_Silver_Paper:"SilverPaper",
-                    }
-    
-    if priceType not in priceKeyDict:
-        GameWorld.ErrLog("未配置商城物品价格信息, itemID=%s,货币类型=%s" % (itemID, priceType))
-        return 0
-    
-    keyName = priceKeyDict[priceType]
-    price = itemPriceInfo.get(keyName, 0)
-    if price in [0, -1]:
-        return 0
-    
-    return price
-
-##客户端封包响应A5 32 购买商城物品 #tagCMBuyStoreItem
-#@param index 玩家索引
-#@param tick 时间戳
-#@return 返回值无意义
-#@remarks 客户端封包响应 03 18 购买商城物品
-def OnBuyStoreItem(index, clientData, tick):
-#    GameWorld.Log("OnBuyStoreItem")
-    curPlayer = GameWorld.GetPlayerManager().GetPlayerByIndex(index)
-    #交易等事件中无法使用
-    if curPlayer.GetPlayerAction() not in  ChConfig.Def_PlayerState_Store:
-        #GeRen_admin_306641 对不起,您当前状态无法进行此操作,操作无效
-        PlayerControl.NotifyCode(curPlayer, "GeRen_admin_306641")
-        return
-    
-    priceType = clientData.Type  #购买的类型,1金子,2金票,3银子,4银票
-    itemID = clientData.ItemID #购买的物品ID
-    buyCnt = clientData.BuyCount #购买的物品数量
-#    GameWorld.Log("buyType=%s itemID=%s buyCnt=%s"%(buyType, itemID, buyCnt))
-    
-    storeItemInfo = GetStoreItemInfo(itemID)
-    #没有找到这个物品ID
-    if None == storeItemInfo:
-#        GameWorld.Log("#没有找到这个物品ID")
-        return
-    vipLVLimit = storeItemInfo.get("VIPLVLimit")
-    if vipLVLimit and curPlayer.GetVIPLv() < vipLVLimit:
-        PlayerControl.NotifyCode(curPlayer, "GeRen_liubo_360882", [vipLVLimit])
-        return
-    
-    itemCost = GetStoreItemPrice(itemID, priceType)
-    #该物品没有的价格信息,0和-1我们都当做没有价格信息
-    if itemCost in [0, -1]:
-#        GameWorld.Log("#该物品没有的价格信息,0和-1我们都当做没有价格信息")
-        return
-    
-    #共需要支付多少钱
-    storeItemPrice = itemCost * buyCnt
-    if storeItemPrice <= 0:
-#        GameWorld.Log("#storeItemPrice <= 0")
-        return
-    
-    #元宝,礼券使用记录
-    useGold = 0
-    useGoldPaper = 0
-    if priceType == IPY_GameWorld.TYPE_Price_Gold_Money:
-        useGold = storeItemPrice
-    elif priceType == IPY_GameWorld.TYPE_Price_Gold_Paper:
-        useGoldPaper = storeItemPrice
-    
-    #记录购买时间
-    timeStr = GameWorld.GetCurrentDataTimeStr()
-    #判断有没钱,再创建物品
-    if not PlayerControl.HaveMoney(curPlayer, priceType, storeItemPrice):
-        #金钱不足的记录
-        curPlayer.Sync_StoreItemRecord(timeStr, itemID, 0, 0, 0, 'GoldShop_Shoping_MoneyLost')
-        return
-    isBind = False
-    if priceType == IPY_GameWorld.TYPE_Price_Gold_Paper:
-        isBind = True
-        
-    itemControler = ItemControler.PlayerItemControler(curPlayer)
-    
-    #是否可以放入背包
-    if itemControler.CanPutInItem(IPY_GameWorld.rptItem, itemID, buyCnt, isBind) != True:
-        PlayerControl.NotifyCode(curPlayer, "GeRen_lhs_202580")
-        #背包不足的记录
-        curPlayer.Sync_StoreItemRecord(timeStr, itemID, 0, 0, 0, 'GoldShop_Shoping_BagLost')
-        return
-        
-    #生成物品
-    curItemTag = ItemCommon.CreateSingleItem(itemID)
-    
-    if not curItemTag:
-        GameWorld.ErrLog('商城创建物品异常:%s'%(itemID))
-        return
-    
-    infoDict = {"ItemID":itemID, "ItemCount":buyCnt, ChConfig.Def_Cost_Reason_SonKey:itemID}
-    if not PlayerControl.PayMoney(curPlayer, priceType, storeItemPrice, ChConfig.Def_Cost_BuyStoreItem, infoDict, buyCnt):
-        return
-    
-    #添加家族活跃度
-    addFamilyValue = SMShoppingByGoldAddFamilyVale(curPlayer, priceType, storeItemPrice)
-    
-#    if useGold:
-#        PlayerActivity.AddActivityFinishCnt(curPlayer, ShareDefine.ActivityNum_SuperMarketGold)
-    
-    ItemControler.SetItemCount(curItemTag, buyCnt, curPlayer.GetPlayerID(), curPlayer.GetAccID(), curPlayer.GetPlayerName())
-    itemName = curItemTag.GetName()
-    GUID = curItemTag.GetGUID()
-    
-    if not ItemControler.DoLogic_PutItemInPack(curPlayer, curItemTag):
-        GameWorld.ErrLog("购买商城物品放入背包异常: itemID=%s,buyCnt=%s,GUID=%s" % (itemID, buyCnt, GUID))
-        return
-    
-    # 全服广播
-    if priceType == IPY_GameWorld.TYPE_Price_Gold_Money:
-        playerName = curPlayer.GetPlayerName()
-        shopItemBuyNotify = eval(ReadChConfig.GetChConfig('ShopItemBuyNotify'))
-        if itemID in shopItemBuyNotify:
-            notifyMark, paramList = shopItemBuyNotify[itemID]
-            PlayerControl.WorldNotify(0, notifyMark, paramList)
-    
-    # 记录玩家商城购买物品
-    DataRecordPack.DR_PlayerSupermarket(curPlayer, itemID, buyCnt, GUID)
-    #新加详细记录
-    curPlayer.Interface_GoldRec(itemID, buyCnt, itemName, useGold, useGoldPaper)
-
-    #商城交易记录
-    NoteLargeTrade(curPlayer, priceType, storeItemPrice, itemID, buyCnt)
-    
-    #购买成功的记录
-    curPlayer.Sync_StoreItemRecord(timeStr, itemID, buyCnt, priceType, 
-                                   storeItemPrice, 'GoldShop_Shoping_Success')
-    return
-   
-#---------------------------------------------------------------------
-##商城交易记录
-#@param curPlayer 玩家实例
-#@param priceType 金钱类型
-#@param storeItemPrice 金额
-#@param itemIDByBuy 物品ID
-#@param itemCount  数量
-#@return 返回值无意义
-#@remarks 自定义函数, 商城交易记录
-def NoteLargeTrade(curPlayer, priceType, storeItemPrice, itemIDByBuy, itemCount):
-    playerID = curPlayer.GetPlayerID()
-    haveGold = curPlayer.GetGold()
-    haveSilver = PlayerControl.GetSilver(curPlayer)
-    
-    #商城金子购物
-    if priceType == IPY_GameWorld.TYPE_Price_Gold_Money:
-        
-        #不超过金子50两不记录
-        if storeItemPrice < ChConfig.Def_LargeTrade_Gold:
-            return
-        GameWorld.NoteDownLargeTrade(
-                                     tradeGold = storeItemPrice, 
-                                     tradeItemID = itemIDByBuy, 
-                                     tradeItemCount = itemCount, 
-                                     receiverID = playerID, 
-                                     receiverGold = haveGold, 
-                                     receiverSilver = haveSilver
-                                     )
-    
-#    #商城银子购物
-#    elif priceType == IPY_GameWorld.TYPE_Price_Silver_Money:
-#        
-#        #不超过银子1000两不记录
-#        if storeItemPrice < ChConfig.Def_LargeTrade_Silver:
-#            return 
-#
-#        GameWorld.NoteDownLargeTrade(tradeSilver = storeItemPrice, 
-#                           tradeItemID = itemIDByBuy, tradeItemCount = itemCount, 
-#                           receiverID = playerID, receiverGold = haveGold, receiverSilver = haveSilver)
-
-
-##商城购物添加家族活跃度
-#@param curPlayer 玩家实例
-#@param priceType 货币类型
-#@param priceValue 货币值
-#@return 家族活跃度增加值
-#@remarks 商城购物添加家族活跃度
-def SMShoppingByGoldAddFamilyVale(curPlayer, priceType, priceValue):
-    #20102-04-12 jiang 移至付款以后添加
-    return 0
-
-#    addFamilyValue = 0  # 家族活跃度增加值
-#    
-#    if curPlayer.GetFamilyID() == 0:
-#        #无家族不考虑
-#        return addFamilyValue
-#    
-#    #只有元宝购买才添加家族活跃度
-#    if priceType != IPY_GameWorld.TYPE_Price_Gold_Money:
-#        return addFamilyValue
-#    
-#    addFamilyValue = int(eval(ReadChConfig.GetChConfig('SM_FamilyActiveValue')))
-#        
-#    #添加家族活跃度
-#    PlayerFamily.AddPlayerFamilyActiveValue(curPlayer, addFamilyValue, True, PlayerFamily.Def_AddFAVReason_GoldShop)
-#    PlayerControl.NotifyCode(curPlayer, "GeRen_admin_425673", [addFamilyValue])
-#    
-#    return addFamilyValue
-    
-    
-#---------------------------------------------------------------------
-#===============================================================================
-# //01 0F 取得点券数目#tagCGetCoin
-# tagCGetCoin       *   GettagCGetCoin();
-# 
-# class   IPY_CGetCoin
-# {
-# public:
-#    //无意义
-#    int      GetType();
-# };
-#===============================================================================
-##客户端封包响应 //01 0F 取得点券数目#tagCGetCoin
-#@param index 玩家索引
-#@param tick 时间戳
-#@return 返回值无意义
-#@remarks 客户端封包响应 //01 0F 取得点券数目#tagCGetCoin
-def GetCoinReq(index, tick):
-    #===========================================================================
-    # curPlayer = GameWorld.GetPlayerManager().GetPlayerByIndex(index)
-    # 
-    # if tick - curPlayer.GetTickByType(ChConfig.TYPE_Player_Tick_QueryCoinCount) \
-    #        <= ChConfig.TYPE_Player_Tick_Time[ChConfig.TYPE_Player_Tick_QueryCoinCount]:
-    #    #查询玩家点券数目30秒一次
-    #    return
-    # 
-    # if not curPlayer.GetMapLoadOK():
-    #    return
-    # 
-    # curPlayer.SetTickByType(ChConfig.TYPE_Player_Tick_QueryCoinCount, tick)
-    # #查询当前玩家点券数目
-    # curPlayer.DataServer_GetCoinReq()
-    #===========================================================================
-    return
-#---------------------------------------------------------------------
-#===============================================================================
-# //01 10 兑换点券#tagCCoinChange
-# tagCCoinChange       *   GettagCCoinChange();
-# 
-# class   IPY_CCoinChange
-# {
-# public:
-# 
-#    int      GetCoinCnt();
-# };
-#===============================================================================
-##客户端封包响应 //01 10 兑换点券#tagCCoinChange
-#@param index 玩家索引
-#@param tick 时间戳
-#@return 返回值无意义
-#@remarks 客户端封包响应 //01 10 兑换点券#tagCCoinChange
-def CoinChangeReq(index, tick):
-
-    return
-
-#//07 3E 领取贴心福袋保证物#tagCReceiveGoodyBagGuarantees
-#
-#struct tagCReceiveGoodyBagGuarantees
-#{
-#        tagHead Head;
-#        BYTE   Index; //保证物索引
-#};
-##07 3E 领取贴心福袋保证物
-#@param index 玩家索引
-#@param tick 时间戳
-#@return 返回值无意义
-#@remarks 07 3E 领取贴心福袋保证物
-def GetGuaranteeGift(index, tick):
-    
-    return
-

--
Gitblit v1.8.0