From f6b41481ad949596ed3bcfb7d8d9a65bee57e256 Mon Sep 17 00:00:00 2001
From: hxp <ale99527@vip.qq.com>
Date: 星期四, 28 三月 2019 14:43:31 +0800
Subject: [PATCH] 6373 【后端】【2.0】删除无用功能代码、封包、配置(消费VIP、充值活动)
---
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Event/EventSrc/QuestRunnerValue.py | 1
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Item/ChEquip.py | 4
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChPyNetPack.py | 64 -----
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/RemoteQuery/GY_Query_ExamGivePlayerReward.py | 1
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Item/ChItem.py | 113 ---------
ServerPython/CoreServerGroup/GameServer/Script/ChPyNetPack.py | 64 -----
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ReadChConfig.py | 3
/dev/null | 70 -----
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Event/EventSrc/QuestRunner.py | 5
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/PyNetPack.ini | 6
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerGameEvent.py | 1
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerTruck.py | 1
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/DataRecordPack.py | 18 -
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/ChPlayer.py | 5
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorld.py | 2
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerControl.py | 6
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerGoldGift.py | 300 -------------------------
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChConfig.py | 17 -
18 files changed, 5 insertions(+), 676 deletions(-)
diff --git a/ServerPython/CoreServerGroup/GameServer/Script/ChPyNetPack.py b/ServerPython/CoreServerGroup/GameServer/Script/ChPyNetPack.py
index 35cc352..fc320e7 100644
--- a/ServerPython/CoreServerGroup/GameServer/Script/ChPyNetPack.py
+++ b/ServerPython/CoreServerGroup/GameServer/Script/ChPyNetPack.py
@@ -7004,70 +7004,6 @@
#------------------------------------------------------
-#A3 21 使用特殊运营物品 #tagCMUseSpecialItem
-
-class tagCMUseSpecialItem(Structure):
- _pack_ = 1
- _fields_ = [
- ("Cmd", c_ubyte),
- ("SubCmd", c_ubyte),
- ("SpeicalItemType", c_ubyte), #特殊运营物品类型,0打折卡,1多选礼包
- ("ItemID", c_int), #物品ID
- ("ItemIndex", c_ubyte), #物品在背包中的索引位置
- ("Select", c_ubyte), #选择,只对多选礼包有用
- ]
-
- def __init__(self):
- self.Clear()
- self.Cmd = 0xA3
- self.SubCmd = 0x21
- 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 = 0xA3
- self.SubCmd = 0x21
- self.SpeicalItemType = 0
- self.ItemID = 0
- self.ItemIndex = 0
- self.Select = 0
- return
-
- def GetLength(self):
- return sizeof(tagCMUseSpecialItem)
-
- def GetBuffer(self):
- return string_at(addressof(self), self.GetLength())
-
- def OutputString(self):
- DumpString = '''//A3 21 使用特殊运营物品 //tagCMUseSpecialItem:
- Cmd:%s,
- SubCmd:%s,
- SpeicalItemType:%d,
- ItemID:%d,
- ItemIndex:%d,
- Select:%d
- '''\
- %(
- self.Cmd,
- self.SubCmd,
- self.SpeicalItemType,
- self.ItemID,
- self.ItemIndex,
- self.Select
- )
- return DumpString
-
-
-m_NAtagCMUseSpecialItem=tagCMUseSpecialItem()
-ChNetPackDict[eval("0x%02x%02x"%(m_NAtagCMUseSpecialItem.Cmd,m_NAtagCMUseSpecialItem.SubCmd))] = m_NAtagCMUseSpecialItem
-
-
-#------------------------------------------------------
# A3 2F 宗门试炼兑换 #tagCMTrialExchange
class tagCMTrialExchange(Structure):
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/PyNetPack.ini b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/PyNetPack.ini
index c6a3305..70d6788 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/PyNetPack.ini
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/PyNetPack.ini
@@ -14,9 +14,9 @@
PacketSubCMD_1=0x02
PacketCallFunc_1=PlayerDropItem
-PacketCMD_2=0xA3
-PacketSubCMD_2=0x21
-PacketCallFunc_2=OnUseSpecialItem
+PacketCMD_2=
+PacketSubCMD_2=
+PacketCallFunc_2=
PacketCMD_3=0xA3
PacketSubCMD_3=0x23
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChConfig.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChConfig.py
index 8d25d6f..8894602 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChConfig.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChConfig.py
@@ -708,7 +708,6 @@
Def_SkillID_Teleport = 1400 #瞬间移动 用于不影响攻击间隔
Def_SkillID_VipBuff = 11500 # VIPbuff
Def_SkillID_TeamVIPBuff = 22000 # VIP队伍buff, 攻守同盟
-Def_SkillID_CostVipBuff = 61018 # CostVIPbuff
Def_SkillID_FBEncourageBuff = 20051 # 副本鼓舞buff
Def_SkillID_FreshmanGuideBuff = 21219 # 新手指导员buff
Def_SkillID_PoisonAtkBuff = 25180 # 毒攻buff
@@ -3448,16 +3447,12 @@
Def_PDict_CTGCountResetTime = "CTGCountResetTime" # CTG次数重置时间time值
Def_PDict_TodayCTGCount = "TodayCTGCount_%s" # 当日充值次数,参数(CTG对应的商品记录ID)
Def_PDict_CTGGoodsBuyCount = "CTGGoodsBuyCount_%s" # 对应充值商品已购买次数,参数(CTG对应的商品记录ID)
-Def_PDict_GoldGiftGetRecord = "GoldGiftGetRecord" # 充值豪礼领取信息记录,按二进制位标示
-Def_PDict_GoldGiftMailRecord = "GoldGiftMailRecord" # 充值豪礼邮件发送记录,按二进制位标示
Def_PDict_GoldGiftFirstRecord = "GoldGiftFirstRecord" # 首充领取记录,0-未领取;1-已领取
Def_PDict_FirstGoldRemainTime = "FirstGoldRemainTime" # 首充提示剩余时间
Def_PDict_FirstGoldTipStartTime = "FirstGoldTipStartTime" # 首充提示开始时间
Def_PDict_FirstGoldTry = "FirstGoldTry" # 首充试用状态 0-不可试用 1-可试用 2-已试用
-Def_PDict_DailyGoldChargeState = "DailyGoldChargeState" # 天天首充活动状态,0-未开启;1-已开启
Def_PDict_DailyChargeState = "DailyChargeState" # 当日是否已充值
Def_PDict_SuperGiftStartTime = "SuperGiftStartTime" # 超值礼包开始时间
-Def_PDict_DailyGoldChargePrizeRecord = "DailyGoldChargePrizeRecord" # 天天首充领奖记录,0-不可领;1-可领;2-已领
Def_PDict_DailyGoldChargeCnt = "DailyGoldChargeCnt" # 当日已充值数
Def_PDict_IsReBorn = "Def_PDict_IsReBorn" # 是否回城复活
Def_PDict_FamilyWarDailyReward = "FamilyWarDailyReward" # 王者仙盟每日俸禄领取状态
@@ -3528,12 +3523,6 @@
Def_PDict_ClothesSkinLV = "ClothesSkinLV_%s" # 时装皮肤等级,参数时装索引
Def_PDict_ClothesChestLV = "ClothesChestLV" # 时装柜等级
Def_PDict_ClothesChestEXP = "ClothesChestEXP" # 时装柜经验
-
-Def_PDict_CostVIPExp = "CostVIPExp" # 消费VIP经验
-Def_PDict_CostVIPLVReward = "CostVIPLVReward" # 消费VIP等级奖励
-Def_PDict_CostVIPBuyItem = "CostVIPBuyItem" # 消费VIP购买物品
-Def_PDict_SpecialCostVIPLVExpMark = "SpecialCostVIPLVExpMark" # 特殊处理VIP等级经验标识
-Def_PDict_CostVIPGrowUpReward = "CostVIPGrowUpReward" # 消费VIP成长奖励
Def_PDict_SplitExpLVCnt = "SplitExpLVCnt_%s" # 单位等级经验已拆分过的等级数, 参数为实际等级
@@ -4606,12 +4595,6 @@
# 消费返利不处理的消费类型列表
CostRebate_DisableType = [Def_Cost_BourseBuy, Def_Cost_BourseCharge, Def_Cost_FreeGoods, Def_Cost_FamilyRedPacket,
Def_Cost_Unknown, "GMSetMoney", "Warehouse", Def_Cost_AuctionBid]
-CostProfit_CostType = [Def_Cost_BourseBuy, Def_Cost_BourseCharge, Def_Cost_Unknown,
- "GMSetMoney", "Warehouse", Def_Cost_AuctionBid]
-
-# 消费VIP不处理的消费类型列表
-CostVIP_CostType = [Def_Cost_BourseBuy, Def_Cost_BourseCharge, Def_Cost_Unknown,
- "GMSetMoney", "Warehouse", Def_Cost_AuctionBid]
# 可在跨服中消费的类型列表
MergeServerCanCostType = [Def_Cost_UseSpeaker, Def_Cost_Revive, Def_Cost_FBEncourage]
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChPyNetPack.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChPyNetPack.py
index 35cc352..fc320e7 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChPyNetPack.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChPyNetPack.py
@@ -7004,70 +7004,6 @@
#------------------------------------------------------
-#A3 21 使用特殊运营物品 #tagCMUseSpecialItem
-
-class tagCMUseSpecialItem(Structure):
- _pack_ = 1
- _fields_ = [
- ("Cmd", c_ubyte),
- ("SubCmd", c_ubyte),
- ("SpeicalItemType", c_ubyte), #特殊运营物品类型,0打折卡,1多选礼包
- ("ItemID", c_int), #物品ID
- ("ItemIndex", c_ubyte), #物品在背包中的索引位置
- ("Select", c_ubyte), #选择,只对多选礼包有用
- ]
-
- def __init__(self):
- self.Clear()
- self.Cmd = 0xA3
- self.SubCmd = 0x21
- 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 = 0xA3
- self.SubCmd = 0x21
- self.SpeicalItemType = 0
- self.ItemID = 0
- self.ItemIndex = 0
- self.Select = 0
- return
-
- def GetLength(self):
- return sizeof(tagCMUseSpecialItem)
-
- def GetBuffer(self):
- return string_at(addressof(self), self.GetLength())
-
- def OutputString(self):
- DumpString = '''//A3 21 使用特殊运营物品 //tagCMUseSpecialItem:
- Cmd:%s,
- SubCmd:%s,
- SpeicalItemType:%d,
- ItemID:%d,
- ItemIndex:%d,
- Select:%d
- '''\
- %(
- self.Cmd,
- self.SubCmd,
- self.SpeicalItemType,
- self.ItemID,
- self.ItemIndex,
- self.Select
- )
- return DumpString
-
-
-m_NAtagCMUseSpecialItem=tagCMUseSpecialItem()
-ChNetPackDict[eval("0x%02x%02x"%(m_NAtagCMUseSpecialItem.Cmd,m_NAtagCMUseSpecialItem.SubCmd))] = m_NAtagCMUseSpecialItem
-
-
-#------------------------------------------------------
# A3 2F 宗门试炼兑换 #tagCMTrialExchange
class tagCMTrialExchange(Structure):
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/DataRecordPack.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/DataRecordPack.py
index 1d0a975..5c73c8d 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/DataRecordPack.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/DataRecordPack.py
@@ -1455,24 +1455,6 @@
SendEventPack("TreasureResult", dataDict, curPlayer)
return
-## 消费VIP升级记录
-# @param curPlayer
-# @param lastLV 原VIPLV
-# @param curExp 当前VIP经验
-# @param addExp 增加VIP经验
-# @param costType 花费类型
-# @param costGold 花费数
-# @return: None
-def DR_PlayerCostVIPLV(curPlayer, lastLV, curExp, addExp, costType, costGold):
-
- dataDict = {'PlayerID':curPlayer.GetPlayerID(), 'PlayerName':curPlayer.GetPlayerName(),
- 'AccID':curPlayer.GetAccID(), 'VIPLv':curPlayer.GetVIPLv(), 'lastVIPLv':lastLV,
- 'curExp':curExp, 'addExp':addExp, 'costType':costType, 'costGold':costGold}
-
- #发送封包
- SendEventPack("PlayerCostVIPLV", dataDict, curPlayer)
- return
-
## 玩家提交bug及建议
def DR_BugSuggest(curPlayer, eventName, content):
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Event/EventSrc/QuestRunner.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Event/EventSrc/QuestRunner.py
index 7f352d3..96a3f80 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Event/EventSrc/QuestRunner.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Event/EventSrc/QuestRunner.py
@@ -49,9 +49,6 @@
import ChEquip
import PlayerActivity
import PlayerSuccess
-import EventReport
-#import PlayerCostVIP
-import GameFuncComm
import IpyGameDataPY
import PlayerPet
import PlayerArrestTask
@@ -63,7 +60,6 @@
import PlayerActLogin
import PlayerHorse
import FBCommon
-import PyGameData
import math
import time
@@ -5376,7 +5372,6 @@
randStarList = eval(ReadChConfig.GetChConfig('RunAround_Star'))
aroundStar = GameWorld.GetResultByRandomList(randStarList, 1)
- #vipStar = PlayerCostVIP.GetRoundStar(curPlayer)
vipStar = 0
if vipStar > 0:
aroundStar = vipStar
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Event/EventSrc/QuestRunnerValue.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Event/EventSrc/QuestRunnerValue.py
index 569e45a..1cbf72d 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Event/EventSrc/QuestRunnerValue.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Event/EventSrc/QuestRunnerValue.py
@@ -27,7 +27,6 @@
import GameWorld
import PlayerControl
import QuestCommon
-import PyMapTable
#---------------------------------------------------------------------
##获取服务器任务状态, State
# @param curPlayer 玩家实例
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GM/Commands/ClearCostVIP.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GM/Commands/ClearCostVIP.py
deleted file mode 100644
index 9682bce..0000000
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GM/Commands/ClearCostVIP.py
+++ /dev/null
@@ -1,39 +0,0 @@
-#!/usr/bin/python
-# -*- coding: GBK -*-
-#-------------------------------------------------------------------------------
-#
-#-------------------------------------------------------------------------------
-#
-##@package GM.Commands.ClearCostVIP
-#
-# @todo:消费VIP重置
-# @author ljd
-# @date 2015-08-07 20:00
-# @version 1.0
-#
-#
-# 详细描述: 消费VIP重置
-#
-#---------------------------------------------------------------------
-#"""Version = 2015-08-07 20:00"""
-#---------------------------------------------------------------------
-import ChConfig
-import PlayerCostVIP
-import PlayerControl
-import GameWorld
-
-
-## 逻辑实现
-# @param curPlayer
-# @param cmdList 参数列表
-# @return None
-def OnExec(curPlayer, cmdList):
- curPlayer.SetVIPLv(0)
- PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_CostVIPExp, 0)
- PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_CostVIPLVReward, 0)
- PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_CostVIPBuyItem, 0)
-
- PlayerCostVIP.Sync_CostVIPInfo(curPlayer)
- PlayerCostVIP.Sync_CostVIPAwardState(curPlayer)
- GameWorld.DebugAnswer(curPlayer, 'ClearCostVIP OK!')
- return
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorld.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorld.py
index 72f5e00..abca8cc 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorld.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorld.py
@@ -45,10 +45,8 @@
import datetime
import ChConfig
import os
-import MapConfig
import CommFunc
import ShareDefine
-import PyMapTable
#import psyco
from decimal import Decimal
import time
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Item/ChEquip.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Item/ChEquip.py
index 2b1a9dc..083c2fa 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Item/ChEquip.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Item/ChEquip.py
@@ -23,11 +23,9 @@
import ChItem
import ItemCommon
import FBLogic
-import ReadChConfig
import OperControlManager
import Operate_EquipWash
import ShareDefine
-import PyMapTable
import ChPyNetSendPack
import NetPackCommon
import EventShell
@@ -35,8 +33,6 @@
import PlayerWing
import Operate_EquipStone
import PassiveBuffEffMng
-import SkillCommon
-import PlayerMagicWeapon
import time
import json
import FormulaControl
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Item/ChItem.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Item/ChItem.py
index 13156e9..e2e458c 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Item/ChItem.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Item/ChItem.py
@@ -45,7 +45,6 @@
import ShareDefine
import PlayerAttrFruit
import DataRecordPack
-import PyMapTable
import ChPyNetSendPack
import NetPackCommon
import IpyGameDataPY
@@ -1919,118 +1918,6 @@
Def_Discount_ItemType, #折扣卡物品类型
Def_SelectMore_ItemType #多选礼包物品类型
) = range(2)
-
-#//A3 21 使用特殊运营物品 #tagCMUseSpecialItem
-#
-#struct tagCMUseSpecialItem
-#{
-# tagHead Head;
-# BYTE SpeicalItemType; //特殊运营物品类型,0打折卡,1多选礼包
-# int ItemID; //物品ID
-# BYTE ItemIndex; //物品在背包中的索引位置
-# BYTE Select; //选择,只对多选礼包有用
-#};
-## 使用特殊运营物品(封包参数)
-# @param index 玩家索引
-# @param packData 接收到的封包数据
-# @param tick 当前时间
-# @return None
-def OnUseSpecialItem(index, packData, tick):
-# #GameWorld.Log("OnUseSpecialItem")
-# curPlayer = GameWorld.GetPlayerManager().GetPlayerByIndex(index)
-# specialItemType = packData.SpeicalItemType
-# itemID = packData.ItemID
-# itemIndex = packData.ItemIndex
-# selectIndex = packData.Select
-#
-# curPack = curPlayer.GetItemManager().GetPack(IPY_GameWorld.rptItem)
-# curItem = curPack.GetAt(itemIndex)
-# if curItem.GetItemTypeID() != itemID:
-# GameWorld.Log("使用特殊运营物品失败,物品ID不一致")
-# return
-# isBind = curItem.GetIsBind()#继承被使用物品的绑定属性,先记录
-# itemName = curItem.GetName()
-#
-# needGold = 0 #需要消耗多少钻石
-# itemInfoList = []
-# useMoneyInfo = ""
-# #如果是打折卡类型
-# if specialItemType == Def_Discount_ItemType:
-# #GameWorld.Log("处理打折卡物品类型")
-# discountItem = ReadChConfig.GetEvalChConfig("DiscountItem")
-# #GameWorld.Log("读取到的打折卡物品配置信息=%s"%discountItem)
-# itemSetInfo = discountItem.get(itemID, None)
-# if not itemSetInfo:
-# GameWorld.ErrLog("折扣卡,没有找到对应物品的配置信息,物品ID:%s"%itemID)
-# return
-# needGold, itemInfo = itemSetInfo
-# itemInfoList.append(itemInfo)
-# useMoneyInfo = "UseSpecialItem_Discount"
-# else:
-# #GameWorld.Log("处理多选礼包物品类型")
-# selectMoreItem = ReadChConfig.GetEvalChConfig("SelectMoreItem")
-# #GameWorld.Log("读取到的多选礼包物品配置信息=%s"%selectMoreItem)
-# itemSetInfo = selectMoreItem.get(itemID, None)
-# if not itemSetInfo:
-# GameWorld.ErrLog("多选礼包,没有找到对应物品的配置信息,物品ID:%s"%itemID)
-# return
-# if selectIndex < 0 or selectIndex >= len(itemSetInfo):
-# GameWorld.ErrLog("多选礼包,选择索引越界,物品ID:%s 选择索引:%s"%(itemID, selectIndex))
-# return
-# itemSetInfo = itemSetInfo[selectIndex]
-# needGold, itemInfoList = itemSetInfo
-# useMoneyInfo = "UseSpecialItem_SelectMore"
-# #GameWorld.Log("needGold=%s itemInfoList=%s"%(needGold, itemInfoList))
-#
-# #钻石不足
-# if not PlayerControl.HaveMoney(curPlayer, IPY_GameWorld.TYPE_Price_Gold_Money, needGold):
-# GameWorld.ErrLog("钻石不足")
-# return
-# #背包剩余空间
-# packSpace = ItemControler.GetItemPackSpace(curPlayer, IPY_GameWorld.rptItem)
-# if packSpace < len(itemInfoList):
-# PlayerControl.NotifyCode(curPlayer, "GeRen_chenxin_998371")
-# GameWorld.ErrLog("背包空间不足")
-# return
-# #给物品
-# for itemInfo in itemInfoList:
-# newItemId, itemCount, bind, isAppoint = itemInfo
-# makeItemID = newItemId
-# #是定制物品
-# if isAppoint:
-# appointItemList = PyMapTable.GetPyMapTable("AppointItemList") #定制物品列表
-# itemData = appointItemList.GetRecord("ItemIndex", str(newItemId))
-# if not itemData:
-# GameWorld.ErrLog("使用特殊运营物品 找不到定制物品数据, itemID = %s"%newItemId)
-# return False
-#
-# if len(itemData) != 1:
-# GameWorld.ErrLog("使用特殊运营物品 定制表配置的数据有误, itemID = %s"%newItemId)
-# return False
-#
-# itemDictData = itemData[0]
-# makeItemID = int(itemDictData['ItemID'])
-# itemCount = 1
-# itemDictData['IsBind'] = isBind
-# if not ItemControler.GivePlayerEquip(curPlayer, itemDictData):
-# GameWorld.ErrLog("使用特殊运营物品 给予定制物品失败")
-# return
-# else:
-# #给予物品
-# if not ItemControler.GivePlayerItem(curPlayer, newItemId, itemCount, 0, [IPY_GameWorld.rptItem]):
-# GameWorld.ErrLog("使用特殊运营物品 给予普通物品失败")
-# return
-# #PlayerControl.NotifyCode(curPlayer, "ObtainRes01", [makeItemID, itemCount])
-#
-# #扣除物品
-# itemPack = curPlayer.GetItemManager().GetPack(IPY_GameWorld.rptItem)
-# #扣除物品
-# ItemCommon.ReduceItem(curPlayer, itemPack, [itemIndex], 1, False)
-#
-# #扣金钱
-# addDataDict = {"SpecialItemType":specialItemType, "UseItemID":itemID, "SelectIndex":selectIndex, ChConfig.Def_Cost_Reason_SonKey:itemName}
-# PlayerControl.PayMoney(curPlayer, IPY_GameWorld.TYPE_Price_Gold_Money, needGold, ChConfig.Def_Cost_GiftBag, addDataDict)
- return
#// A3 07 过期物品续费 #tagCMItemRenew
#
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/ChPlayer.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/ChPlayer.py
index 88f6b5c..370ed55 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/ChPlayer.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/ChPlayer.py
@@ -687,10 +687,7 @@
PlayerFlashGiftbag.OnPlayerLogin(curPlayer)
#限时抢购
PlayerFlashSale.OnPlayerLogin(curPlayer)
-# # 消费VIP
-# PlayerCostVIP.CostVIPOnLogin(curPlayer, tick)
-#
-# # 世界boss
+ # 世界boss
BossHurtMng.OnLogin(curPlayer)
ChItem.Sync_ItemDayUseCnt(curPlayer)
# # 悬赏登录通知
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 dbd11ea..8f33bb6 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerControl.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerControl.py
@@ -2985,10 +2985,6 @@
# 绝版降临
PlayerFairyCeremony.AddFCCostGold(curPlayer, costType, price)
PlayerNewFairyCeremony.AddFCCostGold(curPlayer, costType, price)
- # 消费VIP
-# if costVIPGold < 0:
-# costVIPGold = price
- #PlayerCostVIP.AddCostVIPExp(curPlayer, costType, costVIPGold)
# 事件汇报
#===========================================================================
@@ -3756,7 +3752,7 @@
# if expViewType == ShareDefine.Def_ViewExpType_KillNPC:
# #mapID = GameWorld.GetMap().GetMapID()
# #if mapID in ChConfig.Def_FBMapID_BZZDAll:
- # # nobleVIPOuterRate = PlayerCostVIP.GetBZZDExpAddRate(curPlayer)
+ # # nobleVIPOuterRate = ...
# # #nobleVIPAddExp += 0 if not nobleVIPOuterRate else int(addExp * nobleVIPOuterRate / float(ChConfig.Def_MaxRateValue))
# # nobleVIPAddExp += nobleVIPOuterRate
#
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerCostVIP.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerCostVIP.py
deleted file mode 100644
index 5ed2f99..0000000
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerCostVIP.py
+++ /dev/null
@@ -1,433 +0,0 @@
-#!/usr/bin/python
-# -*- coding: GBK -*-
-#-------------------------------------------------------------------------------
-#
-#-------------------------------------------------------------------------------
-#
-##@package Player.PlayerCostVIP
-#
-# @todo:消费VIP
-# @author ljd
-# @date 2015-04-21 11:30
-# @version 1.7
-#
-# @change: "2015-08-18 15:50" ljd 特殊处理数值配错,VIP等级经验调小,特殊处理外网已升级VIP玩家,补回VIP等级
-# @change: "2016-01-26 15:00" hxp PY表支持重读
-# @change: "2016-06-15 12:00" hxp 宠物守护位解锁
-# @change: "2016-07-02 16:30" hxp VIP特权buff改为被动技能加战斗力
-# @change: "2016-10-17 16:00" hxp 增加经验副本、金币副本收益特权
-# @change: "2017-04-01 10:30" xdh CostVIP.txt去除职业区别
-# @change: "2017-05-24 16:08" xdh 增加VIP成长奖励
-#
-# 详细描述: 消费钻石数增加VIP等级,根据VIP等级增加特权和给予奖励
-#
-#---------------------------------------------------------------------
-#"""Version = 2017-05-24 16:08"""
-#---------------------------------------------------------------------
-import IPY_GameWorld
-import GameWorld
-import ChConfig
-import ReadChConfig
-import PyMapTable
-import ItemControler
-import PlayerControl
-import DataRecordPack
-import ShareDefine
-import ChPyNetSendPack
-import NetPackCommon
-import ChPlayer
-import SkillCommon
-import BuffSkill
-import EventShell
-
-import Operate_PlayerBuyZhenQi
-
-
-# 消费VIP信息表列标识
-CostVIPData_LV = "LV" # VIP等级
-CostVIPData_Exp = "EXP" # 升级所需经验
-# ----- 外调再封装函数使用 -----
-CostVIPData_PrayNum = "PrayNum" # 祈祷次数
-CostVIPData_ArenaNum = "ArenaNum" # 竞技场增加次数
-CostVIPData_RoundReward = "RoundReward" # 环任务奖励加成 <百分率>
-CostVIPData_RoundStar = "RoundStar" # 环任务字典星级
-CostVIPData_BZZDExpAddRate = "BZZDExpAddRate" # 经验秘境经验加成
-CostVIPData_RedPacketGrabCnt = "RedPacketGrabCnt" # 抢红包每日可抢次数增加
-CostVIPData_KillWorldBossAddCnt = "KillWorldBossAddCnt" # 击杀世界boss次数增加
-
-# 消费VIP信息表奖励配置格式
-(
-Reward_Item_Type, # 物品类型
-Reward_Item_Id, # 物品ID
-Reward_Item_Num, # 物品数量
-Reward_Item_Bind, # 是否绑定
-) = range(4)
-
-# 物品类型
-(
-Item_Type_Common, # 一般物品表
-Item_Type_Appoint, # 特殊定制物品
-) = range(2)
-
-
-## 增加消费VIP经验
-# @param curPlayer
-# @param costType 消费类型
-# @param costGold 消费钻石数
-# @return
-def AddCostVIPExp(curPlayer, costType, costGold):
- GameWorld.DebugLog("==[PlayerCostVIP]== In->AddCostVIPExp() player(%s)" % curPlayer.GetPlayerName())
-
- if costGold <= 0:
- GameWorld.DebugLog("AddCostVIPExp() no cost(%s) gold" % costType)
- return
- if costType in ChConfig.CostVIP_CostType:
- GameWorld.DebugLog("AddCostVIPExp() no use cost(%s) type" % costType)
- return
-
- moneyToExpScale = eval(ReadChConfig.GetEvalChConfig('CostVIPMoneyToExp'))
- addExp = int(costGold * moneyToExpScale)
- if addExp <= 0:
- GameWorld.DebugLog("AddCostVIPExp() no add EXP")
- return
- curExp = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_CostVIPExp)
- lastLV = curPlayer.GetVIPLv()
- __AddCostVIPExp(curPlayer, addExp)
-
-
- if lastLV != curPlayer.GetVIPLv():
- DataRecordPack.DR_PlayerCostVIPLV(curPlayer, lastLV, curExp, addExp, costType, costGold)
-
- return
-
-## 增加消费VIP经验
-def __AddCostVIPExp(curPlayer, addExp):
- curLV = curPlayer.GetVIPLv()
- needExp = __GetCostVIPData(curPlayer, curLV, CostVIPData_Exp)
- if not needExp:
- GameWorld.DebugLog("__AddCostVIPExp() EXP no configuration vipLV(%s)" % curLV)
- return
-
- curExp = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_CostVIPExp)
- newExp = curExp + addExp
-
- while needExp and newExp >= needExp:
- curLV += 1
- __SetVIPLV(curPlayer, curLV)
-
- newExp -= needExp
- needExp = __GetCostVIPData(curPlayer, curLV, CostVIPData_Exp)
-
- PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_CostVIPExp, newExp if needExp else 0)
-
- Sync_CostVIPInfo(curPlayer)
-
- GameWorld.DebugLog(" __AddCostVIPExp() LV(%s) EXP(%s)" % (curLV, newExp))
- return
-
-## 消费VIP登陆
-# @param curPlayer
-# @param tick
-# @return
-def CostVIPOnLogin(curPlayer, tick):
-
- Sync_CostVIPInfo(curPlayer)
- Sync_CostVIPAwardState(curPlayer)
- Sync_CostVIPGrowUpAwardState(curPlayer)
- return
-
-## 购买消费VIP物品
-# @param index
-# @param clientPack <VIPLV-VIP等级>
-# @param tick
-# @return
-def BuyCostVIPItem(index, clientPack, tick):
- curPlayer = GameWorld.GetPlayerManager().GetPlayerByIndex(index)
-
- GameWorld.DebugLog("==[PlayerCostVIP]== In->BuyCostVIPItem(), Name:%s" % curPlayer.GetPlayerName())
-
- getVIPLV = clientPack.VIPLV
-
- if getVIPLV > curPlayer.GetVIPLv():
- GameWorld.DebugLog("BuyCostVIPItem() VIP LV(%s) no buy LV(%s)" % (curPlayer.GetVIPLv(), getVIPLV))
- return
-
- buyItemStateKey = ChConfig.Def_PDict_CostVIPBuyItem
- buyItemState = curPlayer.NomalDictGetProperty(buyItemStateKey)
- if buyItemState & pow(2, getVIPLV):
- GameWorld.DebugLog("BuyCostVIPItem() had buy reward(%s)" % getVIPLV)
- return
-
- VIPBuyItemCfg = ReadChConfig.GetEvalChConfig('VIPBuyItemCfg')
- if getVIPLV not in VIPBuyItemCfg:
- GameWorld.DebugLog("VIPBuyItemCfg.txt 未配置购买信息 vip=%s" % getVIPLV)
- return
- buyItemInfo = VIPBuyItemCfg[getVIPLV]
- if len(buyItemInfo) !=3:
- return
- itemPrice, needSpace, itemList = buyItemInfo
- packSpace = ItemControler.GetItemPackSpace(curPlayer, IPY_GameWorld.rptItem)
- if packSpace < needSpace:
- GameWorld.DebugLog("BuyCostVIPItem() no enough(%s) pack space(%s)" % (needSpace, packSpace))
- return
-
- moneyType = IPY_GameWorld.TYPE_Price_Gold_Money
- if itemPrice > 0:
- if not PlayerControl.HaveMoney(curPlayer, moneyType, itemPrice, True):
- GameWorld.DebugLog("BuyCostVIPItem() no enough money(%s)" % itemPrice)
- return
-
- PlayerControl.NomalDictSetProperty(curPlayer, buyItemStateKey, buyItemState | pow(2, getVIPLV))
-
- if itemPrice > 0:
- infoDict = {"getVIPLV":getVIPLV, ChConfig.Def_Cost_Reason_SonKey:"VIP%s"%getVIPLV}
- PlayerControl.PayMoney(curPlayer, moneyType, itemPrice, ChConfig.Def_Cost_BuyVIPItem, infoDict)
-
- __GiveItem(curPlayer, itemList)
-
- Sync_CostVIPInfo(curPlayer)
- GameWorld.DebugLog("==[PlayerCostVIP]== Out->BuyCostVIPItem()")
- return
-
-## 领取消费VIP奖励
-# @param curPlayer
-# @param getVIPLV 领取的VIP等级
-# @return
-def GetCostVIPAward(curPlayer, getVIPLV):
- if getVIPLV > curPlayer.GetVIPLv():
- GameWorld.DebugLog("GetCostVIPAward() VIP LV(%s) no buy LV(%s)" % (curPlayer.GetVIPLv(), getVIPLV))
- return
-
- rewardStateKey = ChConfig.Def_PDict_CostVIPLVReward
- rewardState = curPlayer.NomalDictGetProperty(rewardStateKey)
- if rewardState & pow(2, getVIPLV):
- GameWorld.DebugLog("GetCostVIPAward() had got reward(%s)" % getVIPLV)
- return
-
- VIPAwardCfg = ReadChConfig.GetEvalChConfig('VIPAwardCfg')
- if getVIPLV not in VIPAwardCfg:
- GameWorld.DebugLog("VIPAwardCfg.txt 未配置奖励信息 vip=%s" % getVIPLV)
- return
- rewardList = VIPAwardCfg[getVIPLV]
-
- packSpace = ItemControler.GetItemPackSpace(curPlayer, IPY_GameWorld.rptItem)
- if packSpace < rewardList[0]:
- GameWorld.DebugLog("GetCostVIPAward() no enough(%s) pack space(%s)" % (rewardList[0], packSpace))
- return
-
- PlayerControl.NomalDictSetProperty(curPlayer, rewardStateKey, rewardState | pow(2, getVIPLV))
-
- __GiveItem(curPlayer, rewardList[1:])
-
- Sync_CostVIPAwardState(curPlayer)
- return
-
-## 领取VIP成长奖励
-def GetVIPGrowUpAward(curPlayer, index):
- growUpAwardDict = ReadChConfig.GetEvalChConfig('VIPGrowUpAward')
- if index not in growUpAwardDict:
- return
-
- rewardStateKey = ChConfig.Def_PDict_CostVIPGrowUpReward
- rewardState = curPlayer.NomalDictGetProperty(rewardStateKey)
- if rewardState & pow(2, index):
- GameWorld.DebugLog(" 领取VIP成长奖励 had got reward(%s)" % index)
- return
-
- needLV, vipExp, itemList = growUpAwardDict[index]
- if curPlayer.GetLV() < needLV:
- GameWorld.DebugLog(' 领取VIP成长奖励index=%s, 玩家等级不足%s'%(index, needLV))
- return
-
- packSpace = ItemControler.GetItemPackSpace(curPlayer, IPY_GameWorld.rptItem)
-
- if packSpace < len(itemList):
- GameWorld.DebugLog("领取VIP成长奖励 no enough(%s) pack space(%s)" % (len(itemList), packSpace))
- return
-
- PlayerControl.NomalDictSetProperty(curPlayer, rewardStateKey, rewardState | pow(2, index))
-
- __AddCostVIPExp(curPlayer, vipExp)
- PlayerControl.NotifyCode(curPlayer, "GeRen_liubo_437683", [vipExp])
- __GiveItem(curPlayer, itemList)
-
- Sync_CostVIPGrowUpAwardState(curPlayer)
- return
-
-## 通知成长奖励领取状态
-# @param curPlayer
-# @return
-def Sync_CostVIPGrowUpAwardState(curPlayer):
-# awardType = ShareDefine.Def_RewardType_CostVIPGrowUp
-# awardState = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_CostVIPGrowUpReward)
-# ChPlayer.Sync_RewardGetRecordInfo(curPlayer, awardType, awardState)
- return
-
-## 通知消费VIP信息
-# @param curPlayer
-# @return
-def Sync_CostVIPInfo(curPlayer):
- sendPack = ChPyNetSendPack.tagMCVIPInfo()
- sendPack.Clear()
- sendPack.Exp = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_CostVIPExp)
- sendPack.BuyState = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_CostVIPBuyItem)
- NetPackCommon.SendFakePack(curPlayer, sendPack)
- return
-
-## 通知奖励领取状态
-# @param curPlayer
-# @return
-def Sync_CostVIPAwardState(curPlayer):
- #awardType = ShareDefine.Def_RewardType_CostVIPLV
- #awardState = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_CostVIPLVReward)
- #ChPlayer.Sync_RewardGetRecordInfo(curPlayer, awardType, awardState)
- return
-
-## 消费VIP升级VIP
-# @param curPlayer
-# @param vipLV 消费VIP等级
-# @return
-def __SetVIPLV(curPlayer, vipLV):
- curPlayer.SetVIPLv(vipLV)
- #vip等级改变触发任务
- EventShell.EventResponse_OnVipLvUp(curPlayer)
- tick = GameWorld.GetGameWorld().GetTick()
- __AddBuff(curPlayer, tick)
- __NtfChangeInfo(curPlayer, tick)
- return
-
-## 给予物品
-# @param curPlayer
-# @param itemList 物品列表
-# @return
-def __GiveItem(curPlayer, itemList):
- giveFailList = []
- for itemInfo in itemList:
- itemType = itemInfo[Reward_Item_Type]
- itemId = itemInfo[Reward_Item_Id]
- itemNum = itemInfo[Reward_Item_Num]
- itemIsBind = itemInfo[Reward_Item_Bind]
- if isinstance(itemId, dict):
- if curPlayer.GetJob() not in itemId:
- GameWorld.ErrLog(" PlayerCostVIP __GiveItem itemId=%s, 职业(%s)未配置"
- % (itemId, curPlayer.GetJob()))
- continue
- itemId = itemId[curPlayer.GetJob()]
-
- if itemNum <= 0 or itemId <= 0:
- continue
-
- if itemType == Item_Type_Common:
- packIndexList = [IPY_GameWorld.rptItem, IPY_GameWorld.rptAnyWhere]
- if not ItemControler.GivePlayerItem(curPlayer, itemId, itemNum, 0, packIndexList):
- giveFailList.append(itemInfo)
-
- elif itemType == Item_Type_Appoint:
- if not ItemControler.GivePlayerAppointItem(curPlayer, itemId, False):
- giveFailList.append(itemInfo)
-
- if giveFailList:
- GameWorld.ErrLog("__GiveItem() give fail item(%s)" % str(giveFailList), curPlayer.GetPlayerID())
- return
-
-## 加Buff
-# @param curPlayer
-# @param tick
-# @return 是否加成功
-def __AddBuff(curPlayer, tick):
- costVIPBuffTypeID = ChConfig.Def_SkillID_CostVipBuff
- curVIPLv = curPlayer.GetVIPLv()
- curSkill = GameWorld.GetGameData().FindSkillByType(costVIPBuffTypeID, curVIPLv)
- if not curSkill:
- return
-
- playerSkillManager = curPlayer.GetSkillManager()
- BuffSkill.DelBuffBySkillID(curPlayer, costVIPBuffTypeID, tick)
- playerSkillManager.DeleteSkillBySkillTypeID(costVIPBuffTypeID)
-
- skillID = curSkill.GetSkillID()
- playerSkillManager.LVUPSkillByID(skillID)
- SkillCommon.AddBuffBySkillType(curPlayer, costVIPBuffTypeID, tick, curVIPLv)
- return True
-
-## 通知信息变化
-# @param curPlayer
-# @param tick
-# @return None
-def __NtfChangeInfo(curPlayer, tick):
- Operate_PlayerBuyZhenQi.Sync_NotifyDataChange(curPlayer)
- return
-
-## 获取消费VIP配置信息
-# @param curPlayer
-# @param vipLV VIP等级
-# @param dataKey 消息表列表标识
-# @return 返回对应信息
-def __GetCostVIPData(curPlayer, vipLV=-1, dataKey=''):
- if vipLV < 0:
- vipLV = curPlayer.GetVIPLv()
-
- searchDict = {CostVIPData_LV:str(vipLV)}
- costVIPTable = PyMapTable.GetPyMapTable("CostVIP")
-
- costVIPDataList = costVIPTable.GetRecordByDic(searchDict)
- if len(costVIPDataList) != 1:
- GameWorld.DebugLog("__GetCostVIPData() vipLV(%s) configuration repeat" % (vipLV))
- return
-
- if dataKey == '':
- return costVIPDataList[0]
-
- costVIPData = costVIPDataList[0].get(dataKey)
- if not costVIPData:
- GameWorld.DebugLog("__GetCostVIPData() %s no configuration vipLV(%s)" % (dataKey, vipLV))
- return
-
- return eval(costVIPData)
-
-
-# ----- 外调再封装函数 -----
-## 获取祈祷次数列表
-def GetPrayNumList(curPlayer, default=[]):
- prayNumList = __GetCostVIPData(curPlayer, dataKey = CostVIPData_PrayNum)
- if not prayNumList:
- return default
- return prayNumList
-# 获取竞技场增加次数
-def GetArenaNum(curPlayer, default=0):
- arenaNum = __GetCostVIPData(curPlayer, dataKey = CostVIPData_ArenaNum)
- if not arenaNum:
- return default
- return arenaNum
-# 获取环任务奖励加成<百分率>
-def GetRoundReward(curPlayer, default=0):
- roundReward = __GetCostVIPData(curPlayer, dataKey = CostVIPData_RoundReward)
- if not roundReward:
- return default
- return roundReward
-# 获取环任务字典星级
-def GetRoundStar(curPlayer, default=0):
- roundStar = __GetCostVIPData(curPlayer, dataKey = CostVIPData_RoundStar)
- if not roundStar:
- return default
- return roundStar
-# 经验秘境经验加成
-def GetBZZDExpAddRate(curPlayer):
- addValue = __GetCostVIPData(curPlayer, dataKey = CostVIPData_BZZDExpAddRate)
- if not addValue:
- return 0
- return addValue
-
-# 抢红包每日可抢增加次数
-def GetRedPacketGrabCntAdd(curPlayer):
- addCnt = __GetCostVIPData(curPlayer, dataKey = CostVIPData_RedPacketGrabCnt)
- if not addCnt:
- return 0
- return addCnt
-
-# 击杀世界boss次数增加
-def GetKillWorldBossAddCnt(curPlayer):
- addCnt = __GetCostVIPData(curPlayer, dataKey = CostVIPData_KillWorldBossAddCnt)
- if not addCnt:
- return 0
- return addCnt
\ No newline at end of file
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerGameEvent.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerGameEvent.py
index 14b960a..b9f5639 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerGameEvent.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerGameEvent.py
@@ -38,7 +38,6 @@
import DataRecordPack
import ChPyNetSendPack
import NetPackCommon
-import PyMapTable
import NPCCommon
#---------------------------------------------------------------------
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 56a5da5..ae637da 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerGoldGift.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerGoldGift.py
@@ -36,7 +36,6 @@
#------------------------------------------------------------------------------
import GameWorld
import IPY_GameWorld
-import ReadChConfig
import ItemControler
import ChConfig
import ItemCommon
@@ -46,194 +45,11 @@
import ChPyNetSendPack
import PlayerFamilyRedPacket
import NetPackCommon
-import PyMapTable
-import PlayerCoin
import IpyGameDataPY
import PlayerTJG
import ChEquip
import time
-import FunctionNPCCommon
-
-# 定义配表外围索引
-(
-Def_NotifyMark, # 系统提示mark
-Def_NeedSpace, # 所需格子数
-Def_GiftInfo, # 奖品信息
-) = range(3)
-
-# 定义奖励物品信息索引
-(
-Def_InfoIndex_ItemType, # 物品类型
-Def_InfoIndex_ItemID, # 物品id或定制物品索引
-Def_InfoIndex_ItemCount, # 物品个数
-Def_InfoIndex_IsBind, # 是否绑定
-) = range(4)
-
-
-# 定义物品类型
-(
-Def_ItemType_CommonItem, # 一般物品
-Def_ItemType_AppointItem, # 特殊定制物品
-) = range(2)
-
-## 领取玩家充值豪礼奖励
-# @param giftNum:豪礼编号,从0开始
-# @return None
-def GetPlayerGoldGift(curPlayer, giftNum):
-
- # 检查可否领取
- if not __CheckCanGetGift(curPlayer, giftNum):
- GameWorld.DebugLog("return can not Get GoldGift!!!")
- return
-
- goldGiftInfo = ReadChConfig.GetEvalChConfig("GoldGiftInfo_%s" % giftNum)
-
- # 检查背包
- packSpace = ItemCommon.GetItemPackSpace(curPlayer, IPY_GameWorld.rptItem)
- needSpace = goldGiftInfo[Def_NeedSpace]
- if needSpace > packSpace:
- PlayerControl.NotifyCode(curPlayer, "GeRen_chenxin_998371")
- return
-
- # 给物品
- if not __GiveGoldGift(curPlayer, goldGiftInfo[Def_GiftInfo]):
- return
-
- # 全服提示
- notifyMark = goldGiftInfo[Def_NotifyMark]
- #如果有消息提示
- if notifyMark.strip() != "":
- PlayerControl.WorldNotify(0, notifyMark, [curPlayer.GetPlayerName()])
- vipLV = curPlayer.GetVIPLv()
- msgParamList = [vipLV, curPlayer.GetPlayerName(), giftNum + 1]
- PlayerControl.WorldNotify(0, "GeRen_liubo_927007", msgParamList)
-
- # 更新已领取成功标记
- __UpdateLVAwardGetRecord(curPlayer, giftNum)
-
- # 记录领取事件
- DataRecordPack.DR_GoldGiftGiveItem(curPlayer, giftNum)
-
- # 通知客户端
- Sync_GoldGiftGetRecordInfo(curPlayer)
- return
-
-
-## 通知充值豪礼领取记录信息
-# @param None
-# @return None
-def Sync_GoldGiftGetRecordInfo(curPlayer):
- #getRecord = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_GoldGiftGetRecord, 0,
- # ChConfig.Def_PDictType_GoldGift)
- #ChPlayer.Sync_RewardGetRecordInfo(curPlayer, ShareDefine.Def_RewardType_GoldGift, getRecord)
- return
-
-
-## 给玩家充值豪礼奖励物品
-# @param curPlayer:玩家实例
-# @param goldGiftInfoDict:充值豪礼物品配置字典
-# @return None
-def __GiveGoldGift(curPlayer, goldGiftInfoDict):
-
- goldGiftInfoList = __GetGoldGiftInfoList(curPlayer, goldGiftInfoDict)
-
- # 如果找不到对应的奖励信息,则返回False
- if not goldGiftInfoList:
- return False
-
- # 给物品
- for giftInfo in goldGiftInfoList:
- itemType = giftInfo[Def_InfoIndex_ItemType]
- itemCount = giftInfo[Def_InfoIndex_ItemCount]
- itemID = giftInfo[Def_InfoIndex_ItemID]
- isBind = 0
- if len(giftInfo) > Def_InfoIndex_IsBind:
- isBind = giftInfo[Def_InfoIndex_IsBind]
-
- if itemCount <= 0:
- continue
-
- # 一般物品
- if itemType == Def_ItemType_CommonItem:
- ItemControler.GivePlayerItem(curPlayer, itemID, itemCount, 0, [IPY_GameWorld.rptItem])
-
- # 特殊定制物品
- elif itemType == Def_ItemType_AppointItem:
- itemData = PyMapTable.GetPyMapTable("AppointItemList").GetRecord("ItemIndex", str(itemID))
- GameWorld.DebugLog("__GiveGoldGift itemData=%s" % itemData)
- if not itemData:
- GameWorld.ErrLog("__GiveGoldGift()itemType=%s,ItemIndex=%s not data" % (itemType, itemID))
- continue
-
- if len(itemData) != 1:
- GameWorld.ErrLog("__GiveGoldGift()itemType=%s,ItemIndex=%s,recordCount=%s !=1 error" % \
- (itemType, itemID, len(itemData)))
- continue
-
- itemDictData = itemData[0]
- itemDictData['IsBind'] = str(isBind)
- ItemControler.GivePlayerEquip(curPlayer, itemDictData)
-
- return True
-
-
-## 给玩家充值豪礼奖励物品信息列表
-# @param curPlayer:玩家实例
-# @param awardItemInfoDict:奖励物品配置字典
-# @return None
-def __GetGoldGiftInfoList(curPlayer, goldGiftInfoDict):
- infoKey = () # 默认key
- job = curPlayer.GetJob()
- for key in goldGiftInfoDict.keys():
- # 如果玩家职业在配置的key里,则取指定的key信息
- if job in key:
- infoKey = key
- break
-
- return goldGiftInfoDict[infoKey]
-
-
-## 更新领取记录
-# @param giftNum:豪礼编号,从0开始
-# @return None
-def __UpdateLVAwardGetRecord(curPlayer, giftNum):
-
- curValue = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_GoldGiftGetRecord, 0,
- ChConfig.Def_PDictType_GoldGift)
-
- curValue = curValue|(1 << giftNum)
-
- PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_GoldGiftGetRecord, curValue,
- ChConfig.Def_PDictType_GoldGift)
- return
-
-## 检查可否领取
-# @param giftNum:豪礼编号
-# @return True-可领取
-def __CheckCanGetGift(curPlayer, giftNum):
-
- needGoldCntList = ReadChConfig.GetEvalChConfig("NeedGoldCntList")
-
- # 非法索引
- if giftNum < 0 or giftNum >= len(needGoldCntList):
- GameWorld.ErrLog("__CheckCanGetGift() error:not giftNum=%s" % (giftNum))
- return False
-
- # 判断已冲元宝数是否满足
- curChangeCoin = curPlayer.GetChangeCoinPointTotal()
- curChangeGold = PlayerCoin.GetCoinRate() * curChangeCoin
- if curChangeGold < needGoldCntList[giftNum]:
- GameWorld.DebugLog("__CheckCanGetGift() curChangeGold not enough " + \
- "giftNum=%s,needGold=%s,changeGold=%s" % \
- (giftNum, needGoldCntList[giftNum], curChangeGold))
- return False
-
- # 判断是否已领取
- curValue = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_GoldGiftGetRecord, 0,
- ChConfig.Def_PDictType_GoldGift)
- return not (curValue & pow(2, giftNum))
-
##------------------------------------------------------------------------------
def DoFirstGoldOpen(curPlayer):
@@ -333,24 +149,6 @@
# @return: None
def OnDay(curPlayer):
PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_DailyChargeState, 0)
-
- #===============================================================================================
- # curChangeCoin = curPlayer.GetChangeCoinPointTotal()
- # # 今天之前有充值过才需要处理天天首充
- # if curChangeCoin > 0:
- # # 天天首充状态开启
- # dailyGoldState = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_DailyGoldChargeState, 0)
- # if not dailyGoldState:
- # UpdateDailyGoldState(curPlayer, 1)
- #
- # # 天天首充领奖状态 0-不可领;1-可领;2-已领
- # dailyGoldRecord = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_DailyGoldChargePrizeRecord, 0)
- # if dailyGoldRecord != 1:
- # UpdateDailyGoldRecord(curPlayer, 0)
- #===============================================================================================
-
- # 重置今日已充值数, 领取礼包索引
- #PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_DailyGoldChargeCnt, 0)
return
## 充值豪礼OnLogin
@@ -377,104 +175,6 @@
PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_DailyGoldChargeCnt, updDailyGoldCnt)
#PlayerControl.NotifyPlayerDictValue(curPlayer, ChConfig.Def_PDict_DailyGoldChargeCnt)
- # 天天首充已开启才处理
- dailyGoldState = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_DailyGoldChargeState, 0)
- if dailyGoldState:
- # 天天首充领奖状态 0-不可领;1-可领;2-已领
- dailyGoldRecord = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_DailyGoldChargePrizeRecord, 0)
- # 不可领的时候才置为可领
- if dailyGoldRecord == 0:
- UpdateDailyGoldRecord(curPlayer, 1)
-
- # 充值达到额定元宝获得奖励,邮件发送
- __GiveGoldGiftByMail(curPlayer)
- return
-
-## 玩家累计充值元宝发送邮件奖励
-# @param curPlayer: 玩家
-# @return: None
-def __GiveGoldGiftByMail(curPlayer):
- coinPointTotal = curPlayer.GetChangeCoinPointTotal()
- goldTotal = PlayerCoin.GetCoinRate() * coinPointTotal
- GameWorld.DebugLog("邮件发送充值豪礼:goldTotal=%s" % (goldTotal))
- if goldTotal <= 0:
- return
-
- goldGiftByMailList = ReadChConfig.GetEvalChConfig("GoldGiftByMail")
- playerID = curPlayer.GetPlayerID()
- for i, giftInfo in enumerate(goldGiftByMailList):
-
- needGold = giftInfo[0]
- giftItemList = giftInfo[1]
- mailTitle = giftInfo[2]
- mailContent = giftInfo[3]
- getDays = giftInfo[4]
-
- curMailRecord = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_GoldGiftMailRecord, 0,
- ChConfig.Def_PDictType_GoldGift)
-
- if curMailRecord&pow(2, i):
- GameWorld.DebugLog("邮件发送充值豪礼:已发送过!i=%s,needGold=%s" % (i, needGold))
- continue
-
- if goldTotal < needGold:
- continue
-
- if not PlayerControl.SendMail(mailTitle, mailContent, getDays, [playerID], giftItemList):
- continue
-
- updMailRecord = curMailRecord|pow(2, i)
- PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_GoldGiftMailRecord, updMailRecord,
- ChConfig.Def_PDictType_GoldGift)
-
- GameWorld.DebugLog("邮件发送充值豪礼:i=%s,needGold=%s,giftItemList=%s,updMailRecord=%s"
- % (i, needGold, str(giftItemList), updMailRecord))
- # 流向
- DataRecordPack.DR_GoldGiftGiveItem(curPlayer, "GoldGiftSendMail_%s_%s" % (i, needGold))
- return
-
-## 领取玩家天天首充奖励
-# @param curPlayer
-# @return None
-def GetPlayerDailyGoldChargeGift(curPlayer):
-
- dailyGoldRecord = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_DailyGoldChargePrizeRecord, 0)
-
- if dailyGoldRecord != 1:
- GameWorld.DebugLog("天天首充不可领!当前状态=%s" % dailyGoldRecord)
- return
-
- dailyFirstGoldPrizeInfo = ReadChConfig.GetEvalChConfig("GoldGiftInfoFirstDaily")
-
- # 检查背包
- packSpace = ItemCommon.GetItemPackSpace(curPlayer, IPY_GameWorld.rptItem)
- needSpace = dailyFirstGoldPrizeInfo[Def_NeedSpace]
- if needSpace > packSpace:
- PlayerControl.NotifyCode(curPlayer, "GeRen_chenxin_998371")
- return
-
- # 给物品
- if not __GiveGoldGift(curPlayer, dailyFirstGoldPrizeInfo[Def_GiftInfo]):
- return
-
- # 全服提示
- notifyMark = dailyFirstGoldPrizeInfo[Def_NotifyMark]
- if notifyMark:
- PlayerControl.WorldNotify(0, notifyMark, [curPlayer.GetPlayerName()])
-
- UpdateDailyGoldRecord(curPlayer, 2)
-
- # 记录领取事件
- DataRecordPack.DR_GoldGiftGiveItem(curPlayer, "dailyFirstGoldPrize")
- return
-
-
-## 更新天天首充奖励记录
-# @param curPlayer
-# @return None
-def UpdateDailyGoldRecord(curPlayer, record):
- #PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_DailyGoldChargePrizeRecord, record)
- #Sync_DailyGoldRecordInfo(curPlayer)
return
def Sync_FirstGoldInfo(curPlayer):
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerTruck.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerTruck.py
index 752fddc..60ffbd4 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerTruck.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerTruck.py
@@ -52,7 +52,6 @@
import PlayerBillboard
import PlayerActivity
import PlayerSuccess
-import PyMapTable
import ItemCommon
import ItemControler
import QuestCommon
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/RemoteQuery/GY_Query_ExamGivePlayerReward.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/RemoteQuery/GY_Query_ExamGivePlayerReward.py
index c438517..45a7fe0 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/RemoteQuery/GY_Query_ExamGivePlayerReward.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/RemoteQuery/GY_Query_ExamGivePlayerReward.py
@@ -24,7 +24,6 @@
import PlayerControl
import ShareDefine
import EventShell
-import PyMapTable
#---------------------------------------------------------------------
Def_Exp_Formula = { ShareDefine.Def_Game_Exam_ZGTX:'ZGTX_GiveExp', #智冠天下
ShareDefine.Def_Game_Exam_BSL:'BSL_GiveExp', #变色龙
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/PyMapTable.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/PyMapTable.py
deleted file mode 100644
index ed4f7f4..0000000
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/PyMapTable.py
+++ /dev/null
@@ -1,70 +0,0 @@
-#!/usr/bin/python
-# -*- coding: GBK -*-
-#
-#
-##@package PyMapTable.py
-# @todo: py表(包括函数、类)
-# @author:hxp
-# @date 2013-10-15 21:10
-# @version 2.0
-#
-# 简要说明:
-# 详细描述:
-# @change: "2014-03-26 20:40" xmnathan 装备进阶表
-# @change: "2014-06-21 15:20" hxp 自定义商店表
-# @change: "2014-10-16 11:30" xmnathan 增加守护附加属性表
-# @change: "2014-11-11 16:00" hxp 增加成就表
-# @change: "2015-02-26 12:00" hxp 增加大师表
-# @change: "2015-05-15 16:30" hxp 增加装备升级经验表
-# @change: "2015-07-27 14:00" hxp 增加强化属性及强化比例表
-# @change: "2015-07-28 11:20" ljd 增加消费VIP表
-# @change: "2015-08-19 13:50" xdh 修改表格获取方式,支持重读
-# @change: "2016-01-26 15:00" hxp PY表支持重读
-#---------------------------------------------------------------------
-"""Version = 2016-01-26 15:00"""
-#---------------------------------------------------------------------
-#导入
-import PythonData
-import ShareDefine
-import GameWorld
-import ReadChConfig
-
-AllTableInfo = {} # 存储表格信息字典
-
-## 获取表格信息
-# @param tableName 文件名
-# @return 表信息
-def GetPyMapTable(tableName):
- global AllTableInfo
-
- #是否重读所有的配置表
- if GameWorld.GetGameWorld().GetGameWorldDictByKey(ShareDefine.Def_Notify_WorldKey_ReloadConfig):
- ReadChConfig.ClearAllConfig()
- else:
- #找到了,就返回
- if AllTableInfo.has_key(tableName):
- return AllTableInfo[tableName]
-
- table = PythonData.FileData("PyMapTable\\%s.txt" % tableName, 0, 2)
- AllTableInfo[tableName] = table
- return table
-
-## 清除配置
-# @param None
-# @return None
-def ClearPyMapTable():
- global AllTableInfo
-
- AllTableInfo = {}
- return
-
-## 获取条件获取一条py表格数据
-def FindTopOnePyTableData(tableName, fieldsConditionDict):
- pyTable = GetPyMapTable(tableName)
- resultList = pyTable.GetRecordByDic(fieldsConditionDict, 1)
- if len(resultList) <= 0:
- GameWorld.ErrLog("FindTopOnePyTableData()找不到数据!tableName=%s,condition=%s" % (tableName, str(fieldsConditionDict)))
- return {}
-
- return resultList[0]
-
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ReadChConfig.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ReadChConfig.py
index 8332ced..ec2fdd2 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ReadChConfig.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ReadChConfig.py
@@ -19,7 +19,6 @@
# @change: "2012-11-30 19:00" wdb 修改重读配置
# @change: "2013-06-27 14:30" wdb 修改eval后加入缓存
# @change: "2014-12-28 21:00" hxp PyMongoDataServer.ini配置读取
-# @change: "2015-08-19 13:50" xdh 支持重读pyMapTable
# @change: "2017-07-03 20:00" hxp DB路径下配置文件读取支持
#---------------------------------------------------------------------
"""Version = 2017-07-03 20:00"""
@@ -32,7 +31,6 @@
import ConfigParser
import ShareDefine
import MapConfig
-import PyMapTable
#---------------------------------------------------------------------
#全局变量
#---------------------------------------------------------------------
@@ -119,7 +117,6 @@
MapConfig.ClearConfig()
- PyMapTable.ClearPyMapTable()
GameWorld.Log('MapServer_Reload_ChConfig')
#关闭字典
GameWorld.GetGameWorld().SetGameWorldDict(ShareDefine.Def_Notify_WorldKey_ReloadConfig , 0)
--
Gitblit v1.8.0