From 5831ac5f8c886bf92182a8a40267881784eb6b4e Mon Sep 17 00:00:00 2001
From: hxp <ale99527@vip.qq.com>
Date: 星期五, 05 九月 2025 15:12:03 +0800
Subject: [PATCH] 16 卡牌服务端(优化功能开启命令限制的等级、境界;优化任务开启功能,完成任意任务可开启之前已完成任务可开启的功能;)
---
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerFeastWeekParty.py | 2
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Item/ChEquip.py | 553 -------------------------
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerTask.py | 2
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Item/ItemControler.py | 1
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerActivity.py | 3
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ShareDefine.py | 42 -
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerTreasure.py | 5
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerWeekParty.py | 2
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerBillboard.py | 6
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerPrestigeSys.py | 8
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/FBProcess/FBCommon.py | 3
/dev/null | 308 --------------
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/PyNetPack.ini | 102 ----
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/EventReport.py | 7
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Item/UseItem/ItemCommon.py | 92 ----
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GM/Commands/OpenFunc.py | 22
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/ChPlayer.py | 3
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerSuccess.py | 5
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/GameFuncComm.py | 50 -
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerControl.py | 59 --
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChConfig.py | 12
21 files changed, 40 insertions(+), 1,247 deletions(-)
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/PyNetPack.ini b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/PyNetPack.ini
index 7b83ca6..3f4abaf 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/PyNetPack.ini
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/PyNetPack.ini
@@ -134,26 +134,6 @@
PacketSubCMD_7=0x35
PacketCallFunc_7=OnHorseStarUp
-;玛雅加强
-[EquipPlus]
-ScriptName = Event\EventSrc\Operate_EquipPlus.py
-Writer = wdb
-Releaser = wdb
-RegType = 0
-RegisterPackCount = 3
-
-PacketCMD_1=0xA3
-PacketSubCMD_1=0x01
-PacketCallFunc_1=OnEquipMayaPlus
-
-PacketCMD_2=0xA3
-PacketSubCMD_2=0x16
-PacketCallFunc_2=OnEquipPlusEvolve
-
-PacketCMD_3=0xA5
-PacketSubCMD_3=0xC7
-PacketCallFunc_3=OnActivateMasterPlusLV
-
;npc交互
[FunctionNPCCommon]
ScriptName = Event\EventSrc\FunctionNPCCommon.py
@@ -205,27 +185,6 @@
PacketCMD_2=0xA3
PacketSubCMD_2=0x13
PacketCallFunc_2=OnItemDecompound
-
-;装备宝石
-[EquipStone]
-ScriptName = Event\EventSrc\Operate_EquipStone.py
-Writer = hxp
-Releaser = hxp
-RegType = 0
-RegisterPackCount = 3
-
-PacketCMD_1=0xA3
-PacketSubCMD_1=0x04
-PacketCallFunc_1=OnEquipEnchase
-
-PacketCMD_2=0xA3
-PacketSubCMD_2=0x05
-PacketCallFunc_2=OnEquipStonePick
-
-PacketCMD_3=0xA3
-PacketSubCMD_3=0x06
-PacketCallFunc_3=OnEquipStoneUpgrade
-
;玩家战斗相关
[PlayerBattle]
@@ -898,38 +857,6 @@
PacketSubCMD_4=0x46
PacketCallFunc_4=OnBuyTongTianLing
-;装备洗练
-[EquipWash]
-ScriptName = Event\EventSrc\Operate_EquipWash.py
-Writer = hxp
-Releaser = hxp
-RegType = 0
-RegisterPackCount = 2
-
-PacketCMD_1=0xA3
-PacketSubCMD_1=0x25
-PacketCallFunc_1=OnEquipWashAttr
-
-PacketCMD_2=0xA3
-PacketSubCMD_2=0x26
-PacketCallFunc_2=OnEquipWashAttrChangeOK
-
-;装备进阶
-[EquipEvolve]
-ScriptName = Event\EventSrc\Operate_EquipEvolve.py
-Writer = hxp
-Releaser = hxp
-RegType = 0
-RegisterPackCount = 2
-
-PacketCMD_1=0xA3
-PacketSubCMD_1=0x30
-PacketCallFunc_1=OnEquipEvolve
-
-PacketCMD_2=0xA3
-PacketSubCMD_2=0x31
-PacketCallFunc_2=OnEquipShenDecompose
-
;NPC
[NPCCommon]
ScriptName = NPC\NPCCommon.py
@@ -1013,23 +940,6 @@
PacketCMD_1=0xAB
PacketSubCMD_1=0x11
PacketCallFunc_1=OnQueryOpenServerCampaignAward
-
-;装备分解
-[EquipDecompose]
-ScriptName = Player\PlayerEquipDecompose.py
-Writer = xdh
-Releaser = xdh
-RegType = 0
-RegisterPackCount = 2
-
-PacketCMD_1=0xA3
-PacketSubCMD_1=0x2C
-PacketCallFunc_1=OnDoEquipDecompose
-
-PacketCMD_2=0xA3
-PacketSubCMD_2=0x2D
-PacketCallFunc_2=OnDecomposeSetingSave
-
;寻宝
[PlayerTreasure]
@@ -1319,18 +1229,6 @@
PacketCMD_1=0xAA
PacketSubCMD_1=0x08
PacketCallFunc_1=OnStartLuckyTreasure
-
-;公共部位星数
-[Operate_EquipStar]
-ScriptName = Event\EventSrc\Operate_EquipStar.py
-Writer = xdh
-Releaser = xdh
-RegType = 0
-RegisterPackCount = 1
-
-PacketCMD_1=0xA5
-PacketSubCMD_1=0xC5
-PacketCallFunc_1=OnEquipPartStarUp
;日常活动
[PlayerActivity]
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChConfig.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChConfig.py
index a915e37..8ad51ea 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChConfig.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChConfig.py
@@ -3622,12 +3622,6 @@
Def_PDict_PetTrainLV = "PetTrainLV_%s" # 灵宠培养等阶,参数(培养类型)
Def_PDict_PetTrainItemCount = "PetTrainItemCount_%s" # 灵宠培养当前阶已吃培养丹个数,参数(培养类型)
-#装备分解
-Def_PDict_EquipDecomposeLV = "EquipDecomposeLV" #等级
-Def_PDict_EquipDecomposeExp = "EquipDecomposeExp" #经验
-Def_PDict_EquipDecomposeSeting = "EquipDecomposeSeting" #设置数据
-Def_PDict_EquipDecomposeCnt = "EquipDecomposeCnt" #已分解件数
-
#试炼之塔
Def_Player_Dict_TrialTower_PassLV = "TrialTower_PassLV" # 试炼之塔通关层数
Def_Player_Dict_TrialTower_LastDayPassLV = "Tower_LastDayPassLV" # 试炼之塔昨日通关层数
@@ -4887,12 +4881,6 @@
CME_FB_RunDaily:"日常跑环",
CME_FB_RunFamily:"战盟跑环",
}
-
-# 功能对应的事件记录类型
-FuncCMEDict = {
- ShareDefine.GameFuncID_RunDaily:CME_FB_RunDaily,
- ShareDefine.GameFuncID_RunFamily:CME_FB_RunFamily,
- }
# 需要发送到任务事件扩展记录的类型 ShareDefine.Def_UserAction_ExMissionLog
CME_Ex_Log_List = [CME_Class_Horse, CME_Class_Wing, CME_Class_Official]
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Event/EventSrc/Operate_EquipEvolve.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Event/EventSrc/Operate_EquipEvolve.py
deleted file mode 100644
index 1613f68..0000000
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Event/EventSrc/Operate_EquipEvolve.py
+++ /dev/null
@@ -1,201 +0,0 @@
-#!/usr/bin/python
-# -*- coding: GBK -*-
-#-------------------------------------------------------------------------------
-#
-##@package Event.EventSrc.Operate_EquipEvolve
-#
-# @todo:装备神装进阶
-# @author hxp
-# @date 2021-06-17
-# @version 1.0
-#
-# 详细描述: 装备神装进阶
-#
-#-------------------------------------------------------------------------------
-#"""Version = 2021-06-17 18:30"""
-#-------------------------------------------------------------------------------
-
-import GameWorld
-import ItemCommon
-import IPY_GameWorld
-import PlayerControl
-import IpyGameDataPY
-import ChPyNetSendPack
-import NetPackCommon
-import ItemControler
-import ShareDefine
-import ChConfig
-import ChEquip
-
-import math
-import json
-
-
-#// A3 30 装备神装进阶 #tagCMEquipEvolve
-#
-#struct tagCMEquipEvolve
-#{
-# tagHead Head;
-# BYTE EquipIndex; // 要进阶的装备在装备背包中索引
-#};
-def OnEquipEvolve(index, clientData, tick):
- curPlayer = GameWorld.GetPlayerManager().GetPlayerByIndex(index)
- playerID = curPlayer.GetPlayerID()
- equipIndex = clientData.EquipIndex
- GameWorld.DebugLog("神装进阶: equipIndex=%s" % equipIndex)
- equipPack = curPlayer.GetItemManager().GetPack(IPY_GameWorld.rptEquip)
- curEquip = equipPack.GetAt(equipIndex)
- if not ItemCommon.CheckItemCanUse(curEquip):
- return
- equipItemID = curEquip.GetItemTypeID()
- equipClassLV = ItemCommon.GetItemClassLV(curEquip)
- GameWorld.DebugLog(" equipItemID=%s,equipClassLV=%s" % (equipItemID, equipClassLV))
- ipyData = IpyGameDataPY.GetIpyGameData("EquipShenEvolve", equipItemID)
- if not ipyData:
- return
- evolveEquipID = ipyData.GetEvolveEquipID()
- needItemIDInfoList = ipyData.GetEvolveNeedItemIDInfo()
-
- evolveEquipItemData = GameWorld.GetGameData().GetItemByTypeID(evolveEquipID)
- if not evolveEquipItemData:
- return
-
- itemPack = curPlayer.GetItemManager().GetPack(IPY_GameWorld.rptItem)
- lackItemDict, delInfoDict = ItemCommon.GetCostItemIndexList(needItemIDInfoList, itemPack)
- if lackItemDict:
- GameWorld.DebugLog(" 所需进阶材料不足!equipItemID=%s,evolveEquipID=%s,needItemIDInfoList=%s,lackItemDict=%s"
- % (equipItemID, evolveEquipID, needItemIDInfoList, lackItemDict), playerID)
- return
-
- #扣消耗
- infoDict = {ChConfig.Def_Cost_Reason_SonKey:evolveEquipID}
- ItemCommon.DelCostItem(curPlayer, itemPack, delInfoDict, "EquipEvolve", infoDict)
-
- # 原装备替换成进阶装备
- evolveEquip = ItemControler.GetOutPutItemObj(evolveEquipID, curPlayer=curPlayer)
- if not evolveEquip:
- return
- curEquip.AssignItem(evolveEquip)
- curPlayer.Sync_MakeItemAnswer(ShareDefine.Def_mitEquipEvolve, ChConfig.Def_ComposeState_Sucess)
- GameWorld.Log("进阶神装成功! equipItemID=%s,evolveEquipID=%s" % (equipItemID, evolveEquipID), playerID)
-
- #刷新属性
- ChEquip.RefreshPlayerEquipAttribute(curPlayer, equipClassLV)
- playControl = PlayerControl.PlayerControl(curPlayer)
- playControl.RefreshPlayerAttrState()
- return
-
-
-#// A3 31 装备神装拆解 #tagCMEquipShenDecompose
-#
-#struct tagCMEquipShenDecompose
-#{
-# tagHead Head;
-# BYTE Count; //所在背包索引的数量
-# WORD IndexList[Count]; //所在背包索引列表
-#};
-def OnEquipShenDecompose(index, clientData, tick):
- curPlayer = GameWorld.GetPlayerManager().GetPlayerByIndex(index)
- indexList = clientData.IndexList
-
- GameWorld.DebugLog("神装分解: indexList=%s" % indexList)
-
- isAuctionItem = 0
- decomposeEquipIDList = [] # 已分解的神装装备ID列表
- getItemCountDict = {} # 分解后获得的物品列表
- itemPack = curPlayer.GetItemManager().GetPack(IPY_GameWorld.rptItem)
- for index in indexList:
- curEquip = itemPack.GetAt(index)
-
- if not ItemCommon.CheckItemCanUse(curEquip):
- continue
-
- getItemIDCountDict = {}
- equipItemID = curEquip.GetItemTypeID()
- GameWorld.DebugLog(" 检查分解神装: index=%s,equipItemID=%s" % (index, equipItemID))
- getEquipItemID = CheckEquipShenDecompose(equipItemID, getItemIDCountDict)
- if equipItemID == getEquipItemID:
- continue
-
- getItemList = [[itemID, itemCount, isAuctionItem] for itemID, itemCount in getItemIDCountDict.items()]
- GameWorld.DebugLog(" 分解后可获得装备: getEquipItemID=%s, getItemList=%s" % (getEquipItemID, getItemList))
- if not ItemControler.CheckPackSpaceEnough(curPlayer, getItemList):
- break
-
- getEquipObj = ItemControler.GetOutPutItemObj(getEquipItemID, curPlayer=curPlayer)
- if not getEquipObj:
- continue
-
- # 给分解后的物品及材料
- curEquip.AssignItem(getEquipObj)
- for itemID, itemCount, isAuctionItem in getItemList:
- ItemControler.GivePlayerItem(curPlayer, itemID, itemCount, isAuctionItem, [IPY_GameWorld.rptItem],
- event=["EquipShenDecompose", False, {"equipItemID":equipItemID}])
- getItemCountDict[itemID] = getItemCountDict.get(itemID, 0) + itemCount
-
- # 统计累加
- decomposeEquipIDList.append(equipItemID)
- getItemCountDict[getEquipItemID] = getItemCountDict.get(getEquipItemID, 0) + 1
-
-
- ## 通知分解结果
- if not getItemCountDict:
- return
-
- getItemDataList = [[itemID, itemCount, isAuctionItem] for itemID, itemCount in getItemCountDict.items()]
- GameWorld.DebugLog(" 已分解装备ID: %s" % decomposeEquipIDList)
- GameWorld.DebugLog(" 获得物品列表: %s" % getItemDataList)
-
- getItemInfo = json.dumps(getItemDataList, ensure_ascii=False)
- clientPack = ChPyNetSendPack.tagMCEquipDecomposeRet()
- clientPack.Clear()
- clientPack.DecomposeEquipIDList = decomposeEquipIDList
- clientPack.DecomposeEquipIDCount = len(clientPack.DecomposeEquipIDList)
- clientPack.GetItemData = str(getItemInfo)
- clientPack.GetItemLen = len(clientPack.GetItemData)
- NetPackCommon.SendFakePack(curPlayer, clientPack)
- return
-
-def CheckEquipShenDecompose(equipItemID, getItemIDCountDict):
- # 非神装无法分解
- ipyData = IpyGameDataPY.GetIpyGameDataNotLog("EquipShenAttr", equipItemID)
- if not ipyData:
- GameWorld.DebugLog(" 非神装,无法分解!equipItemID=%s" % equipItemID)
- return equipItemID
-
- EquipShenDecomposeIDMap = GetEquipShenDecomposeIDMap()
- if equipItemID not in EquipShenDecomposeIDMap:
- GameWorld.DebugLog(" 未找到原进化装备,无法分解!equipItemID=%s" % equipItemID)
- return equipItemID
-
- decomposeID = EquipShenDecomposeIDMap[equipItemID]
- evolveIpyData = IpyGameDataPY.GetIpyGameData("EquipShenEvolve", decomposeID)
- if not evolveIpyData:
- return equipItemID
-
- getItemIDInfoList = evolveIpyData.GetEvolveNeedItemIDInfo()
- decomposeGetItemPer = IpyGameDataPY.GetFuncCfg("EquipShenDecompose", 1)
- GameWorld.DebugLog(" 可分解神装: equipItemID=%s,decomposeID=%s,getItemIDInfoList=%s"
- % (equipItemID, decomposeID, getItemIDInfoList))
-
- # 分解获得80%原材料,个数向上取整
- for getItemID, srcCount in getItemIDInfoList:
- getCount = int(math.ceil(srcCount * decomposeGetItemPer / 100.0))
- getItemIDCountDict[getItemID] = getItemIDCountDict.get(getItemID, 0) + getCount
-
- return CheckEquipShenDecompose(decomposeID, getItemIDCountDict)
-
-def GetEquipShenDecomposeIDMap():
- key = "EquipShenDecomposeIDMap"
- EquipShenDecomposeIDMap = IpyGameDataPY.GetConfigEx(key)
- if not EquipShenDecomposeIDMap:
- EquipShenDecomposeIDMap = {}
- ipyDataMgr = IpyGameDataPY.IPY_Data()
- for index in xrange(ipyDataMgr.GetEquipShenEvolveCount()):
- ipyData = ipyDataMgr.GetEquipShenEvolveByIndex(index)
- equipID = ipyData.GetEquipItemID()
- evolveEquipID = ipyData.GetEvolveEquipID()
- EquipShenDecomposeIDMap[evolveEquipID] = equipID # 分解的则反向映射
- IpyGameDataPY.SetConfigEx(key, EquipShenDecomposeIDMap)
- return EquipShenDecomposeIDMap
-
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Event/EventSrc/Operate_EquipPlus.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Event/EventSrc/Operate_EquipPlus.py
deleted file mode 100644
index e9b7703..0000000
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Event/EventSrc/Operate_EquipPlus.py
+++ /dev/null
@@ -1,341 +0,0 @@
-#!/usr/bin/python
-# -*- coding: GBK -*-
-#-------------------------------------------------------------------------------
-#
-#-------------------------------------------------------------------------------
-#
-##@package Event.EventSrc.Operate_EquipPlus
-#
-# @todo:部位强化公共模式强化
-# @author hxp
-# @date 2015-12-15
-# @version 1.2
-#
-# 详细描述: 部位强化公共模式强化
-#
-# @change: "2016-06-30 21:30" hxp 强化达人开服活动
-# @change: "2016-10-08 18:00" hxp 自动购买物品价格统一取商城物品价格
-#
-#---------------------------------------------------------------------
-#"""Version = 2016-10-08 18:00"""
-#---------------------------------------------------------------------
-import ItemCommon
-import ShareDefine
-import PlayerControl
-import IPY_GameWorld
-import OpenServerCampaign
-import DataRecordPack
-import PlayerActivity
-import PlayerSuccess
-import IpyGameDataPY
-import PlayerActLogin
-import PlayerActTask
-import GameWorld
-import ChConfig
-import ChEquip
-import ChPyNetSendPack
-import NetPackCommon
-import PlayerWeekParty
-import PlayerTongTianLing
-#-------------------------------------------------------------------------------------------
-
-#===============================================================================
-# //A3 01 装备强化 #tagEquipPlus
-# struct tagEquipPlus
-# {
-# tagHead Head;
-# BYTE PackType; //背包类型:rptItem, rptEquip, rptPetEquip1~5
-# WORD ItemIndex; //物品在背包中索引
-# };
-#===============================================================================
-## 装备强化
-# @param playerIndex: 玩家
-# @param clientData: 封包
-# @param tick: 当前时间
-# @return None
-def OnEquipMayaPlus(playerIndex, clientData, tick):
- curPlayer = GameWorld.GetPlayerManager().GetPlayerByIndex(playerIndex)
- playerID = curPlayer.GetPlayerID()
-
- packType = clientData.PackType
- index = clientData.ItemIndex
-
- # 判断 1.装备 2.最高强化等级, 3.铜钱数
- if packType not in ChConfig.Pack_EquipPart_CanPlusStar:
- #GameWorld.DebugLog("packType not in ChConfig.Pack_EquipPart_CanPlusStar", playerID)
- return
-
- ipyData = IpyGameDataPY.GetIpyGameDataByCondition('EquipPlaceIndexMap', {'GridIndex':index})
- if not ipyData:
- return
- equipPlace = ipyData.GetEquipPlace()
- equipPlaceList = ChConfig.Pack_EquipPart_CanPlusStar[packType]
- if equipPlace not in equipPlaceList:
- #GameWorld.Log("index=%s, equipPlace=%s not in ChConfig.Pack_EquipPart_CanPlusStar" % (index, equipPlace), playerID)
- return
-
- # 暂不判断开启等级由客户端处理
- # 当前装备等级是否到达最高等级
- curPack = curPlayer.GetItemManager().GetPack(packType)
- curEquip = curPack.GetAt(index)
- if not curEquip or curEquip.IsEmpty():
- GameWorld.DebugLog("equip is empty")
- return
-
- findType = ChEquip.GetEquipPlusType(curEquip)
- if not findType:
- return
-
- curPartPlusLV = ChEquip.GetEquipPartPlusLV(curPlayer, packType, index)
- classLV = ItemCommon.GetItemClassLV(curEquip)
- plusMaxIpyData = IpyGameDataPY.GetIpyGameData("ItemPlusMax", findType, classLV)
- if not plusMaxIpyData:
- return
- plusLVMax = plusMaxIpyData.GetPlusLVMax()
- if curPartPlusLV >= plusLVMax:
- #GameWorld.DebugLog("强化达到本阶最大等级,无法强化! classLV=%s,plusLVMax=%s,curPartPlusLV=%s" % (classLV, plusLVMax, curPartPlusLV))
- return
- plusIpyData = IpyGameDataPY.GetIpyGameData("ItemPlus", findType, curPartPlusLV)
- if not plusIpyData:
- return
- costSilver = plusIpyData.GetCostCount()
- costItemInfo = plusIpyData.GetCostItemInfo()
- if not costSilver and not costItemInfo:
- #GameWorld.DebugLog("已到强化最大等级! curPartPlusLV=%s" % curPartPlusLV, playerID)
- return
-
- curEvolveLV = ChEquip.GetEquipPartPlusEvolveLV(curPlayer, packType, index) # 进化等级
- nextEvolveLV = curEvolveLV + 1
- evolveIpyData = IpyGameDataPY.GetIpyGameDataNotLog('EquipPlusEvolve', equipPlace, nextEvolveLV)
- if not evolveIpyData:
- return
- maxPlusLV = evolveIpyData.GetNeedPlusLV()
- if curPartPlusLV >= maxPlusLV:
- GameWorld.Log("已到当前强化最大等级,进化后增加强化等级上限! curPartPlusLV(%s) >= maxPlusLV(%s), curEvolveLV=%s"
- % (curPartPlusLV, maxPlusLV, curEvolveLV), playerID)
- return
-
- if costSilver and not PlayerControl.HaveMoney(curPlayer, IPY_GameWorld.TYPE_Price_Silver_Money, costSilver):
- GameWorld.DebugLog("铜钱不足,无法强化! costSilver=%s" % costSilver)
- return
-
- costItemID, costItemCount = 0, 0
- if costItemInfo:
- costItemID, costItemCount = costItemInfo
- itemPack = curPlayer.GetItemManager().GetPack(IPY_GameWorld.rptItem)
- hasEnough, itemIndexList = ItemCommon.GetItem_FromPack_ByID(costItemID, itemPack, costItemCount)
- if not hasEnough:
- GameWorld.DebugLog("材料不足,无法强化! costItemID=%s, costItemCount=%s" % (costItemID, costItemCount))
- return
-
- if costSilver:
- PlayerControl.PayMoney(curPlayer, IPY_GameWorld.TYPE_Price_Silver_Money, costSilver, isNotify=False)
-
- if costItemID:
- ItemCommon.ReduceItem(curPlayer, itemPack, itemIndexList, costItemCount, True, ChConfig.ItemDel_EquipPlus)
-
- isLVUp = False
- curExp = 0
- addExp = plusIpyData.GetAddExp()
- totalExp = plusIpyData.GetTotalExp()
- if addExp and totalExp:
- curExp = ChEquip.GetEquipPartProficiency(curPlayer, packType, index) + addExp
- if curExp >= totalExp:
- curExp = curExp - totalExp
- isLVUp = True
- else:
- isLVUp = True
-
- if isLVUp:
- curPartPlusLV += 1
- __EquipMayaPlusChange(curPlayer, packType, curEquip, index, curPartPlusLV)
-
- #DataRecordPack.DR_UpStarLVSuccess(curPlayer, curExp, curPartPlusLV)
- ChEquip.SetEquipPartProficiency(curPlayer, packType, index, curExp)
- ChEquip.NotifyEquipPartPlusLV(curPlayer, packType, index)
- PlayerActivity.AddDailyActionFinishCnt(curPlayer, ShareDefine.DailyActionID_EquipPlus)
- PlayerActLogin.AddLoginAwardActionCnt(curPlayer, ChConfig.Def_LoginAct_EquipPlus, 1)
- PlayerWeekParty.AddWeekPartyActionCnt(curPlayer, ChConfig.Def_WPAct_Plus, 1)
- PlayerTongTianLing.AddTongTianTaskValue(curPlayer, ChConfig.TTLTaskType_Plus, 1)
- PlayerActTask.AddActTaskValue(curPlayer, ChConfig.ActTaskType_EquipPlus)
- return
-
-def __EquipMayaPlusChange(curPlayer, packType, curEquip, index, updPlusLV):
- ## 玛雅加强等级改变
-
- ChEquip.SetEquipPartPlusLV(curPlayer, packType, index, curEquip, updPlusLV)
-
- broadCastLVList = IpyGameDataPY.GetFuncEvalCfg("StrengthenLevelBroadCast", 1)
- if updPlusLV in broadCastLVList:
- itemID = curEquip.GetItemTypeID()
- userData = curEquip.GetUserData()
- guid = ItemCommon.CacheNotifyEquipDetailInfo(curPlayer, curEquip)
- msgParamList = [curPlayer.GetPlayerName(), itemID, userData, guid, updPlusLV]
- PlayerControl.WorldNotify(0, "StrengthenCongratulation", msgParamList)
-
- classLV = ItemCommon.GetItemClassLV(curEquip)
-
- DoLogic_OnEquipPartStarLVChange(curPlayer, packType, classLV)
- # 强化成就
- __UpdateEquipPlusSuccess(curPlayer, classLV)
-
- # 开服活动数据
- #OpenServerCampaign.UpdOpenServerCampaignRecordData(curPlayer, ShareDefine.Def_Campaign_Type_Plus, ChEquip.GetTotalPlusLV(curPlayer))
- return
-
-def __UpdateEquipPlusSuccess(curPlayer, classLV):
- ipyDataList = IpyGameDataPY.GetIpyGameDataByCondition('EquipPlaceIndexMap', {'ClassLV':classLV}, True)
- if not ipyDataList:
- return
-
- totalPlusLV = ChEquip.GetTotalPlusLV(curPlayer)
- classPlusLV = 0
- packType = IPY_GameWorld.rptEquip
- plusLVCountDict = {}
- for ipyData in ipyDataList:
- index = ipyData.GetGridIndex()
- plusLV = ChEquip.GetEquipPartPlusLV(curPlayer, packType, index)
- if not plusLV:
- continue
- conditionKey = (classLV, plusLV)
- plusLVCountDict[conditionKey] = plusLVCountDict.get(conditionKey, 0) + 1
- classPlusLV += plusLV
-
- #GameWorld.DebugLog("强化成就数据: classLV=%s,plusLVCountDict=%s,classPlusLV=%s,totalPlusLV=%s" % (classLV, plusLVCountDict, classPlusLV, totalPlusLV))
- PlayerSuccess.UpdateSuccessProgressByConditions(curPlayer, ShareDefine.SuccType_EquipPlus, plusLVCountDict)
- PlayerSuccess.UptateSuccessProgress(curPlayer, ShareDefine.SuccType_EquipPlusTotal, totalPlusLV)
- PlayerSuccess.UptateSuccessProgress(curPlayer, ShareDefine.SuccType_EquipPlusClass, classPlusLV, [classLV])
- return
-
-def DoLogic_OnEquipPartStarLVChange(curPlayer, packType, classLV):
- #先刷装备BUFF 再计算属性
- curPlayer.SetDict(ChConfig.Def_PlayerKey_AttrActivatyNotify, ChConfig.Def_AttrActivatyNotify_Plus)
- ChEquip.RefreshPlayerEquipAttribute(curPlayer, classLV)
-
- #刷新所有属性
- playControl = PlayerControl.PlayerControl(curPlayer)
- playControl.RefreshPlayerAttrState()
- return
-
-#// A3 16 装备强化进化 #tagCMEquipPlusEvolve
-#struct tagCMEquipPlusEvolve
-#{
-# tagHead Head;
-# WORD ItemIndex; //装备在背包中索引
-#};
-def OnEquipPlusEvolve(playerIndex, clientData, tick):
- curPlayer = GameWorld.GetPlayerManager().GetPlayerByIndex(playerIndex)
-
- equipPackindex = clientData.ItemIndex
-
- packType = IPY_GameWorld.rptEquip
- curPack = curPlayer.GetItemManager().GetPack(packType)
- curEquip = curPack.GetAt(equipPackindex)
- if not ItemCommon.CheckItemCanUse(curEquip):
- return
- curEvolveLV = ChEquip.GetEquipPartPlusEvolveLV(curPlayer, packType, equipPackindex)
- nextEvolveLV = curEvolveLV + 1
- equipPlace = curEquip.GetEquipPlace()
- ipyData = IpyGameDataPY.GetIpyGameData('EquipPlusEvolve', equipPlace, nextEvolveLV)
- if not ipyData:
- return
- needPlusLV = ipyData.GetNeedPlusLV()
- curPartPlusLV = ChEquip.GetEquipPartPlusLV(curPlayer, packType, equipPackindex)
- if curPartPlusLV < needPlusLV:
- GameWorld.DebugLog("强化等级不足,无法进化! curPartPlusLV=%s < needPlusLV=%s, nextEvolveLV=%s"
- % (curPartPlusLV, needPlusLV, nextEvolveLV))
- return
-
- costItemDict = ipyData.GetCostItem()
- delItemDict = {}
- itemPack = curPlayer.GetItemManager().GetPack(IPY_GameWorld.rptItem)
- for itemID, itemCnt in costItemDict.items():
- hasEnough, indexList, findItemIsBind, lackCnt = ItemCommon.GetItem_FromPack_ByID_ExEx(itemID, itemPack, itemCnt)
- if not hasEnough:
- GameWorld.DebugLog('装备强化进化 材料不足itemID= %s,itemCnt=%s' % (itemID, itemCnt))
- return
- delItemDict[tuple(indexList)] = itemCnt
- for itemIndexList, delCnt in delItemDict.items():
- ItemCommon.ReduceItem(curPlayer, itemPack, itemIndexList, delCnt, True, ChConfig.ItemDel_EquipPlus)
-
- ChEquip.SetEquipPartPlusEvolveLV(curPlayer, packType, equipPackindex, nextEvolveLV)
- DoLogic_OnEquipPartStarLVChange(curPlayer, packType, ItemCommon.GetItemClassLV(curEquip))
- ChEquip.NotifyEquipPartPlusLV(curPlayer, packType, equipPackindex)
- return
-
-
-#// A5 C7 激活大师强化等级 #tagCMActivateMasterPlusLV
-#
-#struct tagCMActivateMasterPlusLV
-#{
-# tagHead Head;
-# BYTE ClassLV; // 所属装备阶
-# WORD MasterPlusLV; // 大师强化等级
-#};
-def OnActivateMasterPlusLV(index, clientData, tick):
-
- curPlayer = GameWorld.GetPlayerManager().GetPlayerByIndex(index)
- classLV = clientData.ClassLV
- actMasterPlusLV = clientData.MasterPlusLV
-
- curMasterPlusLV = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_EquipPartMasterPlusLV % classLV)
- if curMasterPlusLV >= actMasterPlusLV:
- # 已经激活过了
- GameWorld.DebugLog("已经激活过该强化大师等级了! actMasterPlusLV=%s,curMasterPlusLV=%s" % (actMasterPlusLV, curMasterPlusLV))
- return
-
- ipyData = IpyGameDataPY.GetIpyGameDataByCondition("ItemPlusMaster", {"ClassLV":classLV, "MasterPlusLV":actMasterPlusLV}, False, False)
- if not ipyData:
- GameWorld.DebugLog("不存在该强化大师等级! actMasterPlusLV=%s" % actMasterPlusLV)
- return
-
- packType = IPY_GameWorld.rptEquip
- # 判断可否激活
- for equipPlace in ChConfig.EquipPlace_Base:
- ipyData = IpyGameDataPY.GetIpyGameData('EquipPlaceIndexMap', classLV, equipPlace)
- if not ipyData:
- return
- equipIndex = ipyData.GetGridIndex()
- plusLV = ChEquip.GetEquipPartPlusLV(curPlayer, packType, equipIndex)
- if plusLV < actMasterPlusLV:
- GameWorld.DebugLog("部位强化等级不足,无法激活强化大师! equipPlace=%s,equipIndex=%s,plusLV=%s < %s"
- % (equipPlace, equipIndex, plusLV, actMasterPlusLV))
- return
-
- GameWorld.DebugLog("激活强化大师等级! classLV=%s,actMasterPlusLV=%s" % (classLV, actMasterPlusLV))
-
- PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_EquipPartMasterPlusLV % classLV, actMasterPlusLV)
-
- SyncEquipMasterPlusLVInfo(curPlayer, classLV)
- ChEquip.ChangeEquipEffectByPlusMaster(curPlayer, classLV)
- #刷新所有属性
- DoLogic_OnEquipPartStarLVChange(curPlayer, packType, classLV)
- return
-
-def SyncEquipMasterPlusLVInfo(curPlayer, classLV=0, isForce=False):
- ## 同步大师强化等级信息
- if not classLV:
- needSyncClassLVList = xrange(1, IpyGameDataPY.GetFuncCfg('EquipMaxClasslv') + 1)
- else:
- needSyncClassLVList = [classLV]
-
- masterPlusLVInfoList = []
- for classLV in needSyncClassLVList:
- masterPlusLV = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_EquipPartMasterPlusLV % classLV)
- if not masterPlusLV and not isForce:
- continue
- lvInfo = ChPyNetSendPack.tagMCMasterPlusLV()
- lvInfo.ClassLV = classLV
- lvInfo.MasterPlusLV = masterPlusLV
- masterPlusLVInfoList.append(lvInfo)
-
- if not masterPlusLVInfoList:
- return
-
- clientPack = ChPyNetSendPack.tagMCMasterPlusLVInfo()
- clientPack.MasterPlusLVInfoList = masterPlusLVInfoList
- clientPack.Count = len(masterPlusLVInfoList)
- NetPackCommon.SendFakePack(curPlayer, clientPack)
- return
-
-
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Event/EventSrc/Operate_EquipStar.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Event/EventSrc/Operate_EquipStar.py
deleted file mode 100644
index a498fae..0000000
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Event/EventSrc/Operate_EquipStar.py
+++ /dev/null
@@ -1,328 +0,0 @@
-#!/usr/bin/python
-# -*- coding: GBK -*-
-#-------------------------------------------------------------------------------
-#
-#-------------------------------------------------------------------------------
-#
-##@package Event.EventSrc.Operate_EquipStar
-#
-# @todo:公共部位星数
-# @author xdh
-# @date 2019-3-1
-# @version 1.0
-#
-# 详细描述: 公共部位星数
-#
-#
-#---------------------------------------------------------------------
-#"""Version = 2019-3-1 18:00"""
-#---------------------------------------------------------------------
-import ItemCommon
-import ShareDefine
-import PlayerControl
-import IPY_GameWorld
-import DataRecordPack
-import PlayerTongTianLing
-import PlayerWeekParty
-import IpyGameDataPY
-import PlayerSuccess
-import GameWorld
-import ChConfig
-import ChEquip
-
-import math
-#-------------------------------------------------------------------------------------------
-
-
-#// A5 C5 装备部位升星 #tagCMEquipPartStarUp
-#
-#struct tagCMEquipPartStarUp
-#{
-# tagHead Head;
-# WORD EquipPackIndex; // 部位格子索引
-# BYTE CostEquipCnt; // 装备个数
-# WORD CostEquipIndex[CostEquipCnt]; // 装备索引
-# DWORD CostEquipID[CostEquipCnt]; // 装备物品ID
-# BYTE AutoBuy; // 自动购买 0-不自动购买,1-自动购买并升星,2-自动购买预览(未满概率时预览消耗时使用)
-#};
-def OnEquipPartStarUp(playerIndex, clientData, tick):
- curPlayer = GameWorld.GetPlayerManager().GetPlayerByIndex(playerIndex)
- playerID = curPlayer.GetPlayerID()
-
- equipPackIndex = clientData.EquipPackIndex
- packType = IPY_GameWorld.rptEquip
-
- if packType not in ChConfig.Pack_EquipPart_CanPlusStar:
- return
- ipyData = IpyGameDataPY.GetIpyGameDataByCondition('EquipPlaceIndexMap', {'GridIndex':equipPackIndex})
- if not ipyData:
- return
- classLV = ipyData.GetClassLV()
- equipPlace = ipyData.GetEquipPlace()
- placeList = ChConfig.Pack_EquipPart_CanPlusStar[packType]
- if equipPlace not in placeList:
- GameWorld.Log(" equipPlace %s not in ChConfig.Pack_EquipPart_CanPlusStar" % equipPlace, playerID)
- return
-
- # 当前装备等级是否到达最高等级
- equipPack = curPlayer.GetItemManager().GetPack(packType)
- curEquip = equipPack.GetAt(equipPackIndex)
- if not ItemCommon.CheckItemCanUse(curEquip):
- GameWorld.DebugLog("OnEquipPartStarUp() equip is empty")
- return
-
- maxStar = ItemCommon.GetItemMaxStar(curEquip)
- curPartStar = ChEquip.GetEquipPartStar(curPlayer, equipPackIndex)
- if curPartStar >= maxStar:
- GameWorld.Log("OnEquipPartStarUp:curPartStar(%s) >= maxStar(%s)" % (curPartStar, maxStar), playerID)
- return
-
- itemPack = curPlayer.GetItemManager().GetPack(IPY_GameWorld.rptItem)
- costEquipIndexList = clientData.CostEquipIndex
- costEquipIDList = clientData.CostEquipID
- autoBuy = clientData.AutoBuy
-
- checkCostResult = __CheckCostInfo(curPlayer, classLV, equipPlace, curPartStar, costEquipIndexList, costEquipIDList, itemPack, autoBuy)
- if not checkCostResult:
- return
- curRate, delEquipGUIDDict, delItemInfoDict, lackItemCostMoney = checkCostResult
-
- if autoBuy:
- isAutoBuyPreview = autoBuy == 2
- # 概率未满 且 自动购买, 则需要执行拍卖行购买装备
- if curRate < 100:
- playerGoldPaper = curPlayer.GetGoldPaper()
- queryData = [classLV, equipPlace, curPartStar, equipPackIndex, isAutoBuyPreview, curRate, delEquipGUIDDict, delItemInfoDict, lackItemCostMoney, playerGoldPaper]
- #拍卖行删除
- return
-
- if lackItemCostMoney:
- if isAutoBuyPreview:
- # 满概率时自动购买必要材料的,暂不处理,前端自己判断就行
- return
-
- if not PlayerControl.HaveMoney(curPlayer, IPY_GameWorld.TYPE_Price_Gold_Paper, lackItemCostMoney):
- GameWorld.DebugLog("自动购买必要物品货币不足,无法升星! %s" % lackItemCostMoney, playerID)
- return
-
- elif lackItemCostMoney:
- GameWorld.DebugLog("缺少必要物品,不自动购买,无法升星! %s" % lackItemCostMoney, playerID)
- return
-
- # 升星处理
- buyEquipCostMoney = 0
- __DoEquipStarUp(curPlayer, classLV, equipPlace, curPartStar, equipPackIndex, curRate, delEquipGUIDDict, delItemInfoDict, lackItemCostMoney, buyEquipCostMoney)
- return
-
-def GameServer_EquipStarAutoBuy(curPlayer, result):
- ## GameServer自动购买拍品结果返回
- classLV, equipPlace, curPartStar, equipPackIndex, curRate, delEquipGUIDDict, delItemInfoDict, lackItemCostMoney, buyEquipCostMoney = result
- __DoEquipStarUp(curPlayer, classLV, equipPlace, curPartStar, equipPackIndex, curRate, delEquipGUIDDict, delItemInfoDict, lackItemCostMoney, buyEquipCostMoney)
- return
-
-def __DoEquipStarUp(curPlayer, classLV, equipPlace, curPartStar, equipPackIndex, curRate, delEquipGUIDDict, delItemInfoDict, lackItemCostMoney, buyEquipCostMoney):
- ## 执行装备部位升星
-
- playerID = curPlayer.GetPlayerID()
- #自动购买货币
- costMoneyTotal = lackItemCostMoney + buyEquipCostMoney
- if not PlayerControl.HaveMoney(curPlayer, IPY_GameWorld.TYPE_Price_Gold_Paper, costMoneyTotal):
- return
-
- nextStar = curPartStar + 1
- totalEquipStars = ChEquip.GetTotalEquipStars(curPlayer)
- if totalEquipStars < IpyGameDataPY.GetFuncCfg('EquipStarCustomized'):
- curRate = 100
- isOK = GameWorld.CanHappen(curRate, 100)
- GameWorld.DebugLog("装备升星最终总概率: %s, isOK=%s, lackItemCostMoney=%s,buyEquipCostMoney=%s"
- % (curRate, isOK, lackItemCostMoney, buyEquipCostMoney), playerID)
-
- itemPack = curPlayer.GetItemManager().GetPack(IPY_GameWorld.rptItem)
- #扣材料物品,因为可能还需要先到GameServer,再回MapServer扣除物品,故中间过程物品位置可能发生变化,所以这里不能直接通过index去扣物品,需要重新精确定位
- for delItemID, delCount in delItemInfoDict.items():
- if not delCount:
- continue
- hasEnough, indexList, findItemIsBind, lackCnt = ItemCommon.GetItem_FromPack_ByID_ExEx(delItemID, itemPack, delCount)
- GameWorld.DebugLog(" 扣除道具: delItemID=%s,delCount=%s,indexList=%s" % (delItemID, delCount, indexList))
- ItemCommon.ReduceItem(curPlayer, itemPack, indexList, delCount, True, ChConfig.ItemDel_EquipStarUp)
-
- delItemByGUIDDict = {}
- for index, itemGUID in delEquipGUIDDict.items():
- delCnt = 1
- curEquip = itemPack.GetAt(index)
- if not ItemCommon.CheckItemCanUse(curEquip) or curEquip.GetGUID() != itemGUID:
- delItemByGUIDDict[itemGUID] = delCnt
- continue
- GameWorld.DebugLog(" 扣除装备: index=%s, %s" % (index, itemGUID))
- ItemCommon.DelItem(curPlayer, curEquip, delCnt, recordName=ChConfig.ItemDel_EquipStarUp)
- if delItemByGUIDDict:
- GameWorld.DebugLog(" 扣除装备位置错误,通过GUID补扣! %s" % delItemByGUIDDict)
- ItemCommon.DelItemByGUID(curPlayer, itemPack, delItemByGUIDDict, recordName=ChConfig.ItemDel_EquipStarUp)
-
- drDict = {"PlayerID":playerID, "AccID":curPlayer.GetAccID(), "classLV":classLV, "equipPlace":equipPlace, "IsSuccess":isOK,
- "curRate":curRate, "nextStar":nextStar, 'totalEquipStars':totalEquipStars,
- "lackItemCostMoney":lackItemCostMoney, "buyEquipCostMoney":buyEquipCostMoney}
- if not PlayerControl.PayMoney(curPlayer, IPY_GameWorld.TYPE_Price_Gold_Paper, costMoneyTotal, ChConfig.Def_Cost_EquipStar, drDict):
- return
-
- if isOK:
- ChEquip.SetEquipPartStar(curPlayer, equipPackIndex, nextStar)
- ChEquip.NotifyEquipPartStar(curPlayer, equipPackIndex)
- result = ChConfig.Def_ComposeState_Sucess
- else:
- result = ChConfig.Def_ComposeState_Fail
- curPlayer.Sync_MakeItemAnswer(ShareDefine.Def_mitEquipStarUp, result)
- DataRecordPack.SendEventPack("EquipStarUp", drDict, curPlayer)
-
- PlayerTongTianLing.AddTongTianTaskValue(curPlayer, ChConfig.TTLTaskType_Star, 1)
-
- if not isOK:
- return
-
- updPartStar = ChEquip.GetEquipPartStar(curPlayer, equipPackIndex)
- GameWorld.DebugLog(" 装备升星 equipPackIndex=%s result=%s,curPartStar=%s,updPartStar=%s" % (equipPackIndex, result, curPartStar, updPartStar), playerID)
-
- # 成就
- EquipStarSuccess(curPlayer, classLV)
-
- # 星级变更时处理
- # 刷新属性
- ChEquip.RefreshPlayerEquipAttribute(curPlayer, classLV)
- playControl = PlayerControl.PlayerControl(curPlayer)
- playControl.RefreshPlayerAttrState()
-
- if updPartStar in IpyGameDataPY.GetFuncEvalCfg('EquipPartStarNotify'):
- equipPack = curPlayer.GetItemManager().GetPack(IPY_GameWorld.rptEquip)
- curEquip = equipPack.GetAt(equipPackIndex)
- if ItemCommon.CheckItemCanUse(curEquip):
- itemID = curEquip.GetItemTypeID()
- userData = curEquip.GetUserData()
- guid = ItemCommon.CacheNotifyEquipDetailInfo(curPlayer, curEquip)
- msgParamList = [curPlayer.GetPlayerName(), itemID, userData, guid, updPartStar]
- PlayerControl.WorldNotify(0, "StarLevelUp", msgParamList)
-
- PlayerWeekParty.AddWeekPartyActionCnt(curPlayer, ChConfig.Def_WPAct_Star, 1)
- return
-
-def __CheckCostInfo(curPlayer, classLV, equipPlace, curPartStar, costEquipIndexList, costEquipIDList, itemPack, isAutoBuy):
- nextStar = curPartStar + 1
- ipyData = IpyGameDataPY.GetIpyGameData("EquipStarUp", classLV, equipPlace, nextStar)
- if not ipyData:
- return
-
- costEquipCnt = ipyData.GetCostEquipCnt() # 是否消耗装备
- costEquipPlaceList = ipyData.GetCostEquipPlace()
- costEquipColorList = ipyData.GetCostEquipColor()
- isJobLimit = ipyData.GetIsJobLimit()
- delEquipGUIDDict = {}
- totalEquipStars = ChEquip.GetTotalEquipStars(curPlayer)
-
- if not costEquipCnt:
- curRate = 100 # 不用消耗装备的默认满概率
- else:
- curRate = 0 #成功概率
- diffClassChangeRatePerInfo = IpyGameDataPY.GetFuncEvalCfg("EquipStarRate", 1)
- unSuitRateRange = IpyGameDataPY.GetFuncEvalCfg("EquipStarRate", 2)
- suitRateRange = IpyGameDataPY.GetFuncEvalCfg("EquipStarRate", 3)
- if len(diffClassChangeRatePerInfo) != 2 or len(unSuitRateRange) != 2 or len(suitRateRange) != 2:
- GameWorld.ErrLog('升星不同阶概率配置错误!')
- return
-
- for i, index in enumerate(costEquipIndexList):
- costEquip = itemPack.GetAt(index)
- if not costEquip or costEquip.IsEmpty():
- return
- equipID = costEquip.GetItemTypeID()
- if equipID != costEquipIDList[i]:
- GameWorld.ErrLog(' 装备升星 客户端发的物品索引与实际物品ID不对应 index=%s,eatItemID=%s,wantEatItemID=%s' % (index, equipID, costEquipIDList[i]))
- return
- costEquipColor = costEquip.GetItemColor()
- costEquipPlace = costEquip.GetEquipPlace()
- if costEquipColor not in costEquipColorList:
- return
- if costEquipPlace not in costEquipPlaceList:
- return
- if isJobLimit and not ItemCommon.CheckJob(curPlayer, costEquip):
- return
-
- if costEquip.GetSuiteID():
- baseRate = ipyData.GetSuitRate()
- minRate, maxRate = suitRateRange
- else:
- baseRate = ipyData.GetUnSuitRate()
- minRate, maxRate = unSuitRateRange
-
- GameWorld.DebugLog("equipID=%s,baseRate=%s,minRate=%s,maxRate=%s" % (equipID, baseRate, minRate, maxRate))
- addRate = baseRate
- costClassLV = ItemCommon.GetItemClassLV(costEquip)
-
- #吞高阶
- if costClassLV > classLV:
- diffClassChangeRatePer = diffClassChangeRatePerInfo[0] * (costClassLV - classLV)
- addRate = int(math.ceil(round(baseRate * (100 + diffClassChangeRatePer) / 100.0, 2)))
- GameWorld.DebugLog(" 吞高阶 costClassLV=%s,classLV=%s,diffClassChangeRatePer=%s,addRate=%s" % (costClassLV, classLV, diffClassChangeRatePer, addRate))
- #吞低阶
- elif costClassLV < classLV:
- diffClassChangeRatePer = diffClassChangeRatePerInfo[1] * (classLV - costClassLV)
- addRate = int(math.ceil(round(baseRate * (100 - diffClassChangeRatePer) / 100.0, 2)))
- GameWorld.DebugLog(" 吞低阶 costClassLV=%s,classLV=%s,diffClassChangeRatePer=%s,addRate=%s" % (costClassLV, classLV, diffClassChangeRatePer, addRate))
- addRate = max(minRate, min(addRate, maxRate))
- curRate += addRate
- GameWorld.DebugLog(" 本件装备增加概率=%s,当前总概率=%s" % (addRate, curRate))
- delEquipGUIDDict[index] = costEquip.GetGUID()
-
- delItemInfoDict = {}
- lackItemCostMoney = 0
- costItemDict = ipyData.GetCostItemDict()
- if costItemDict:
- for itemID, itemCnt in costItemDict.items():
- hasEnough, indexList, findItemIsBind, lackCnt = ItemCommon.GetItem_FromPack_ByID_ExEx(itemID, itemPack, itemCnt)
- if not hasEnough:
- if not isAutoBuy:
- GameWorld.DebugLog(" 缺少必要物品,不自动购买!itemID=%s,lackCnt=%s" % (itemID, lackCnt))
- return
- itemGoldPaper = ItemCommon.GetShopItemPrice(itemID, IPY_GameWorld.TYPE_Price_Gold_Paper)
- if not itemGoldPaper:
- GameWorld.DebugLog(" 找不到物品自动购买消耗货币!itemID=%s,lackCnt=%s" % (itemID, lackCnt))
- return
- lackItemCostMoney += itemGoldPaper * lackCnt
- delCount = itemCnt - lackCnt
- GameWorld.DebugLog(" 缺少必要物品: itemID=%s,lackMoney(%s)*Count(%s)=%s" % (itemID, itemGoldPaper, lackCnt, itemGoldPaper * lackCnt))
- else:
- delCount = itemCnt
- delItemInfoDict[itemID] = delCount
-
- if totalEquipStars < IpyGameDataPY.GetFuncCfg('EquipStarCustomized'):
- curRate = 100
- #if curRate <= 0:
- # GameWorld.ErrLog('装备升星异常 概率为0!!classLV=%s, equipPlace=%s' % (classLV, equipPlace))
- # return
- if curRate >= IpyGameDataPY.GetFuncCfg("EquipStarRate", 4): # 优化高概率体验
- curRate = 100
-
- return curRate, delEquipGUIDDict, delItemInfoDict, lackItemCostMoney
-
-
-def EquipStarSuccess(curPlayer, classLV):
- ipyDataList = IpyGameDataPY.GetIpyGameDataByCondition('EquipPlaceIndexMap', {'ClassLV':classLV}, True)
- if not ipyDataList:
- return
-
- totalStarLV = ChEquip.GetTotalEquipStars(curPlayer)
- classStarLV = 0
- starCountDict = {}
- for ipyData in ipyDataList:
- index = ipyData.GetGridIndex()
- equipStar = ChEquip.GetEquipPartStar(curPlayer, index)
- if not equipStar:
- continue
- conditionKey = (classLV, equipStar)
- starCountDict[conditionKey] = starCountDict.get(conditionKey, 0) + 1
- classStarLV += equipStar
-
- #GameWorld.DebugLog("升星成就数据: classLV=%s,starCountDict=%s,classStarLV=%s,totalStarLV=%s" % (classLV, starCountDict, classStarLV, totalStarLV))
- PlayerSuccess.UpdateSuccessProgressByConditions(curPlayer, ShareDefine.SuccType_EquipStar, starCountDict)
- PlayerSuccess.UptateSuccessProgress(curPlayer, ShareDefine.SuccType_EquipStarTotal, totalStarLV)
- PlayerSuccess.UptateSuccessProgress(curPlayer, ShareDefine.SuccType_EquipStarClass, classStarLV, [classLV])
- return
-
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Event/EventSrc/Operate_EquipStone.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Event/EventSrc/Operate_EquipStone.py
deleted file mode 100644
index b91c448..0000000
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Event/EventSrc/Operate_EquipStone.py
+++ /dev/null
@@ -1,706 +0,0 @@
-#!/usr/bin/python
-# -*- coding: GBK -*-
-# -------------------------------------------------------------------------------
-#
-##@package Event.EventSrc.Operate_EquipStone
-#
-# @todo:装备宝石
-# @author hxp
-# @date 2017-07-29
-# @version 1.0
-#
-# 详细描述: 装备宝石
-#
-# -------------------------------------------------------------------------------
-# """Version = 2017-07-29 12:00"""
-# -------------------------------------------------------------------------------
-
-import GameWorld
-import ItemCommon
-import PlayerControl
-import IPY_GameWorld
-import ItemControler
-import IpyGameDataPY
-import ChConfig
-import ChEquip
-import OpenServerCampaign
-import ChPyNetSendPack
-import NetPackCommon
-import DataRecordPack
-import PlayerSuccess
-import PlayerWeekParty
-import ShareDefine
-import PyGameData
-
-g_stoneCanPlaceList = [] # 可镶嵌的位置
-
-
-# def OnLogin(curPlayer):
-# ###登录发包同步客户端宝石信息
-# Sycn_StoneHoleInfo(curPlayer)
-# return
-
-def GetAllStoneEquipIndexList():
- ###得到所有可镶嵌宝石装备位列表
- global g_stoneCanPlaceList
- if g_stoneCanPlaceList:
- return g_stoneCanPlaceList
- # 获得宝石类型数量
- GemTypeCount = IpyGameDataPY.GetFuncCfg("GemTypeCount")
- # 获得所有可镶嵌宝石装备位
- g_stoneCanPlaceList = []
- for stoneTypeIndex in xrange(1, GemTypeCount + 1):
- # 循环宝石类型对应的装备位
- placeList = IpyGameDataPY.GetFuncEvalCfg("GemType%s" % stoneTypeIndex, 1)
- for place in placeList:
- ipyDataList = IpyGameDataPY.GetIpyGameDataByCondition('EquipPlaceIndexMap', {'EquipPlace': place}, True)
- if not ipyDataList:
- continue
- for ipyData in ipyDataList:
- gridIndex = ipyData.GetGridIndex()
- if gridIndex not in g_stoneCanPlaceList:
- g_stoneCanPlaceList.append(gridIndex)
- return g_stoneCanPlaceList
-
-
-def GetAllEquipPlaceHoleIndex():
- ### 得到装备位所有孔位
- gemOpenNeedStarList = IpyGameDataPY.GetFuncEvalCfg("GemOpen", 1)
- maxEquipHoleCnt = len(gemOpenNeedStarList) # 最大装备阶级开放孔数
-
- gemOpenVipList = IpyGameDataPY.GetFuncEvalCfg("GemOpenVip", 1)
- maxHoleVipCnt = len(gemOpenVipList) # 最大Vip开放孔数
-
- return range(maxEquipHoleCnt) + range(ChConfig.Def_Stone_VipHole, ChConfig.Def_Stone_VipHole + maxHoleVipCnt)
-
-
-def GetEquipIndexStoneIDList(curPlayer, equipIndex):
- ### 装备位孔位宝石ID列表
-
- holeIndexList = GetAllEquipPlaceHoleIndex()
- holeStoneIDList = []
- for holeIndex in holeIndexList:
- stoneID = GetEquipIndexStoneIDAndIsBand(curPlayer, equipIndex, holeIndex)[0]
- holeStoneIDList.append(stoneID)
- return holeStoneIDList
-
-
-def GetEquipIndexStoneIDAndIsBand(curPlayer, equipIndex, holeIndex):
- '''获得装备位孔位宝石ID和绑定信息
- @return: stoneID, stoneIsBind
- '''
- # 获得装备位孔索引宝石存储信息
- stoneInfo = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_EquipPartStoneID % (equipIndex, holeIndex))
- # 获取装备位孔位上宝石ID
- stoneID = stoneInfo / ChConfig.Def_Stone_SaveStoneInfoXNumber
- # 获取装备位孔位上宝石是否绑定状态
- stoneIsBind = stoneInfo % ChConfig.Def_Stone_SaveStoneInfoXNumber
- return stoneID, stoneIsBind
-
-
-def SetEquipIndexStoneIDAndIsBand(curPlayer, equipIndex, holeIndex, changeStoneID, isBind):
- ### 保存装备位孔位宝石ID和绑定信息
- befStoneID, befIsBind = GetEquipIndexStoneIDAndIsBand(curPlayer, equipIndex, holeIndex)
- if befStoneID == changeStoneID and befIsBind == isBind:
- return
-
- isBind = 0 # 现绑定无用,默认存0
- PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_EquipPartStoneID % (equipIndex, holeIndex),
- changeStoneID * ChConfig.Def_Stone_SaveStoneInfoXNumber + isBind)
-
- # 同步更新宝石总等级
- gameData = GameWorld.GetGameData()
- befStoneLV = 0
- if befStoneID:
- befGem = gameData.GetItemByTypeID(befStoneID)
- befStoneLV = 0 if not befGem else befGem.GetEffectByIndex(0).GetEffectValue(1)
-
- aftStoneLV = 0
- if changeStoneID:
- aftGem = gameData.GetItemByTypeID(changeStoneID)
- aftStoneLV = 0 if not aftGem else aftGem.GetEffectByIndex(0).GetEffectValue(1)
-
- befTotalStoneLV = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_TotalStoneLV)
- updTotalStoneLV = max(0, befTotalStoneLV + aftStoneLV - befStoneLV)
- PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_TotalStoneLV, updTotalStoneLV)
- GameWorld.DebugLog(
- "设置宝石等级: equipIndex=%s,holeIndex=%s,befStoneLV=%s,aftStoneLV=%s,befTotalStoneLV=%s,updTotalStoneLV=%s"
- % (equipIndex, holeIndex, befStoneLV, aftStoneLV, befTotalStoneLV, updTotalStoneLV))
- return
-
-
-def GetPackTypeByEquipPlace(equipPlace):
- ##目前支持镶嵌普通装备
- equipPackType = IPY_GameWorld.rptEquip
- stonePackType = IPY_GameWorld.rptItem
- placeIndex = equipPlace
- return equipPackType, stonePackType, placeIndex
-
-
-# //A3 04 宝石镶嵌或替换 #tagCMEquipEnchase
-# struct tagCMEquipEnchase
-# {
-# tagHead Head;
-# BYTE EquipIndex; //装备位索引
-# BYTE StoneIndex; //宝石所在玩家物品背包索引
-# BYTE HoleIndex; //选择的孔索引
-# };
-def OnEquipEnchase(playerIndex, clientData, tick):
- curPlayer = GameWorld.GetPlayerManager().GetPlayerByIndex(playerIndex)
- playerID = curPlayer.GetPlayerID()
-
- # 验证背包类型合法性
- equipPackIndex = clientData.EquipIndex
- stoneIndex = clientData.StoneIndex
- holeIndex = clientData.HoleIndex
-
- GameWorld.DebugLog("宝石镶嵌: equipPackIndex=%s,stoneIndex=%s,holeIndex=%s" % (equipPackIndex, stoneIndex, holeIndex),
- playerID)
- equipPackType, stonePackType, placeIndex = GetPackTypeByEquipPlace(equipPackIndex)
-
- # 获得装备位装备实例
- equipPack = curPlayer.GetItemManager().GetPack(equipPackType)
- curEquip = equipPack.GetAt(placeIndex)
-
- if not ItemCommon.CheckItemCanUse(curEquip):
- GameWorld.Log("目标装备为空或不可用,无法镶嵌!", playerID)
- return
-
- # 获得宝石实例
- itemPack = curPlayer.GetItemManager().GetPack(stonePackType)
- curStone = itemPack.GetAt(stoneIndex)
-
- if not ItemCommon.CheckItemCanUse(curStone):
- GameWorld.Log("目标宝石为空或不可用,无法镶嵌!", playerID)
- return
-
- stoneItemID = curStone.GetItemTypeID()
- isBind = curStone.GetIsBind()
- curStoneEff = curStone.GetEffectByIndex(0)
- curEffID = curStoneEff.GetEffectID()
- if curEffID != ChConfig.Def_Effect_EquipStone:
- GameWorld.Log("不是宝石,无法镶嵌!stoneIndex=%s,stoneItemID=%s,curEffID=%s != %s"
- % (stoneIndex, stoneItemID, curEffID, ChConfig.Def_Effect_EquipStone), playerID)
- return
-
- stoneEffType = curStoneEff.GetEffectValue(0)
- stoneCanPlaceList = IpyGameDataPY.GetFuncEvalCfg("GemType%s" % stoneEffType, 1)
- ipyData = IpyGameDataPY.GetIpyGameDataByCondition('EquipPlaceIndexMap', {'GridIndex': equipPackIndex})
- if not ipyData:
- return
- classLV = ipyData.GetClassLV()
- if ipyData.GetEquipPlace() not in stoneCanPlaceList:
- GameWorld.Log("该宝石不可镶嵌在该装备位!stoneItemID=%s,stoneEffType=%s,stoneCanPlaceList=%s,equipPackIndex=%s"
- % (stoneItemID, stoneEffType, stoneCanPlaceList, equipPackIndex), playerID)
- return
-
- equipStar = ChEquip.GetEquipPartStarByRank(curPlayer, placeIndex, curEquip)
- if not __CheckStoneHoleCanUse(curPlayer, equipStar, holeIndex, equipPackType):
- return
-
- # 扣除宝石
- ItemCommon.DelItem(curPlayer, curStone, 1, True, ChConfig.ItemDel_EquipEnchase,
- {"equipPackIndex": equipPackIndex, "HoleIndex": holeIndex})
-
- isBind = 1 if isBind else 0
-
- # 变更宝石孔宝石信息
- __DoChangeEquipHoleStone(curPlayer, equipPackIndex, holeIndex, stoneItemID, isBind, "EquipStone", True)
-
- # #镶嵌成功
- # if not curEquip.GetIsBind():
- # ItemControler.SetItemIsBind(curEquip, True)
-
- # 刷新属性
- RefreshAttrByStoneAction(curPlayer, equipPackType, True, classLV)
-
- # 同步客户端
- Sycn_StoneHoleInfo(curPlayer, [equipPackIndex])
- # 成就
- DoStoneSuccess(curPlayer, classLV)
- return
-
-
-def DoStoneSuccess(curPlayer, classLV):
- #PlayerSuccess.ResetSuccessByType(curPlayer, ShareDefine.SuccType_InlayStone1)
- #PlayerSuccess.ResetSuccessByType(curPlayer, ShareDefine.SuccType_InlayStone2)
- totalStoneLV = 0
- classStoneLV = 0
- holeIndexList = GetAllEquipPlaceHoleIndex()
- gameData = GameWorld.GetGameData()
- packType = IPY_GameWorld.rptEquip
- playerEquip = curPlayer.GetItemManager().GetPack(packType)
- for equipIndex in xrange(playerEquip.GetCount()):
- #if equipIndex not in ShareDefine.RoleEquipType:
- # continue
- for holeIndex in holeIndexList:
-
- curGemID = GetEquipIndexStoneIDAndIsBand(curPlayer, equipIndex, holeIndex)[0]
- if curGemID == 0:
- continue
- curGem = gameData.GetItemByTypeID(curGemID)
- if not curGem:
- continue
-
- gemEffect = curGem.GetEffectByIndex(0)
- gemType, gemLV = gemEffect.GetEffectValue(0), gemEffect.GetEffectValue(1)
- #if gemType == 1: # 生命宝石
- # PlayerSuccess.DoAddSuccessProgress(curPlayer, ShareDefine.SuccType_InlayStone1, 1, [gemLV])
- #elif gemType == 2: # 毁灭宝石
- # PlayerSuccess.DoAddSuccessProgress(curPlayer, ShareDefine.SuccType_InlayStone2, 1, [gemLV])
-
- totalStoneLV += gemLV
-
- ipyData = IpyGameDataPY.GetIpyGameDataByCondition('EquipPlaceIndexMap', {'GridIndex': equipIndex})
- if ipyData and ipyData.GetClassLV() == classLV:
- classStoneLV += gemLV
-
- # 记录开服活动宝石总等级
- #GameWorld.DebugLog("classLV=%s,classStoneLV=%s,totalStoneLV=%s" % (classLV, classStoneLV, totalStoneLV))
- OpenServerCampaign.UpdOpenServerCampaignRecordData(curPlayer, ShareDefine.Def_Campaign_Type_StoneLV, totalStoneLV)
- PlayerSuccess.UptateSuccessProgress(curPlayer, ShareDefine.SuccType_StoneTotalLV, totalStoneLV)
- PlayerSuccess.UptateSuccessProgress(curPlayer, ShareDefine.SuccType_EquipStoneClass, classStoneLV, [classLV])
- PlayerWeekParty.AddWeekPartyActionCnt(curPlayer, ChConfig.Def_WPAct_Stone, totalStoneLV, False, True)
- return
-
-
-# //A3 05 宝石摘取 #tagCMEquipStonePick
-# struct tagCMEquipStonePick
-# {
-# tagHead Head;
-# BYTE EquipIndex; //装备位在背包中索引
-# BYTE HoleIndex; //装备位的孔索引
-# };
-def OnEquipStonePick(playerIndex, clientData, tick):
- curPlayer = GameWorld.GetPlayerManager().GetPlayerByIndex(playerIndex)
- playerID = curPlayer.GetPlayerID()
- # 验证背包类型合法性
- equipPackIndex = clientData.EquipIndex
- holeIndex = clientData.HoleIndex
- GameWorld.DebugLog("宝石摘除: equipPackIndex=%s,holeIndex=%s" % (equipPackIndex, holeIndex), playerID)
-
- equipPackType, stonePackType, placeIndex = GetPackTypeByEquipPlace(equipPackIndex)
- # 获得装备位装备实例
- equipPack = curPlayer.GetItemManager().GetPack(equipPackType)
- curEquip = equipPack.GetAt(placeIndex)
-
- if not ItemCommon.CheckItemCanUse(curEquip):
- GameWorld.Log("目标装备为空或不可用,无法镶嵌!", playerID)
- return
-
- # 验证背包空间
- if not ItemCommon.CheckPackHasSpace(curPlayer, stonePackType, True):
- return
-
- # 验证宝石
- stoneID = GetEquipIndexStoneIDAndIsBand(curPlayer, equipPackIndex, holeIndex)[0]
-
- if not stoneID:
- GameWorld.DebugLog("孔为空或不存在宝石!")
- return
-
- ipyData = IpyGameDataPY.GetIpyGameDataByCondition('EquipPlaceIndexMap', {'GridIndex': equipPackIndex})
- if not ipyData:
- return
- classLV = ipyData.GetClassLV()
-
- __DoChangeEquipHoleStone(curPlayer, equipPackIndex, holeIndex, 0, 0, "StonePick", True)
-
- # 刷新属性
- RefreshAttrByStoneAction(curPlayer, equipPackType, False, classLV)
-
- # 同步客户端
- Sycn_StoneHoleInfo(curPlayer, [equipPackIndex])
-
- totalStoneLV = GetTotalStoneLV(curPlayer)
- # 记录开服活动宝石总等级
- OpenServerCampaign.UpdOpenServerCampaignRecordData(curPlayer, ShareDefine.Def_Campaign_Type_StoneLV, totalStoneLV)
- PlayerWeekParty.AddWeekPartyActionCnt(curPlayer, ChConfig.Def_WPAct_Stone, totalStoneLV, False, True)
- return
-
-
-def GetTotalStoneLV(curPlayer):
- ##宝石总等级
- return curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_TotalStoneLV)
-
-
-def GetStoneCntByLV(curPlayer, stoneLV):
- ##指定等级的宝石数量
- cnt = 0
- holeIndexList = GetAllEquipPlaceHoleIndex()
- equipIndexList = GetAllStoneEquipIndexList()
- gameData = GameWorld.GetGameData()
- for equipIndex in equipIndexList:
- for holeIndex in holeIndexList:
- curGemID = GetEquipIndexStoneIDAndIsBand(curPlayer, equipIndex, holeIndex)[0]
- if curGemID == 0:
- continue
- curGem = gameData.GetItemByTypeID(curGemID)
- if not curGem:
- continue
- gemLV = curGem.GetEffectByIndex(0).GetEffectValue(1)
- if gemLV >= stoneLV:
- cnt += 1
- return cnt
-
-
-# // A3 06 宝石升级 #tagCMEquipStoneUpgrade
-# struct tagCMEquipStoneUpgrade
-# {
-# tagHead Head;
-# BYTE EquipIndex; //装备位在装备背包中的索引
-# BYTE HoleIndex; //装备位中宝石孔索引
-# BYTE UpWay; //升级方式 0:仙玉 1:宝石
-# };
-def OnEquipStoneUpgrade(playerIndex, clientData, tick):
- curPlayer = GameWorld.GetPlayerManager().GetPlayerByIndex(playerIndex)
- playerID = curPlayer.GetPlayerID()
-
- # 验证背包类型合法性
- equipPackIndex = clientData.EquipIndex
- holeIndex = clientData.HoleIndex
- #upWay = clientData.UpWay
- GameWorld.DebugLog("宝石升级: equipPackIndex=%s,holeIndex=%s" % (equipPackIndex, holeIndex), playerID)
- equipPackType, stonePackType, placeIndex = GetPackTypeByEquipPlace(equipPackIndex)
- # 获得装备位装备实例
- equipPack = curPlayer.GetItemManager().GetPack(equipPackType)
- curEquip = equipPack.GetAt(placeIndex)
-
- if not ItemCommon.CheckItemCanUse(curEquip):
- GameWorld.Log("目标装备为空或不可用,无法镶嵌!", playerID)
- return
-
- # 升级宝石ID
- stoneID, stoneIsBind = GetEquipIndexStoneIDAndIsBand(curPlayer, equipPackIndex, holeIndex)
- if stoneID == 0:
- GameWorld.DebugLog("孔为空或不存在宝石!")
- return
- stoneItemData = GameWorld.GetGameData().GetItemByTypeID(stoneID)
- stoneItemID = stoneItemData.GetItemTypeID()
- curStoneEff = stoneItemData.GetEffectByIndex(0)
- curEffID = curStoneEff.GetEffectID()
- if curEffID != ChConfig.Def_Effect_EquipStone:
- GameWorld.Log("不是宝石,无法升级!stoneIndex=%s,stoneItemID=%s,curEffID=%s"
- % (holeIndex, stoneItemID, curEffID), playerID)
- return
- stoneEffType = curStoneEff.GetEffectValue(0)
- stoneLevel = curStoneEff.GetEffectValue(1)
- upgradeStoneID = curStoneEff.GetEffectValue(2)
- upgradeStoneLV = stoneLevel + 1
-
- GameWorld.DebugLog("stoneEffType=%s,stoneLevel=%s,upgradeStoneID=%s,upgradeStoneLV=%s" % (stoneEffType, stoneLevel, upgradeStoneID, upgradeStoneLV))
-
- if not upgradeStoneID:
- GameWorld.Log("该宝石已是最大级,不能升级!stoneIndex=%s,stoneItemID=%s,curEffID=%s,upgradeStoneID=%s"
- % (holeIndex, stoneItemID, curEffID, upgradeStoneID), playerID)
- return
- upNeedCount = IpyGameDataPY.GetFuncCfg("GemUpCostFormula", 2) # 合成下一级所需宝石个数
- if not upNeedCount:
- return
- ipyData = IpyGameDataPY.GetIpyGameDataByCondition('EquipPlaceIndexMap', {'GridIndex': equipPackIndex})
- if not ipyData:
- return
- classLV = ipyData.GetClassLV()
-
- extraItemInfoDict = IpyGameDataPY.GetFuncEvalCfg("GemUpCostFormula", 3, {}) # 额外材料
- itemPack = curPlayer.GetItemManager().GetPack(stonePackType)
-
- delItemListDict = {} # 实际扣除用
- exItemNeedCountDict = {} # 所需额外材料总数
-
- delItemCountDict, buyItemCountDict = {}, {} # 统计用
- delExItemCountDict, buyExItemCountDict = {}, {} # 统计用
- # 优先消耗高级宝石,从升级目标等级开始向下遍历到2级
- tagLVStoneLackCount = 1 # 可理解为最终要合成1个升级目标等级宝石
- for tagLevel in xrange(upgradeStoneLV, 1, -1):
-
- needStoneLV = tagLevel - 1
- key = (stoneEffType, needStoneLV)
- if key not in PyGameData.g_stoneLevelIDDict:
- GameWorld.ErrLog("找不到宝石类型等级物品ID! stoneEffType=%s, needStoneLV=%s" % (stoneEffType, needStoneLV))
- return
- needStoneID = PyGameData.g_stoneLevelIDDict[key]
- needStoneCount = tagLVStoneLackCount * upNeedCount # 上一个等级宝石缺少数 * 升级宝石数目
- if needStoneID == stoneID:
- needStoneCount = upNeedCount - 1 # 已镶嵌宝石自身可做为1个材料
-
- GameWorld.DebugLog(" tagLevel=%s,tagLVStoneLackCount=%s,needStoneID=%s,needStoneCount=%s" % (tagLevel, tagLVStoneLackCount, needStoneID, needStoneCount))
-
- # 额外材料统计,使用合成目标等级所需数据;额外材料无法通过迭代升级得到,直接先统计数量,后面在验证扣除数及不足数
- extraItemInfo = extraItemInfoDict.get(str(tagLevel))
- if extraItemInfo:
- extraItemID, extraItemCnt = extraItemInfo
- extraItemNeedCount = extraItemCnt * tagLVStoneLackCount
- exItemNeedCountDict[extraItemID] = exItemNeedCountDict.get(extraItemID, 0) + extraItemNeedCount # 额外材料ID可能重复,做累加
- GameWorld.DebugLog(" 额外材料: extraItemID=%s,extraItemNeedCount=%s, %s" % (extraItemID, extraItemNeedCount, exItemNeedCountDict))
-
- # 等级宝石统计,每级宝石ID一定不一样,所以不需要统计已经计入需要扣除的
- hasEnough, indexList, findItemIsBind, lackCnt = ItemCommon.GetItem_FromPack_ByID_ExEx(needStoneID, itemPack, needStoneCount)
- delCount = needStoneCount - lackCnt
- GameWorld.DebugLog(" 宝石材料: needStoneID=%s,delCount=%s,lackCnt=%s" % (needStoneID, delCount, lackCnt))
- if delCount > 0:
- delItemListDict[needStoneID] = [indexList, delCount]
- delItemCountDict[needStoneID] = delCount
- if lackCnt > 0:
- # 所需为1级宝石还缺,直接商城购买
- if needStoneLV == 1:
- buyItemCountDict[needStoneID] = lackCnt
- break
- else:
- tagLVStoneLackCount = lackCnt # 更新下一等级宝石缺少个数
- else:
- # 基础宝石材料不缺了直接退出
- break
-
- # 购买消耗统计
- costGold = 0
- for buyItemID, buyCount in buyItemCountDict.items():
- unitPrice = ItemCommon.GetShopItemPrice(buyItemID, IPY_GameWorld.TYPE_Price_Gold_Money)
- if not unitPrice:
- return
- costGold += unitPrice * buyCount
- GameWorld.DebugLog(" 购买不足宝石: buyItemID=%s,buyCount=%s,unitPrice=%s,costGold=%s" % (buyItemID, buyCount, unitPrice, costGold))
-
- for extraItemID, exNeedCount in exItemNeedCountDict.items():
- exHasEnough, exIndexList, findItemIsBind, exLackCnt = ItemCommon.GetItem_FromPack_ByID_ExEx(extraItemID, itemPack, exNeedCount)
- exDelCount = exNeedCount - exLackCnt
- if exDelCount > 0:
- delItemListDict[extraItemID] = [exIndexList, exDelCount]
- delExItemCountDict[extraItemID] = exDelCount
- if exLackCnt > 0:
- unitPrice = ItemCommon.GetShopItemPrice(extraItemID, IPY_GameWorld.TYPE_Price_Gold_Money)
- if not unitPrice:
- return
- costGold += unitPrice * exLackCnt
- buyExItemCountDict[extraItemID] = exLackCnt
- GameWorld.DebugLog(" 购买额外材料: extraItemID=%s,exNeedCount=%s,exDelCount=%s,exLackCnt=%s,unitPrice=%s,costGold=%s"
- % (extraItemID, exNeedCount, exDelCount, exLackCnt, unitPrice, costGold))
-
- infoDict = {"EquipPackIndex": equipPackIndex, "HoleIndex": holeIndex, "ClassLV":classLV,
- "StoneItemID": stoneItemID, "CurStoneIDLV": stoneLevel, "UpgradeStoneID": upgradeStoneID,
- "BuyItemCountDict": buyItemCountDict, "DelItemCountDict": delItemCountDict,
- "BuyExItemCountDict": buyExItemCountDict, "DelExItemCountDict": delExItemCountDict,
- }
- GameWorld.DebugLog("delItemCountDict=%s,buyItemCountDict=%s" % (delItemCountDict, buyItemCountDict))
- GameWorld.DebugLog("delExItemCountDict=%s,buyExItemCountDict=%s" % (delExItemCountDict, buyExItemCountDict))
-
- if costGold and not PlayerControl.PayMoney(curPlayer, IPY_GameWorld.TYPE_Price_Gold_Money, costGold,
- ChConfig.Def_Cost_EquipStone, infoDict):
- GameWorld.DebugLog("仙玉不足!costGold=%s" % costGold)
- return
-
- for delItemIndexList, delCnt in delItemListDict.values():
- ItemCommon.ReduceItem(curPlayer, itemPack, delItemIndexList, delCnt, False,
- ChConfig.ItemDel_StoneUpgrade, infoDict)
-
- __DoChangeEquipHoleStone(curPlayer, equipPackIndex, holeIndex, upgradeStoneID, False, "StoneUpgrade", False)
-
- # 刷新属性
- RefreshAttrByStoneAction(curPlayer, equipPackType, False, classLV)
-
- # 同步客户端
- Sycn_StoneHoleInfo(curPlayer, [equipPackIndex])
-
- DoStoneSuccess(curPlayer, classLV)
- return
-
-def __CheckStoneHoleCanUse(curPlayer, equipStar, holeIndex, equipPackType):
- ##验证孔合法性
-
- holeIndexList = GetAllEquipPlaceHoleIndex()
- if holeIndex not in holeIndexList:
- GameWorld.Log("镶嵌孔索引错误!holeIndex=%s, holeIndexList=%s" % (holeIndex, holeIndexList))
- return False
-
- openCommHoleCnt = 0 # 已经开放装备常规孔数
-
- gemOpenNeedStarList = IpyGameDataPY.GetFuncEvalCfg("GemOpen", 1)
- for holeCnt, openStar in enumerate(gemOpenNeedStarList, 1):
- if equipStar >= openStar:
- openCommHoleCnt = holeCnt
-
- # VIP孔
- if holeIndex >= ChConfig.Def_Stone_VipHole:
-
- if openCommHoleCnt <= 0:
- GameWorld.Log("装备未开启任何普通宝石孔,无法开启VIP孔位! equipStar=%s,openCommHoleCnt=%s" % (equipStar, openCommHoleCnt))
- return False
- gemOpenVipList = IpyGameDataPY.GetFuncEvalCfg("GemOpenVip", 1)
-
- openVIPHoleCnt = 0 # 已经开放装备VIP孔数
- curVipLV = curPlayer.GetVIPLv()
- for holeCnt, vipLv in enumerate(gemOpenVipList, 1):
- if curVipLV >= vipLv:
- openVIPHoleCnt = holeCnt
-
- if holeIndex >= openVIPHoleCnt + ChConfig.Def_Stone_VipHole:
- GameWorld.Log("装备VIP宝石孔未开放!curVipLV=%s,holeIndex=%s,openVIPHoleCnt=%s"
- % (curVipLV, holeIndex, openVIPHoleCnt), curPlayer.GetPlayerID())
- return False
-
- # 常规孔
- elif holeIndex >= openCommHoleCnt:
- GameWorld.Log("该装备宝石孔为开放!equipStar=%s,holeIndex=%s,openCommHoleCnt=%s"
- % (equipStar, holeIndex, openCommHoleCnt), curPlayer.GetPlayerID())
- return False
-
- return True
-
-
-def __DoChangeEquipHoleStone(curPlayer, equipPackIndex, holeIndex, changeStoneID, isBind, eventName, isPickoff):
- ## 变更玩家装备孔宝石
-
- # 获得装备位孔索引宝石存储信息
- stoneID, stoneIsBind = GetEquipIndexStoneIDAndIsBand(curPlayer, equipPackIndex, holeIndex)
- # 保存装备位孔位上宝石ID和绑定状态
- SetEquipIndexStoneIDAndIsBand(curPlayer, equipPackIndex, holeIndex, changeStoneID, isBind)
-
- if isPickoff and stoneID:
- equipPackType, stonePackType, placeIndex = GetPackTypeByEquipPlace(equipPackIndex)
- itemCount = 1
- # 摘除的宝石都绑定
- if ItemCommon.CheckPackHasSpace(curPlayer, stonePackType):
- ItemControler.GivePlayerItem(curPlayer, stoneID, itemCount, 0,
- [stonePackType],
- event=[ChConfig.ItemGive_StonePickoff, False,
- {"equipPackIndex": equipPackIndex, "HoleIndex": holeIndex}])
- else:
- PlayerControl.SendMailByKey("GemToPlayer", [curPlayer.GetPlayerID()], [[stoneID, 1, stoneIsBind]])
-
- DataRecordPack.DR_StoneItemChange(curPlayer, eventName,
- {'equipPackIndex': equipPackIndex, "holeIndex": holeIndex, "stoneID": stoneID,
- 'changeStoneID': changeStoneID})
- return
-
-
-def RefreshAttrByStoneAction(curPlayer, packType, isNeedNotify, classLV):
- ## 宝石刷新属性
- # 装备等级改变,判断是否为玩家身上的装备,如果是的话刷新玩家属性
- if packType in [IPY_GameWorld.rptEquip]:
- # 先刷装备BUFF 再计算属性
- if isNeedNotify:
- curPlayer.SetDict(ChConfig.Def_PlayerKey_AttrActivatyNotify, ChConfig.Def_AttrActivatyNotify_Stone)
- ChEquip.RefreshPlayerEquipAttribute(curPlayer, classLV)
-
- # 刷新所有属性
- playControl = PlayerControl.PlayerControl(curPlayer)
- playControl.RefreshPlayerAttrState()
- return
-
-
-def DoMoveEquipStone(curPlayer, equipPackIndex):
- ###替换装备时宝石转移
- equipPackType, stonePackType, placeIndex = GetPackTypeByEquipPlace(equipPackIndex)
- equipPack = curPlayer.GetItemManager().GetPack(equipPackType)
- curEquip = equipPack.GetAt(placeIndex)
- if not ItemCommon.CheckItemCanUse(curEquip):
- return
-
- # 获得装备星级孔信息
- gemOpenNeedStarList = IpyGameDataPY.GetFuncEvalCfg("GemOpen", 1)
- maxEquipHoleCnt = len(gemOpenNeedStarList) # 最大装备星级开放孔数
-
- openEquipHoleCnt = 0 # 已经开放孔数
- partStar = ChEquip.GetEquipPartStarByRank(curPlayer, equipPackIndex, curEquip)
- for holeCnt, openStar in enumerate(gemOpenNeedStarList, 1):
- if partStar >= openStar:
- openEquipHoleCnt = holeCnt
-
- # 需要拆卸宝石的孔列表
- pickoffHoleList = []
-
- # 判断装备阶级宝石是否拆卸
- for holeIndex in xrange(maxEquipHoleCnt):
- if holeIndex < openEquipHoleCnt:
- continue
- curGemID = GetEquipIndexStoneIDAndIsBand(curPlayer, equipPackIndex, holeIndex)[0]
- if curGemID == 0:
- continue
- pickoffHoleList.append([equipPackIndex, holeIndex])
-
- # 没有开启普通装备孔,需摘除VIP孔
- if not openEquipHoleCnt:
- # 获得VIP等级孔信息
- gemOpenVipList = IpyGameDataPY.GetFuncEvalCfg("GemOpenVip", 1)
- maxVipHoleCnt = len(gemOpenVipList) # 最大VIP开放孔数
- # 判断VIP等级孔信息
- for holeIndex in xrange(ChConfig.Def_Stone_VipHole, ChConfig.Def_Stone_VipHole + maxVipHoleCnt):
- curGemID = GetEquipIndexStoneIDAndIsBand(curPlayer, equipPackIndex, holeIndex)[0]
- if curGemID == 0:
- continue
- pickoffHoleList.append([equipPackIndex, holeIndex])
-
- # 脱装备的外层刷属性, 这里不刷
- __DoSysPickoffEquipStone(curPlayer, equipPackType, stonePackType, pickoffHoleList, "EquipChange", False)
- return
-
-
-def OnVIPTimeOut(curPlayer):
- ## VIP到期处理
- # 过期一样有效,屏蔽该逻辑
- return
-
-
-def __DoSysPickoffEquipStone(curPlayer, equipPackType, stonePackType, pickoffHoleList, eventName, isRefreshAttr):
- ## 系统摘除宝石
-
- if not pickoffHoleList:
- return
-
- GameWorld.DebugLog("系统摘除宝石: %s,pickoffHoleList=%s" % (eventName, pickoffHoleList), curPlayer.GetPlayerID())
-
- equipIndexList = []
- stoneCount = len(pickoffHoleList)
- packSpace = ItemCommon.GetItemPackSpace(curPlayer, stonePackType, stoneCount)
- if packSpace >= stoneCount:
- for equipIndex, holeIndex in pickoffHoleList:
- __DoChangeEquipHoleStone(curPlayer, equipIndex, holeIndex, 0, 0, eventName, True)
- if equipIndex not in equipIndexList:
- equipIndexList.append(equipIndex)
- else:
- # 邮件物品信息列表
- mailItemInfoList = []
- for equipIndex, holeIndex in pickoffHoleList:
- stoneInfo = GetEquipIndexStoneIDAndIsBand(curPlayer, equipIndex, holeIndex)
- mailItemInfoList.append([stoneInfo[0], 1, stoneInfo[1]])
- SetEquipIndexStoneIDAndIsBand(curPlayer, equipIndex, holeIndex, 0, 0)
- DataRecordPack.DR_StoneItemChange(curPlayer, eventName,
- {'changeStoneID': 0, 'equipIndex': equipIndex, "holeIndex": holeIndex,
- "stoneID": stoneInfo[0]})
- if equipIndex not in equipIndexList:
- equipIndexList.append(equipIndex)
- PlayerControl.SendMailByKey("GemToPlayer", [curPlayer.GetPlayerID()], mailItemInfoList)
-
- # 目前只有脱装备会触发,暂时屏蔽,由脱装备触发刷属性
- # if isRefreshAttr:
- # RefreshAttrByStoneAction(curPlayer, equipPackType, False)
-
- if equipIndexList:
- Sycn_StoneHoleInfo(curPlayer, equipIndexList)
- return
-
-
-def Sycn_StoneHoleInfo(curPlayer, equipIndexList=[]):
- ###同步客户端宝石信息
- # 装备位所有孔位
- holeIndexList = GetAllEquipPlaceHoleIndex()
- maxHoleCount = len(holeIndexList)
- if not equipIndexList:
- equipIndexList = GetAllStoneEquipIndexList()
-
- sendPack = ChPyNetSendPack.tagMCStoneInfo()
- sendPack.InfoList = []
- for equipIndex in equipIndexList:
- stoneMsg = ChPyNetSendPack.tagMCStoneMsg()
- stoneMsg.EquipPlace = equipIndex
- stoneMsg.MaxStoneCount = maxHoleCount
- stoneMsg.StoneInfo = GetEquipIndexStoneIDList(curPlayer, equipIndex)
- holeStoneBindList = []
- for holeIndex in holeIndexList:
- isBind = GetEquipIndexStoneIDAndIsBand(curPlayer, equipIndex, holeIndex)[1]
- holeStoneBindList.append(isBind)
- stoneMsg.StoneBind = holeStoneBindList
- sendPack.InfoList.append(stoneMsg)
- sendPack.EquipCount = len(sendPack.InfoList)
- NetPackCommon.SendFakePack(curPlayer, sendPack)
- return
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Event/EventSrc/Operate_EquipWash.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Event/EventSrc/Operate_EquipWash.py
deleted file mode 100644
index afd1248..0000000
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Event/EventSrc/Operate_EquipWash.py
+++ /dev/null
@@ -1,502 +0,0 @@
-#!/usr/bin/python
-# -*- coding: GBK -*-
-#-------------------------------------------------------------------------------
-#
-##@package Event.EventSrc.Operate_EquipWash
-#
-# @todo:装备洗练
-# @author hxp
-# @date 2017-08-09
-# @version 1.0
-#
-# 详细描述: 装备洗练
-#
-#-------------------------------------------------------------------------------
-#"""Version = 2017-08-09 15:00"""
-#-------------------------------------------------------------------------------
-
-import GameWorld
-import IpyGameDataPY
-import NetPackCommon
-import ChPyNetSendPack
-import PlayerControl
-import PlayerSuccess
-import IPY_GameWorld
-import PlayerTongTianLing
-import DataRecordPack
-import PlayerActLogin
-import PlayerActTask
-import ShareDefine
-import ItemCommon
-import ChConfig
-import ChEquip
-
-import random
-
-
-Def_EquipWashMaxType = 2 # 装备洗练最大归组类型
-Def_EquipWashMaxAttrCount = 3 # 装备洗练最大洗练属性条数
-g_allIndexList = [] #可洗炼的部位缓存
-
-#def OnEquipWashLogin(curPlayer):
-# Sycn_EquipWashInfo(curPlayer, isLogin=True)
-# return
-
-def GetEquipWashMaxLV(curPlayer, equipPackindex, equipPlace):
- # @return: 0-未开放; >=1-该装备位最大可洗练等级
- washType = GetEquipWashType(equipPlace)
- if not washType:
- return 0
-
- equipPack = curPlayer.GetItemManager().GetPack(IPY_GameWorld.rptEquip)
- curEquip = equipPack.GetAt(equipPackindex)
- if not curEquip or curEquip.IsEmpty():
- GameWorld.DebugLog("该装备位没有装备,无法洗练!equipPackindex=%s" % (equipPackindex))
- return 0
-
- equipStar = ChEquip.GetEquipPartStarByRank(curPlayer, equipPackindex, curEquip)
- ipyData = IpyGameDataPY.InterpolationSearch('ItemWashMax', 'Star', equipStar, {'Type':washType})
- if not ipyData:
- return 0
- return ipyData.GetLevelMax()
-
-
-
-
-def GetEquipWashType(equipPlace):
- ## 获取装备位对应的洗练类型
- return IpyGameDataPY.GetFuncEvalCfg('EquipWashGroup', 1, {}).get(equipPlace)
-
-
-def GetEquipWashData(washType, washLV):
- return IpyGameDataPY.GetIpyGameData("EquipWash", washType, washLV)
-
-def GetAllEquipWashPlace():
- # 获取所有可洗练的装备位
- global g_allIndexList
- if not g_allIndexList:
- maxClasslv = IpyGameDataPY.GetFuncCfg('EquipMaxClasslv')
- for equipPlace in IpyGameDataPY.GetFuncEvalCfg('EquipWashGroup', 1, {}):
- for classLV in xrange(1, maxClasslv+1):
- ipyData = IpyGameDataPY.GetIpyGameData('EquipPlaceIndexMap', classLV, equipPlace)
- if not ipyData:
- continue
- g_allIndexList.append(ipyData.GetGridIndex())
- return g_allIndexList
-
-#// A3 25 装备洗炼 #tagCMEquipXLAttrChange
-#
-#struct tagCMEquipXLAttrChange
-#{
-# tagHead Head;
-# BYTE EquipPlace; // 装备位
-# BYTE CheckUseGoldAttr; // 勾选使用钻石洗练属性编号信息; 按属性编号位二进制代表是否勾选
-# 如勾选属性1代表0位, 则发1, 勾选属性1、2则发3,,勾选属性1、2、3则发7
-#};
-def OnEquipWashAttr(index, clientData, tick):
- curPlayer = GameWorld.GetPlayerManager().GetPlayerByIndex(index)
- playerID = curPlayer.GetPlayerID()
-
- equipPackindex = clientData.EquipPlace
- checkUseGoldAttr = clientData.CheckUseGoldAttr
- ipyData = IpyGameDataPY.GetIpyGameDataByCondition('EquipPlaceIndexMap', {'GridIndex':equipPackindex})
- if not ipyData:
- return
- equipPlace = ipyData.GetEquipPlace()
- classLV = ipyData.GetClassLV()
- funcPlusMinClassInfo = IpyGameDataPY.GetFuncEvalCfg("EquipPlusByFuncID", 1, {})
- funcID = ShareDefine.GameFuncID_EquipWash
- if str(funcID) in funcPlusMinClassInfo:
- funcMinClassLV = funcPlusMinClassInfo[str(funcID)]
- if classLV < funcMinClassLV:
- GameWorld.Log("该装备阶无法洗练! classLV=%s < funcMinClassLV=%s" % (classLV, funcMinClassLV), playerID)
- return
- washType = GetEquipWashType(equipPlace)
- if washType is None:
- GameWorld.Log("该装备位无法洗练! equipPlace=%s" % (equipPlace), playerID)
- return
-
- maxWashLV = GetEquipWashMaxLV(curPlayer, equipPackindex, equipPlace)
- washLV = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_EquipWashLV % equipPackindex)
- GameWorld.DebugLog("装备洗练: classLV=%s,equipPlace=%s,checkUseGoldAttr=%s,washType=%s,washLV=%s,maxWashLV=%s"
- % (classLV, equipPlace, checkUseGoldAttr, washType, washLV, maxWashLV), playerID)
-
- if maxWashLV < washLV:
- return
-
- washData = GetEquipWashData(washType, washLV)
- if not washData:
- GameWorld.ErrLog("找不到该装备洗练数据: washType=%s,washLV=%s" % (washType, washLV))
- return
-
- maxValueAttrNumList = [] # 已达到当前等级最大值的属性编号列表
- for attrNum in range(1, Def_EquipWashMaxAttrCount + 1):
- maxValue = getattr(washData, "GetAttrMax%s" % attrNum)()
- washValue = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_EquipWashValue % (equipPackindex, attrNum))
- washValueTemp = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_EquipWashValueTemp % (equipPackindex, attrNum))
- if washValueTemp != 0:
- GameWorld.Log("还有未选择是否保存的洗练属性,不可洗练!equipPackindex=%s,attrNum=%s,washValueTemp=%s"
- % (equipPackindex, attrNum, washValueTemp), playerID)
- return
- if washValue >= maxValue:
- maxValueAttrNumList.append(attrNum)
-
- if washLV >= maxWashLV and len(maxValueAttrNumList) == Def_EquipWashMaxAttrCount:
- GameWorld.DebugLog("所有洗练属性已经达到最大洗练等级值,无法洗练!maxWashLV=%s" % maxWashLV, playerID)
- return
-
- if len(maxValueAttrNumList) == Def_EquipWashMaxAttrCount:
- GameWorld.DebugLog("所有洗练属性已经达到本等级最大值,请先升级后再洗练!maxWashLV=%s" % maxWashLV, playerID)
- return
-
- costItemID = washData.GetCostItemID()
- costItemCount = washData.GetCostItemCount()
- costItemIndexList, bindCnt, unBindCnt = ItemCommon.GetPackItemBindStateIndexInfo(curPlayer, costItemID)
- if bindCnt + unBindCnt < costItemCount:
- GameWorld.DebugLog("装备洗练所需消耗道具不足,无法洗练!costItemID=%s,costItemCount=%s,bindCnt=%s,unBindCnt=%s"
- % (costItemID, costItemCount, bindCnt, unBindCnt), playerID)
- return
-
- goldWashCostItemCountList = washData.GetGoldWashCostList() # 洗练必增条数消耗必增道具个数
- if not goldWashCostItemCountList or len(goldWashCostItemCountList) != Def_EquipWashMaxAttrCount:
- return
-
- randAttrDict = {} # 随机变更值字典 {属性编号:随机值, ...}
- useGoldAttrNumList = [] # 使用钻石洗练的属性编号列表
- negativeValueCnt = 0 # 负值数, 设定含0吧,即非正数
- fixMaxValueDict = {} # 全服修正值最大值字典 {属性编号:最大值, ...}
- for attrNum in range(1, Def_EquipWashMaxAttrCount + 1):
- if attrNum in maxValueAttrNumList:
- continue
-
- washValue = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_EquipWashValue % (equipPackindex, attrNum))
- if checkUseGoldAttr & pow(2, attrNum - 1):
- useGoldAttrNumList.append(attrNum)
- randValueMin = getattr(washData, "GetAttrCostGoldMin%s" % attrNum)()
- randValueMax = getattr(washData, "GetAttrCostGoldMax%s" % attrNum)()
- else:
- randValueMin, randValueMax = 0, 0
- randDict = getattr(washData, "GetAttrRandDict%s" % attrNum)()
- for randKey, randRange in randDict.items():
- if randKey[0] <= washValue <= randKey[1]:
- randValueMin, randValueMax = randRange
- break
- if not randValueMin and not randValueMax:
- GameWorld.ErrLog("找不到该装备位当前洗练值范围随机值!equipPackindex=%s,washType=%s,washLV=%s,attrNum=%s,washValue=%s,randDict=%s"
- % (equipPackindex, washType, washLV, attrNum, washValue, randDict))
- return
- GameWorld.DebugLog("随机范围属性%s, washValue=%s, %s~%s" % (attrNum, washValue, randValueMin, randValueMax))
- randValue = random.randint(randValueMin, randValueMax)
- for _ in xrange(50):
- if randValue != 0:
- break
- randValue = random.randint(randValueMin, randValueMax)
- #GameWorld.DebugLog("随机值0,重新随机!")
- if randValue == 0:
- randValue = 1
- #GameWorld.DebugLog("随机值还是0,强制设置为1!")
- randAttrDict[attrNum] = randValue
- if randValue <= 0:
- negativeValueCnt += 1
- fixMaxValueDict[attrNum] = randValueMax
-
- checkUseGoldCnt = len(useGoldAttrNumList)
- needGold = 0
- needMustID = IpyGameDataPY.GetFuncCfg("EquipWashMustID", 1)
- needMustIDCount = 0 if checkUseGoldCnt <= 0 else goldWashCostItemCountList[checkUseGoldCnt - 1]
- delMustIDCount = needMustIDCount
- mustItemIndexList, mustBindCnt, mustUnBindCnt = [], 0, 0
- if needMustIDCount:
- mustItemIndexList, mustBindCnt, mustUnBindCnt = ItemCommon.GetPackItemBindStateIndexInfo(curPlayer, needMustID, needMustIDCount)
- mustItemLackCount = max(0, needMustIDCount - (mustBindCnt + mustUnBindCnt))
- if mustItemLackCount > 0:
- needGold = ItemCommon.GetAutoBuyItemNeedGold({needMustID:mustItemLackCount})
- if needGold <= 0:
- GameWorld.ErrLog("自动购买必增道具所需仙玉异常!needMustID=%s,mustItemLackCount=%s,needGold=%s"
- % (needMustID, mustItemLackCount, needGold), playerID)
- return
- delMustIDCount = needMustIDCount - mustItemLackCount
-
- if needGold and not PlayerControl.HaveMoney(curPlayer, IPY_GameWorld.TYPE_Price_Gold_Money, needGold):
- GameWorld.DebugLog("仙玉不足,无法洗练!checkUseGoldCnt=%s,needGold=%s" % (checkUseGoldCnt, needGold), playerID)
- return
-
- preWashData = None # 上一洗练等级数据
- if washLV > 0:
- preWashData = GetEquipWashData(washType, washLV - 1)
- if not preWashData:
- GameWorld.ErrLog("找不到上一级洗练数据,无法洗练!preWashLV=%s" % (washLV - 1))
- return
-
- # 扣除消耗
- ItemCommon.DelCostItemByBind(curPlayer, costItemIndexList, bindCnt, unBindCnt, costItemCount, "EquipWash")
- if delMustIDCount:
- ItemCommon.DelCostItemByBind(curPlayer, mustItemIndexList, mustBindCnt, mustUnBindCnt, delMustIDCount, "EquipWash")
-
- if needGold:
- infoDict = {'classLV':classLV, "EquipPlace":equipPlace, "WashType":washType, "WashLV":washLV, "CheckUseGoldCnt":checkUseGoldCnt}
- PlayerControl.PayMoney(curPlayer, IPY_GameWorld.TYPE_Price_Gold_Money, needGold, ChConfig.Def_Cost_EquipWash, infoDict)
-
- GameWorld.DebugLog("随机洗练: randAttrDict=%s,fixMaxValueDict=%s" % (randAttrDict, fixMaxValueDict), playerID)
- # 全负修正
- if negativeValueCnt == Def_EquipWashMaxAttrCount:
- minPer = 1
- minPerAttrNum = 1
- for attrNum in range(1, Def_EquipWashMaxAttrCount + 1):
- washValue = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_EquipWashValue % (equipPackindex, attrNum))
- preMaxValue = 0 if not preWashData else getattr(preWashData, "GetAttrMax%s" % attrNum)()
- curMaxValue = getattr(washData, "GetAttrMax%s" % attrNum)()
- curPer = (washValue - preMaxValue) / float(curMaxValue - preMaxValue)
- GameWorld.DebugLog("全负修正比例: attrNum=%s,curPer=%s" % (attrNum, curPer))
- if curPer < minPer:
- minPer = curPer
- minPerAttrNum = attrNum
-
- # 当前洗练比例值最低的修正为正数
- fixValue = random.randint(1, fixMaxValueDict[minPerAttrNum])
- randAttrDict[minPerAttrNum] = fixValue
- GameWorld.DebugLog("全负洗练修正: minPerAttrNum=%s,minPer=%s,fixValue=%s,randAttrDict=%s"
- % (minPerAttrNum, minPer, fixValue, randAttrDict), playerID)
-
- # 最终洗练值确认
- isRefreshAttr = False
- for attrNum, randValue in randAttrDict.items():
- washValue = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_EquipWashValue % (equipPackindex, attrNum))
- tempValue = washValue + randValue
- preMaxValue = 0 if not preWashData else getattr(preWashData, "GetAttrMax%s" % attrNum)()
- maxValue = getattr(washData, "GetAttrMax%s" % attrNum)()
- GameWorld.DebugLog("最终洗练值确认: attrNum=%s,washValue=%s,randValue=%s,tempValue=%s,preMaxValue=%s,maxValue=%s"
- % (attrNum, washValue, randValue, tempValue, preMaxValue, maxValue), playerID)
-
- # 下限值为上一次的上限值
- if tempValue < preMaxValue:
- tempValue = preMaxValue
- GameWorld.DebugLog(" 下限值修正: tempValue=%s" % tempValue, playerID)
-
- # 最后一级的话可不超过最大值,不是最后一级可溢出
- if washLV == maxWashLV and tempValue > maxValue:
- tempValue = maxValue
- GameWorld.DebugLog(" 上限值修正: maxValue=%s,tempValue=%s" % (maxValue, tempValue), playerID)
-
- # 使用钻石洗练的直接更新,不用确认
- if attrNum in useGoldAttrNumList:
- isRefreshAttr = True
- PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_EquipWashValue % (equipPackindex, attrNum), tempValue)
- dataDict = {'classLV':classLV, 'equipPlace':equipPlace,'attrNum':attrNum,'oldValue':washValue,'newValue':tempValue}
- DataRecordPack.Cache_FightPowerChangeInfo(curPlayer, ChConfig.PowerDownType_EquipWash, dataDict)
- GameWorld.DebugLog(" 勾选洗练,直接更新数值: %s" % tempValue, playerID)
- else:
- PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_EquipWashValueTemp % (equipPackindex, attrNum), tempValue)
-
- #屏蔽自动升级
-# if isRefreshAttr and washLV < maxWashLV:
-# CheckEquipWashLVUp(curPlayer, equipPlace, washLV, washData)
-
- Sycn_EquipWashInfo(curPlayer, equipPackindex)
-
- if isRefreshAttr:
- RefreshEquipWashAttr(curPlayer, classLV)
- PlayerActLogin.AddLoginAwardActionCnt(curPlayer, ChConfig.Def_LoginAct_EquipWash, 1)
- PlayerTongTianLing.AddTongTianTaskValue(curPlayer, ChConfig.TTLTaskType_Wash, 1)
- PlayerActTask.AddActTaskValue(curPlayer, ChConfig.ActTaskType_EquipWash)
- return
-
-
-#// A3 26 装备洗炼结果确认 #tagCMEquipXLAttrChangeOK
-#
-#struct tagCMEquipXLAttrChangeOK
-#{
-# tagHead Head;
-# BYTE EquipPlace; // 装备位
-# BYTE IsSave; // 是否保存 0-否; 1-是; 2-手动升级
-#};
-def OnEquipWashAttrChangeOK(index, clientData, tick):
- curPlayer = GameWorld.GetPlayerManager().GetPlayerByIndex(index)
- playerID = curPlayer.GetPlayerID()
-
- equipPackindex = clientData.EquipPlace
- isSave = clientData.IsSave
- ipyData = IpyGameDataPY.GetIpyGameDataByCondition('EquipPlaceIndexMap', {'GridIndex':equipPackindex})
- if not ipyData:
- return
- curPack = curPlayer.GetItemManager().GetPack(IPY_GameWorld.rptEquip)
- curEquip = curPack.GetAt(equipPackindex)
- if not curEquip or curEquip.IsEmpty():
- GameWorld.DebugLog("OnEquipWashAttrChangeOK() equip is empty")
- return
- equipPlace = ipyData.GetEquipPlace()
- classLV = ipyData.GetClassLV()
- washLV = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_EquipWashLV % equipPackindex)
- maxWashLV = GetEquipWashMaxLV(curPlayer, equipPackindex, equipPlace)
- GameWorld.DebugLog("确认洗练结果: classLV=%s, equipPlace=%s,isSave=%s,washLV=%s,maxWashLV=%s"
- % (classLV, equipPlace, isSave, washLV, maxWashLV), playerID)
-
- washType = GetEquipWashType(equipPlace)
- if washType is None:
- return
- if maxWashLV < 0:
- return
- washData = GetEquipWashData(washType, washLV)
- if not washData:
- return
-
- # 手动升级
- if isSave == 2:
- if washLV >= maxWashLV:
- GameWorld.DebugLog("已达到最大洗练等级,不可升级!", playerID)
- return
- if CheckEquipWashLVUp(curPlayer, curEquip, equipPackindex, washLV, washData):
- RefreshEquipWashAttr(curPlayer, classLV)
- Sycn_EquipWashInfo(curPlayer, equipPackindex)
- EquipWashSuccess(curPlayer, classLV)
- else:
- GameWorld.DebugLog("升级失败,有属性未达到最大值,无法升级!", playerID)
- return
-
- for attrNum in range(1, Def_EquipWashMaxAttrCount + 1):
- tempValue = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_EquipWashValueTemp % (equipPackindex, attrNum))
- if not tempValue:
- continue
-
- PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_EquipWashValueTemp % (equipPackindex, attrNum), 0)
- if isSave == 1:
- oldValue = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_EquipWashValue % (equipPackindex, attrNum))
- PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_EquipWashValue % (equipPackindex, attrNum), tempValue)
- dataDict = {'classLV':classLV, 'equipPlace':equipPlace,'attrNum':attrNum,'oldValue':oldValue,'newValue':tempValue}
- DataRecordPack.Cache_FightPowerChangeInfo(curPlayer, ChConfig.PowerDownType_EquipWash, dataDict)
- GameWorld.DebugLog("保存洗练数据: classLV=%s, equipPlace=%s,attrNum=%s,tempValue=%s" % (classLV, equipPlace, attrNum, tempValue), playerID)
-
- if isSave == 1:
- RefreshEquipWashAttr(curPlayer, classLV)
- #屏蔽自动升级
-# if washLV < maxWashLV:
-# CheckEquipWashLVUp(curPlayer, equipPlace, washLV, washData)
- Sycn_EquipWashInfo(curPlayer, equipPackindex)
- return
-
-def CheckEquipWashLVUp(curPlayer, curEquip, equipPackindex, washLV, washData):
- # 检查洗练类型升级
-
- for attrNum in range(1, Def_EquipWashMaxAttrCount + 1):
- tempValue = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_EquipWashValue % (equipPackindex, attrNum))
- # 只要有未达到本级最大值的,则不能升级
- if tempValue < getattr(washData, "GetAttrMax%s" % attrNum)():
- return
- washLV += 1
- SetEquipWashLV(curPlayer, equipPackindex, washLV)
-
- # 洗练广播
- itemID = curEquip.GetItemTypeID()
- userData = curEquip.GetUserData()
- guid = ItemCommon.CacheNotifyEquipDetailInfo(curPlayer, curEquip)
- msgParamList = [curPlayer.GetPlayerName(), itemID, userData, guid, washLV]
- PlayerControl.WorldNotify(0, "WashCongratulation", msgParamList)
- return True
-
-def SetEquipWashLV(curPlayer, index, setWashLV):
- befWashLV = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_EquipWashLV % index)
- if befWashLV == setWashLV:
- return
- PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_EquipWashLV % (index), setWashLV)
-
- # 同步更新洗练总等级
- befTotalWashLV = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_TotalEquipWashLV)
- updTotalWashLV = max(0, befTotalWashLV + setWashLV - befWashLV)
- PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_TotalEquipWashLV, updTotalWashLV)
- GameWorld.DebugLog("设置洗练等级: index=%s,befWashLV=%s,setWashLV=%s,befTotalWashLV=%s,updTotalWashLV=%s"
- % (index, befWashLV, setWashLV, befTotalWashLV, updTotalWashLV))
- return
-
-## 全身洗练总等级
-def GetTotalEquipWashLV(curPlayer): return curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_TotalEquipWashLV)
-
-def Sycn_EquipWashInfo(curPlayer, equipPackindex=-1, isLogin=False):
- hasValue = False
-
- pack = ChPyNetSendPack.tagMCEquipPartXLAttrInfo()
- pack.Clear()
- pack.InfoList = []
-
- if equipPackindex == -1:
- syncPlaceList = GetAllEquipWashPlace()
- else:
- syncPlaceList = [equipPackindex]
-
- for place in syncPlaceList:
- equipPart = ChPyNetSendPack.tagMCEquipPartXLAttr()
- equipPart.EquipPlace = place
- equipPart.XLAttrLV = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_EquipWashLV % place)
- equipPart.XLAttrList = []
- for attrNum in range(1, Def_EquipWashMaxAttrCount + 1):
- washValue = ChPyNetSendPack.tagMCEquipPartXLAttrValue()
- washValue.XLAttrValue = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_EquipWashValue % (place, attrNum))
- washValue.XLAttrChange = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_EquipWashValueTemp % (place, attrNum))
- equipPart.XLAttrList.append(washValue)
- if washValue.XLAttrValue or washValue.XLAttrChange:
- hasValue = True
-
- equipPart.XLAttrCnt = len(equipPart.XLAttrList)
- pack.InfoList.append(equipPart)
-
- pack.Count = len(pack.InfoList)
-
- # 登录同步时如果没有洗练属性则不同步
- if isLogin and not hasValue:
- return
-
- NetPackCommon.SendFakePack(curPlayer, pack)
- return
-
-def RefreshEquipWashAttr(curPlayer, classLV):
- ChEquip.RefreshPlayerEquipAttribute(curPlayer, classLV)
- #刷新所有属性
- playControl = PlayerControl.PlayerControl(curPlayer)
- playControl.RefreshPlayerAttrState()
- return
-
-def CalcAttr_EquipWash(curPlayer, equipIndex, equipPlace, baseAttrDictWash, allAttrList):
- ## 装备位洗练属性
- washLV = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_EquipWashLV % equipIndex)
- maxWashLV = GetEquipWashMaxLV(curPlayer, equipIndex, equipPlace)
- washLV = min(washLV, maxWashLV)
- washType = GetEquipWashType(equipPlace)
- if washType is None:
- return 0
- washData = GetEquipWashData(washType, washLV)
- if not washData:
- return 0
- #GameWorld.DebugLog("装备位属性: equipPlace=%s,washLV=%s" % (equipPlace, washLV))
- for attrNum in range(1, Def_EquipWashMaxAttrCount + 1):
- attrID = getattr(washData, "GetAttrType%s" % attrNum)()
- maxValue = getattr(washData, "GetAttrMax%s" % attrNum)()
- attrValue = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_EquipWashValue % (equipIndex, attrNum))
- attrValue = min(attrValue, maxValue)
- #GameWorld.DebugLog(" attrNum=%s,attrID=%s, attrValue=%s" % (attrNum, attrID, attrValue))
- if attrValue:
- PlayerControl.CalcAttrDict_Type(attrID, attrValue, allAttrList)
- baseAttrDictWash[attrID] = baseAttrDictWash.get(attrID, 0) + attrValue
- return washLV
-
-def EquipWashSuccess(curPlayer, classLV):
- ipyDataList = IpyGameDataPY.GetIpyGameDataByCondition('EquipPlaceIndexMap', {'ClassLV':classLV}, True)
- if not ipyDataList:
- return
-
- totalWashLV = GetTotalEquipWashLV(curPlayer)
- classWashLV = 0
- washLVCountDict = {}
- for ipyData in ipyDataList:
- index = ipyData.GetGridIndex()
- washLV = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_EquipWashLV % index)
- if not washLV:
- continue
- conditionKey = (classLV, washLV)
- washLVCountDict[conditionKey] = washLVCountDict.get(conditionKey, 0) + 1
- classWashLV += washLV
-
- #GameWorld.DebugLog("洗练成就数据: classLV=%s,washLVCountDict=%s,classWashLV=%s,totalWashLV=%s" % (classLV, washLVCountDict, classWashLV, totalWashLV))
- PlayerSuccess.UpdateSuccessProgressByConditions(curPlayer, ShareDefine.SuccType_EquipWash, washLVCountDict)
- PlayerSuccess.UptateSuccessProgress(curPlayer, ShareDefine.SuccType_EquipWashTotal, totalWashLV)
- PlayerSuccess.UptateSuccessProgress(curPlayer, ShareDefine.SuccType_EquipWashClass, classWashLV, [classLV])
- return
-
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/EventReport.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/EventReport.py
index fa374e0..ff7014e 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/EventReport.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/EventReport.py
@@ -723,13 +723,6 @@
__WriteEvent_mission_log(curPlayer, startType, missionName, isFinish, failReason)
return
-def WriteFuncCMEAcceptable(curPlayer, funcID):
- return
- if funcID not in ChConfig.FuncCMEDict:
- return
- WriteEvent_custom_mission_log(curPlayer, ChConfig.FuncCMEDict[funcID], ChConfig.CME_Log_Acceptable)
- return True
-
def WriteEvent_MWSuccess(curPlayer, mwID, succID, logType, isFinish=0):
'''写自定义任务 - 法宝成就事件, 事件ID格式: 91+法宝ID+至少4位的成就ID
'''
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GM/Commands/LingQi.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GM/Commands/LingQi.py
deleted file mode 100644
index 759f33f..0000000
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GM/Commands/LingQi.py
+++ /dev/null
@@ -1,58 +0,0 @@
-#!/usr/bin/python
-# -*- coding: GBK -*-
-#-------------------------------------------------------------------------------
-#
-##@package GM.Commands.LingQi
-#
-# @todo:灵器
-# @author hxp
-# @date 2021-07-02
-# @version 1.0
-#
-# 详细描述: 灵器
-#
-#-------------------------------------------------------------------------------
-#"""Version = 2021-07-02 19:00"""
-#-------------------------------------------------------------------------------
-
-import ChConfig
-import GameWorld
-import PlayerControl
-import ChEquip
-
-#---------------------------------------------------------------------
-#逻辑实现
-
-## GM命令执行入口
-# @param curPlayer 当前玩家
-# @param msgList 参数列表
-# @return None
-# @remarks 函数详细说明.
-def OnExec(curPlayer, msgList):
-
- if not msgList:
- GameWorld.DebugAnswer(curPlayer, "重置所有灵器: LingQi 0")
- GameWorld.DebugAnswer(curPlayer, "设置培养灵器: LingQi 装备位 培养类型 等阶 丹数")
- return
-
- if msgList[0] == 0:
- for equipPlace in ChConfig.EquipPlace_LingQi:
- for trainType in xrange(1, ChEquip.GetLingQiTrainTypes(equipPlace) + 1):
- PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_LingQiTrainLV % (equipPlace, trainType), 1)
- PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_LingQiTrainItemCount % (equipPlace, trainType), 0)
- ChEquip.Sync_LingQiTrainData(curPlayer, equipPlace)
-
- elif len(msgList) == 4:
- equipPlace, trainType, trainLV, eatItemCount = msgList
- PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_LingQiTrainLV % (equipPlace, trainType), trainLV)
- PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_LingQiTrainItemCount % (equipPlace, trainType), eatItemCount)
- ChEquip.Sync_LingQiTrainData(curPlayer, equipPlace)
- else:
- return
-
- # 刷属性
- ChEquip.RefreshPlayerLingQiEquipAttr(curPlayer)
- PlayerControl.PlayerControl(curPlayer).RefreshPlayerAttrState()
- return
-
-
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GM/Commands/OpenFunc.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GM/Commands/OpenFunc.py
index dd9af87..8cb4ac3 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GM/Commands/OpenFunc.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GM/Commands/OpenFunc.py
@@ -95,25 +95,37 @@
GameWorld.DebugLog("GM处理等级开启功能: openFuncID=%s,openFuncIDList=%s,needLV=%s" % (openFuncID, openFuncIDList, needLV), curPlayer.GetPlayerID())
# 优先处理升级
- if needLV:
+ if needLV > 1:
preLV = needLV - 1
curPlayer.SetLV(preLV)
PlayerControl.SetPlayerTotalExp(curPlayer, PlayerControl.GetTotalExpByPlayerLv(preLV))
PlayerControl.PlayerControl(curPlayer).PlayerLvUp()
-
+
+ # 获取等级需要的境界
+ ipyDataMgr = IpyGameDataPY.IPY_Data()
+ for index in range(ipyDataMgr.GetRealmCount()):
+ realmIpyData = ipyDataMgr.GetRealmByIndex(index)
+ if realmIpyData.GetLv() > needRealmLV:
+ needRealmLV = realmIpyData.GetLv()
+ if realmIpyData.GetLVMax() >= needLV:
+ break
+
GameWorld.DebugLog("GM处理境界开启功能: needRealmLV=%s" % needRealmLV, curPlayer.GetPlayerID())
if needRealmLV:
curPlayer.SetOfficialRank(max(ChConfig.Def_InitOfficialRank, needRealmLV - 1))
PlayerPrestigeSys.DoRealmLVUpLogic(curPlayer)
+ for limitMissionID in needMissionIDList:
+ if not curPlayer.NomalDictGetProperty(ChConfig.Def_Player_Dict_MissionFinish % limitMissionID):
+ PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_Player_Dict_MissionFinish % limitMissionID, 1)
+
GameWorld.DebugLog("GM处理任务开启功能: needMissionIDList=%s" % needMissionIDList, curPlayer.GetPlayerID())
#最后强制触发一次
- #if needMissionIDList:
- GameFuncComm.DoFuncOpenLogic(curPlayer, needMissionIDList)
+ GameFuncComm.DoFuncOpenLogic(curPlayer)
return
def __GetOpenFuncLimit(curPlayer, openFuncIDList):
- maxLV = PlayerControl.GetPlayerMaxLV(curPlayer)
+ maxLV = PlayerControl.GetOpenMaxLV()
needLV = 0
needRealmLV = 0
needMissionIDList = []
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GM/Commands/SetEquipPartPlusLV.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GM/Commands/SetEquipPartPlusLV.py
deleted file mode 100644
index 06c8127..0000000
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GM/Commands/SetEquipPartPlusLV.py
+++ /dev/null
@@ -1,103 +0,0 @@
-#!/usr/bin/python
-# -*- coding: GBK -*-
-#-------------------------------------------------------------------------------
-#
-#-------------------------------------------------------------------------------
-#
-##@package GM.Commands.SetEquipPartPlusLV
-#
-# @todo:设置装备部位公共强化等级
-# @author hxp
-# @date 2015-12-15
-# @version 1.0
-#
-# 详细描述: 设置装备部位公共强化等级
-#
-#---------------------------------------------------------------------
-"""Version = 2015-12-15 17:00"""
-#---------------------------------------------------------------------
-import Operate_EquipPlus
-import IPY_GameWorld
-import ChConfig
-import ChEquip
-import GameWorld
-import IpyGameDataPY
-#---------------------------------------------------------------------
-#逻辑实现
-## GM命令执行入口
-# @param curPlayer 当前玩家
-# @param cmdList 参数列表 [packType, index, starLV]
-# @return None
-# @remarks 函数详细说明.
-def OnExec(curPlayer, cmdList):
-
- packType = IPY_GameWorld.rptEquip
- curPack = curPlayer.GetItemManager().GetPack(packType)
- refreshClassLV = 0
-
- # 设置所有阶
- if len(cmdList) == 2:
- setStarLV, evolveLV = cmdList
- equipMaxClasslv = IpyGameDataPY.GetFuncCfg('EquipMaxClasslv')
- for equipPlace in ChConfig.Pack_EquipPart_CanPlusStar.get(packType, []):
- for classlv in xrange(1, equipMaxClasslv+1):
- ipyData = IpyGameDataPY.GetIpyGameData('EquipPlaceIndexMap', classlv, equipPlace)
- if not ipyData:
- continue
- gridIndex = ipyData.GetGridIndex()
- curEquip = curPack.GetAt(gridIndex)
- ChEquip.SetEquipPartPlusLV(curPlayer, packType, gridIndex, curEquip, setStarLV)
- ChEquip.SetEquipPartProficiency(curPlayer, packType, gridIndex, 0)
- ChEquip.SetEquipPartPlusEvolveLV(curPlayer, packType, gridIndex, evolveLV)
-
- GameWorld.DebugAnswer(curPlayer, "设置所有部位强化等级(%s),进化等级(%s)" % (setStarLV, evolveLV))
-
- # 设置指定阶
- elif len(cmdList) == 3:
- classLV, setStarLV, evolveLV = cmdList
- for equipPlace in ChConfig.Pack_EquipPart_CanPlusStar.get(packType, []):
- ipyData = IpyGameDataPY.GetIpyGameData('EquipPlaceIndexMap', classLV, equipPlace)
- if not ipyData:
- continue
- gridIndex = ipyData.GetGridIndex()
- curEquip = curPack.GetAt(gridIndex)
- ChEquip.SetEquipPartPlusLV(curPlayer, packType, gridIndex, curEquip, setStarLV)
- ChEquip.SetEquipPartProficiency(curPlayer, packType, gridIndex, 0)
- ChEquip.SetEquipPartPlusEvolveLV(curPlayer, packType, gridIndex, evolveLV)
-
- GameWorld.DebugAnswer(curPlayer, "设置%s阶所有部位强化等级(%s),进化等级(%s)" % (classLV, setStarLV, evolveLV))
- refreshClassLV = classLV
-
- # 设置指定阶部位
- elif len(cmdList) == 4:
- classLV, equipPlace, starLV, evolveLV = cmdList
-
- if equipPlace not in ChConfig.Pack_EquipPart_CanPlusStar[packType]:
- __GMHelpAnswer(curPlayer, "部位不存在!")
- return
- ipyData = IpyGameDataPY.GetIpyGameData('EquipPlaceIndexMap', classLV, equipPlace)
- if not ipyData:
- return
- gridIndex = ipyData.GetGridIndex()
- curEquip = curPack.GetAt(gridIndex)
- ChEquip.SetEquipPartPlusLV(curPlayer, packType, gridIndex, curEquip, starLV)
- ChEquip.SetEquipPartProficiency(curPlayer, packType, gridIndex, 0)
- ChEquip.SetEquipPartPlusEvolveLV(curPlayer, packType, gridIndex, evolveLV)
- GameWorld.DebugAnswer(curPlayer, "设置%s阶%s部位强化等级(%s),进化等级(%s)" % (classLV, equipPlace, starLV, evolveLV))
- refreshClassLV = classLV
-
- else:
- __GMHelpAnswer(curPlayer, "参数错误!")
- return
-
- Operate_EquipPlus.DoLogic_OnEquipPartStarLVChange(curPlayer, packType, refreshClassLV)
- ChEquip.NotifyEquipPartPlusLV(curPlayer, packType)
- return
-
-def __GMHelpAnswer(curPlayer, errorMsg=""):
- if errorMsg:
- GameWorld.DebugAnswer(curPlayer, "%s" % errorMsg)
- GameWorld.DebugAnswer(curPlayer, "设置所有阶级: SetEquipPartPlusLV 强化等级 进阶等级")
- GameWorld.DebugAnswer(curPlayer, "设置指定阶级: SetEquipPartPlusLV 阶级 强化等级 进阶等级")
- GameWorld.DebugAnswer(curPlayer, "设置指定部位: SetEquipPartPlusLV 阶级 部位 强化等级 进阶等级")
- return
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GM/Commands/SetEquipPartStar.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GM/Commands/SetEquipPartStar.py
deleted file mode 100644
index 80f1486..0000000
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GM/Commands/SetEquipPartStar.py
+++ /dev/null
@@ -1,90 +0,0 @@
-#!/usr/bin/python
-# -*- coding: GBK -*-
-#-------------------------------------------------------------------------------
-#
-#-------------------------------------------------------------------------------
-#
-##@package GM.Commands.SetEquipPartStar
-#
-# @todo:设置装备部位公共星数
-# @author xdh
-# @date 2019-3-2
-# @version 1.0
-#
-# 详细描述: 设置装备部位公共星数
-#
-#---------------------------------------------------------------------
-"""Version = 2019-3-2 17:00"""
-#---------------------------------------------------------------------
-import PlayerControl
-import ChEquip
-import GameWorld
-import IpyGameDataPY
-import ChConfig
-import IPY_GameWorld
-#---------------------------------------------------------------------
-#逻辑实现
-## GM命令执行入口
-# @param curPlayer 当前玩家
-# @param cmdList 参数列表 [classlv, equipPlace, starLV]
-# @return None
-# @remarks 函数详细说明.
-def OnExec(curPlayer, cmdList):
- if not cmdList:
- __GMHelpAnswer(curPlayer)
- return
- if len(cmdList) == 1:
- starLV = cmdList[0]
- equipMaxClasslv = IpyGameDataPY.GetFuncCfg('EquipMaxClasslv')
- for equipPlace in ChConfig.Pack_EquipPart_CanPlusStar.get(IPY_GameWorld.rptEquip, []):
- for classlv in xrange(1, equipMaxClasslv+1):
- ipyData = IpyGameDataPY.GetIpyGameData('EquipPlaceIndexMap', classlv, equipPlace)
- if not ipyData:
- continue
- equipPackIndex = ipyData.GetGridIndex()
- ChEquip.SetEquipPartStar(curPlayer, equipPackIndex, starLV)
- ChEquip.NotifyEquipPartStar(curPlayer)
- ChEquip.RefreshPlayerEquipAttribute(curPlayer)
- playControl = PlayerControl.PlayerControl(curPlayer)
- playControl.RefreshPlayerAttrState()
- GameWorld.DebugAnswer(curPlayer, "设置所有部位星数为: %s" % (starLV))
- elif len(cmdList) == 2:
- classLV, starLV = cmdList
- for equipPlace in ChConfig.Pack_EquipPart_CanPlusStar.get(IPY_GameWorld.rptEquip, []):
-
- ipyData = IpyGameDataPY.GetIpyGameData('EquipPlaceIndexMap', classLV, equipPlace)
- if not ipyData:
- continue
- equipPackIndex = ipyData.GetGridIndex()
- ChEquip.SetEquipPartStar(curPlayer, equipPackIndex, starLV)
- ChEquip.NotifyEquipPartStar(curPlayer)
- ChEquip.RefreshPlayerEquipAttribute(curPlayer, classLV)
- playControl = PlayerControl.PlayerControl(curPlayer)
- playControl.RefreshPlayerAttrState()
- GameWorld.DebugAnswer(curPlayer, "设置%s阶所有部位星数为: %s" % (classLV, starLV))
-
- if len(cmdList) != 3:
- return
- classLV, equipPlace, starLV = cmdList
- ipyData = IpyGameDataPY.GetIpyGameData('EquipPlaceIndexMap', classLV, equipPlace)
- if not ipyData:
- __GMHelpAnswer(curPlayer)
- return
- equipPackIndex = ipyData.GetGridIndex()
- ChEquip.SetEquipPartStar(curPlayer, equipPackIndex, starLV)
- ChEquip.NotifyEquipPartStar(curPlayer, equipPackIndex)
- ChEquip.RefreshPlayerEquipAttribute(curPlayer, classLV)
- playControl = PlayerControl.PlayerControl(curPlayer)
- playControl.RefreshPlayerAttrState()
- GameWorld.DebugAnswer(curPlayer, "设置%s阶%s部位星数为: %s" % (classLV, equipPlace, starLV))
- return
-
-
-def __GMHelpAnswer(curPlayer, errorMsg=""):
- if errorMsg:
- GameWorld.DebugAnswer(curPlayer, "%s" % errorMsg)
- GameWorld.DebugAnswer(curPlayer, "SetEquipPartStar 星数")
- GameWorld.DebugAnswer(curPlayer, "SetEquipPartStar 阶级 星数")
- GameWorld.DebugAnswer(curPlayer, "SetEquipPartStar 阶级 部位 星数")
-
- return
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GM/Commands/SetEquipWash.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GM/Commands/SetEquipWash.py
deleted file mode 100644
index aff2394..0000000
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GM/Commands/SetEquipWash.py
+++ /dev/null
@@ -1,111 +0,0 @@
-#!/usr/bin/python
-# -*- coding: GBK -*-
-#-------------------------------------------------------------------------------
-#
-##@package GM.Commands.SetEquipWash
-#
-# @todo:设置装备洗练
-# @author hxp
-# @date 2017-08-09
-# @version 1.0
-#
-# 详细描述: 设置装备洗练
-#
-#-------------------------------------------------------------------------------
-#"""Version = 2017-08-09 15:00"""
-#-------------------------------------------------------------------------------
-import Operate_EquipWash
-import PlayerControl
-import ChConfig
-import GameWorld
-import IpyGameDataPY
-
-#---------------------------------------------------------------------
-#逻辑实现
-## GM命令执行入口
-# @param curPlayer 当前玩家
-# @param cmdList 参数列表 [packType, index, starLV]
-# @return None
-# @remarks 函数详细说明.
-def OnExec(curPlayer, cmdList):
- if not cmdList:
- __GMHelpAnswer(curPlayer)
- return
-
- classLV = 0
- allIndexList = Operate_EquipWash.GetAllEquipWashPlace()
- syncPlace = -1
- if len(cmdList) == 1 and cmdList[0] == 0:
- for index in allIndexList:
- Operate_EquipWash.SetEquipWashLV(curPlayer, index, 0)
- for attrNum in range(1, Operate_EquipWash.Def_EquipWashMaxAttrCount + 1):
- PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_EquipWashValue % (index, attrNum), 0)
- PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_EquipWashValueTemp % (index, attrNum), 0)
- GameWorld.DebugLog("重置所有洗练数据")
-
- elif len(cmdList) == 2:
- isSync = False
- washLV, attrPer = cmdList
- for equipPackindex in allIndexList:
- ipyData = IpyGameDataPY.GetIpyGameDataByCondition('EquipPlaceIndexMap', {'GridIndex':equipPackindex})
- if not ipyData:
- continue
- equipPlace = ipyData.GetEquipPlace()
- maxWashLV = Operate_EquipWash.GetEquipWashMaxLV(curPlayer, equipPackindex, equipPlace)
- #if maxWashLV < 1:
- # continue
- __SetEquipPlaceWashLV(curPlayer, equipPackindex, equipPlace, washLV, attrPer, maxWashLV)
- isSync = True
- if not isSync:
- return
-
- elif len(cmdList) == 4:
- classLV, place, washLV, attrPer = cmdList
- ipyData = IpyGameDataPY.GetIpyGameData('EquipPlaceIndexMap', classLV, place)
- if not ipyData:
- return
-
- gridIndex = ipyData.GetGridIndex()
- syncPlace = gridIndex
- maxWashLV = Operate_EquipWash.GetEquipWashMaxLV(curPlayer, gridIndex, place)
- #if maxWashLV < 1:
- # return
- __SetEquipPlaceWashLV(curPlayer, gridIndex, place, washLV, attrPer, maxWashLV)
-
- else:
- __GMHelpAnswer(curPlayer)
- return
-
- Operate_EquipWash.RefreshEquipWashAttr(curPlayer, classLV)
- Operate_EquipWash.Sycn_EquipWashInfo(curPlayer, syncPlace)
- return
-
-def __SetEquipPlaceWashLV(curPlayer, equipPackindex, place, washLV, attrPer, maxWashLV):
- washLV = min(maxWashLV, washLV)
- washLV = max(0, washLV)
- attrPer = max(0, attrPer)
- attrPer = min(100, attrPer)
-
- washType = Operate_EquipWash.GetEquipWashType(place)
- washData = Operate_EquipWash.GetEquipWashData(washType, washLV)
- preWashData = None if washLV <= 0 else Operate_EquipWash.GetEquipWashData(washType, washLV - 1)
-
- #GameWorld.DebugLog("设置洗练: place=%s,washType=%s,washLV=%s,attrPer=%s" % (place, washType, washLV, attrPer))
- Operate_EquipWash.SetEquipWashLV(curPlayer, equipPackindex, washLV)
- for attrNum in range(1, Operate_EquipWash.Def_EquipWashMaxAttrCount + 1):
- preMaxValue = 0 if not preWashData else getattr(preWashData, "GetAttrMax%s" % attrNum)()
- curMaxValue = getattr(washData, "GetAttrMax%s" % attrNum)()
- value = preMaxValue + int((curMaxValue - preMaxValue) * attrPer / 100.0)
- PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_EquipWashValue % (equipPackindex, attrNum), value)
- PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_EquipWashValueTemp % (equipPackindex, attrNum), 0)
- #GameWorld.DebugLog(" attrNum=%s,value=%s" % (attrNum, value))
-
- return
-
-def __GMHelpAnswer(curPlayer):
- GameWorld.DebugAnswer(curPlayer, "重置所有部位洗练: SetEquipWash 0")
- GameWorld.DebugAnswer(curPlayer, "设置所有部位洗练: SetEquipWash 等级 百分比")
- GameWorld.DebugAnswer(curPlayer, "设置指定部位洗练: SetEquipWash 阶级 装备位 等级 百分比")
- return
-
-
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GM/Commands/SetItemStarLV.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GM/Commands/SetItemStarLV.py
deleted file mode 100644
index 3f44e45..0000000
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GM/Commands/SetItemStarLV.py
+++ /dev/null
@@ -1,48 +0,0 @@
-#!/usr/bin/python
-# -*- coding: GBK -*-
-#---------------------------------------------------------------------
-#
-#---------------------------------------------------------------------
-##@package SetItemStarLV
-# @todo: 设置装备星数
-#
-# @author: panwei
-# @date 2011-10-25
-# @version 1.2
-#
-# @note:
-# @change: "2013-05-10 17:00" wdb 升星修改
-# @change: "2014-04-08 19:00" hxp 最大星级判断修改
-#---------------------------------------------------------------------
-"""Version = 2014-04-08 19:00"""
-#---------------------------------------------------------------------
-import IPY_GameWorld
-import ItemCommon
-import ChConfig
-#---------------------------------------------------------------------
-#逻辑实现
-## GM命令执行入口
-# @param curPlayer 当前玩家
-# @param cmdList 参数列表 [index,starLV]
-# @return None
-# @remarks 函数详细说明.
-def OnExec(curPlayer, cmdList):
-#===============================================================================
-# if len(cmdList) != 2:
-# return
-#
-# #获取命令参数
-# itemIndex, starLV = cmdList
-# if starLV < 0:
-# return
-#
-# #获取物品
-# curItem = curPlayer.GetItemManager().GetPack(IPY_GameWorld.rptItem).GetAt(itemIndex)
-# if not ItemCommon.CheckItemIsEquip(curItem):
-# return
-#
-# maxStarLV = ItemCommon.GetItemMaxStarLV(curItem)
-# curItem.SetItemStarLV(min(starLV, maxStarLV))
-#===============================================================================
- return
-
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/FBProcess/FBCommon.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/FBProcess/FBCommon.py
index 8974cc0..3e62f1a 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/FBProcess/FBCommon.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/FBProcess/FBCommon.py
@@ -2005,9 +2005,6 @@
PlayerControl.SendMailByKey("BuyLoveFBCntCoupleMail", [coupleID], addItemList, paramList)
return
-def DoFuncOpen_RunDaily(curPlayer): return EventReport.WriteFuncCMEAcceptable(curPlayer, ShareDefine.GameFuncID_RunDaily)
-def DoFuncOpen_RunFamily(curPlayer): return EventReport.WriteFuncCMEAcceptable(curPlayer, ShareDefine.GameFuncID_RunFamily)
-
#---------------------------------------------------------------------
## 副本开启提示(几分钟)
# @param openTimeList 开启时间列表[(开启时钟,开启分钟), ]
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 1d0363f..48a75d3 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Item/ChEquip.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Item/ChEquip.py
@@ -16,16 +16,9 @@
#------------------------------------------------------------------------------
import IPY_GameWorld
import GameWorld
-import ItemControler
-import PlayerControl
import ChConfig
-import ItemCommon
import ShareDefine
-import ChPyNetSendPack
-import NetPackCommon
import IpyGameDataPY
-import OpenServerCampaign
-import FormulaControl
import PlayerOnline
def RefreshRoleEquipAttr(curPlayer):
@@ -72,13 +65,6 @@
PlayerOnline.GetOnlinePlayer(curPlayer).SetCalcAttr(ChConfig.Def_CalcAttr_MainEquip, mainEquipAttrDict)
return
-## 刷新装备对人物属性的改变
-# @param self 类实例
-# @return 返回值无意义
-# @remarks 刷新装备对人物属性的改变
-def RefreshPlayerEquipAttribute(curPlayer, classLV=0):
- return
-
#// A3 18 灵器突破 #tagCMLingQiEquipBreak
#
#struct tagCMLingQiEquipBreak
@@ -87,71 +73,6 @@
# DWORD ItemID; //突破的物品ID
#};
def OnLingQiEquipBreak(index, clientData, tick):
- curPlayer = GameWorld.GetPlayerManager().GetPlayerByIndex(index)
- breakItemID = clientData.ItemID
- ipyData = IpyGameDataPY.GetIpyGameData('LingQiAttr', breakItemID)
- if not ipyData:
- return
- nextItemID = ipyData.GetNextItemID() #突破后的物品ID
- if not IpyGameDataPY.GetIpyGameData('LingQiAttr', nextItemID):
- return
- breakItemData = GameWorld.GetGameData().GetItemByTypeID(breakItemID)
- nextItemData = GameWorld.GetGameData().GetItemByTypeID(nextItemID)
- if not breakItemData or not nextItemData:
- return
- equipIndex = ItemCommon.GetEquipPackIndex(breakItemData)
- if equipIndex != ItemCommon.GetEquipPackIndex(nextItemData):
- GameWorld.DebugLog("突破的物品和突破后的物品不是同个装备位!breakItemID=%s,nextItemID=%s"
- % (breakItemID, nextItemID))
- return
- equipPack = curPlayer.GetItemManager().GetPack(IPY_GameWorld.rptEquip)
- curEquip = equipPack.GetAt(equipIndex)
- if not curEquip or curEquip.IsEmpty():
- GameWorld.DebugLog("突破的物品未穿戴!breakItemID=%s"
- % (breakItemID))
- return
- if curEquip.GetEndureReduceType():
- GameWorld.DebugLog("突破的物品是时效物品!breakItemID=%s"
- % (breakItemID))
- return
- if curEquip.GetItemTypeID() != breakItemID:
- GameWorld.DebugLog("突破的物品未穿戴!breakItemID=%s"
- % (breakItemID))
- return
-
-
- costItemDict = ipyData.GetUpCostItem()
- itemPack = curPlayer.GetItemManager().GetPack(IPY_GameWorld.rptItem)
- lackItemDict, delInfoDict = ItemCommon.GetCostItemIndexList(costItemDict, itemPack)
- if lackItemDict:
- GameWorld.DebugLog("突破消耗物品不足!breakItemID=%s,costItemDict=%s,lackItemDict=%s"
- % (breakItemID, costItemDict, lackItemDict))
- return
-
- #扣消耗
- ItemCommon.DelCostItem(curPlayer, itemPack, delInfoDict, 'LingQiEquipBreak')
- ItemCommon.DelItem(curPlayer, curEquip, 1, False, ChConfig.ItemDel_LingQiEquipBreak, {}, True)
- #给突破后灵器
- if not ItemControler.PutItemInTempSwap(curPlayer, nextItemID):
- GameWorld.Log("灵器突破后ID(%s)放入临时交换背包失败!" % (nextItemID), curPlayer.GetID())
- return
- ItemCommon.DoLogicSwitchItemEx(curPlayer, ShareDefine.rptTempSwap, IPY_GameWorld.rptEquip, 0, equipIndex)
-
- changeItemStarLV = 0 #curItem.GetItemStarLV()
- changeItemStoneCnt = 0 #curItem.GetUseStoneCount()
- changeItemHoleCnt = 0 #curItem.GetCanPlaceStoneCount()
- changeItemUseData = ''
- curPlayer.ChangeEquip(nextItemID, equipIndex, changeItemStarLV, changeItemHoleCnt, changeItemStoneCnt, changeItemUseData)
- #刷属性
- RefreshPlayerLingQiEquipAttr(curPlayer)
- playControl = PlayerControl.PlayerControl(curPlayer)
- playControl.RefreshPlayerAttrState()
- #通知结果
- resultPack = ChPyNetSendPack.tagMCLingQiEquipBreakResult()
- resultPack.Clear()
- resultPack.MakeItemID = nextItemID
- NetPackCommon.SendFakePack(curPlayer, resultPack)
- PlayerControl.WorldNotify(0, 'SpiritOrgan', [curPlayer.GetName(), breakItemID, nextItemID])
return
#// A3 27 灵器培养 #tagCMLingQiTrain
@@ -164,220 +85,11 @@
# WORD UseItemCnt; //消耗材料个数
#};
def OnLingQiTrain(index, clientData, tick):
- curPlayer = GameWorld.GetPlayerManager().GetPlayerByIndex(index)
-
- equipPlace = clientData.EquipPlace # 灵器装备位
- trainType = clientData.TrainType # 培养类型
- costItemCount = clientData.UseItemCnt # 消耗材料个数
-
- trainLV = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_LingQiTrainLV % (equipPlace, trainType))
- curEatItemCount = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_LingQiTrainItemCount % (equipPlace, trainType))
- GameWorld.DebugLog("灵器培养: equipPlace=%s,trainType=%s,trainLV=%s,costItemCount=%s,curEatItemCount=%s"
- % (equipPlace, trainType, trainLV, costItemCount, curEatItemCount))
-
- if equipPlace not in ChConfig.EquipPlace_LingQi:
- return
-
- if trainType <= 0 or trainType > GetLingQiTrainTypes(equipPlace):
- return
-
- if trainLV <= 0:
- GameWorld.DebugLog(" 培养未激活 trainType=%s" % trainType)
- return
-
- trainIpyData = IpyGameDataPY.GetIpyGameData("LingQiTrain", equipPlace, trainType, trainLV)
- if not trainIpyData:
- return
-
- needRealmLV = trainIpyData.GetNeedRealmLV()
- curRealmLV = PlayerControl.GetTrainRealmLVReal(curPlayer, 3)
- if curRealmLV < needRealmLV:
- GameWorld.DebugLog(" 境界不足,无法培养! curRealmLV(%s) < needRealmLV(%s)" % (curRealmLV, needRealmLV))
- return
-
- needEatCountTotal = trainIpyData.GetEatCntTotal()
- if not needEatCountTotal:
- GameWorld.DebugLog(" 该培养已满级!")
- return
-
- costItemIDList = IpyGameDataPY.GetFuncEvalCfg("LingQiTrain", 1, {}).get(str(equipPlace), [])
- costItemID = costItemIDList[trainType - 1]
- if not costItemID or not costItemCount:
- return
-
- costItemIndexList, bindCnt, unBindCnt = ItemCommon.GetPackItemBindStateIndexInfo(curPlayer, costItemID, costItemCount)
- lackCnt = costItemCount - bindCnt - unBindCnt
- if lackCnt > 0:
- GameWorld.DebugLog(" 消耗道具不足,无法培养!costItemID=%s,costItemCount=%s,bindCnt=%s,unBindCnt=%s,lackCnt=%s"
- % (costItemID, costItemCount, bindCnt, unBindCnt, lackCnt))
- return
-
- delCnt = costItemCount
-
- # 扣除消耗
- if delCnt:
- ItemCommon.DelCostItemByBind(curPlayer, costItemIndexList, bindCnt, unBindCnt, delCnt, "LingQiTrain")
-
- updClassLV = trainLV
- updEatItemCount = curEatItemCount + costItemCount
- GameWorld.DebugLog(" updEatItemCount=%s,needEatCountTotal=%s" % (updEatItemCount, needEatCountTotal))
-
- if updEatItemCount >= needEatCountTotal:
- updClassLV += 1
- updEatItemCount -= needEatCountTotal
- GameWorld.DebugLog(" 进阶: updClassLV=%s,updEatItemCount=%s" % (updClassLV, updEatItemCount))
-
- PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_LingQiTrainLV % (equipPlace, trainType), updClassLV)
- PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_LingQiTrainItemCount % (equipPlace, trainType), updEatItemCount)
-
- # 升阶
- if updClassLV > trainLV:
- pass
-
- Sync_LingQiTrainData(curPlayer, equipPlace)
- # 刷属性
- RefreshPlayerLingQiEquipAttr(curPlayer)
- PlayerControl.PlayerControl(curPlayer).RefreshPlayerAttrState()
- return
-
-def GetLingQiTrainTypes(equipPlace):
- return len(IpyGameDataPY.GetFuncEvalCfg("LingQiTrain", 1, {}).get(str(equipPlace), []))
-
-def Sync_LingQiTrainData(curPlayer, equipPlace):
- clientPack = ChPyNetSendPack.tagMCLingQiTrainInfo()
- clientPack.EquipPlace = equipPlace
- clientPack.TrainLVList = []
- clientPack.TrainItemCountList = []
- for trainType in xrange(1, GetLingQiTrainTypes(equipPlace) + 1):
- trainLV = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_LingQiTrainLV % (equipPlace, trainType))
- if trainLV == 0:
- trainLV = 1
- PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_LingQiTrainLV % (equipPlace, trainType), trainLV)
- clientPack.TrainLVList.append(trainLV)
- clientPack.TrainItemCountList.append(curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_LingQiTrainItemCount % (equipPlace, trainType)))
- clientPack.TrainTypes = len(clientPack.TrainLVList)
- NetPackCommon.SendFakePack(curPlayer, clientPack)
return
def RefreshPlayerLingQiEquipAttr(curPlayer):
''' 刷新玩家灵器装备属性
'''
- return
- classLV = 0 # 灵器阶默认为0
- allAttrList = [{} for _ in range(4)]
- lingQiAttrList = [{} for _ in range(4)]
- equipPack = curPlayer.GetItemManager().GetPack(IPY_GameWorld.rptEquip)
- equipScoreTotal = 0
- lv = curPlayer.GetLV()
- lqAttrFormatDict = IpyGameDataPY.GetFuncEvalCfg("OutOfPrintValue", 2, {})
-
- for equipPlace in ChConfig.EquipPlace_LingQi:
-
- ipyData = IpyGameDataPY.GetIpyGameData('EquipPlaceIndexMap', classLV, equipPlace)
- if not ipyData:
- continue
-
- equipIndex = ipyData.GetGridIndex()
- curEquip = equipPack.GetAt(equipIndex)
- if not curEquip or curEquip.IsEmpty():
- continue
-
- if not ItemCommon.CheckItemCanUseByExpireTime(curEquip):
- # 过期
- continue
-
- equipScoreTotal += ItemCommon.GetEquipGearScore(curEquip)
-
- itemID = curEquip.GetItemTypeID()
- #基础属性效果
- for effIndex in xrange(curEquip.GetEffectCount()):
- curEff = curEquip.GetEffectByIndex(effIndex)
- effID = curEff.GetEffectID()
- if effID == 0:
- break
- PlayerControl.CalcAttrDict_Type(effID, curEff.GetEffectValue(0), lingQiAttrList)
-
- #灵器属性
- lingQiIpyData = IpyGameDataPY.GetIpyGameDataNotLog("LingQiAttr", itemID)
- if lingQiIpyData:
- lingQiAttrIDList = lingQiIpyData.GetLingQiAttrID()
- lingQiAttrValueList = lingQiIpyData.GetLingQiAttrValue()
- for lqIndex, lqAttrID in enumerate(lingQiAttrIDList):
- if str(lqAttrID) in lqAttrFormatDict:
- attrFormat = lqAttrFormatDict[str(lqAttrID)]
- maxOOPValue = lingQiAttrValueList[lqIndex]
- lqAttrValue = eval(FormulaControl.GetCompileFormula("LingQiAttrFormat_%s" % lqAttrID, attrFormat))
- else:
- lqAttrValue = lingQiAttrValueList[lqIndex]
-
- PlayerControl.CalcAttrDict_Type(lqAttrID, lqAttrValue, lingQiAttrList)
-
- # 新培养属性
- guardTrainAttrList = [{} for _ in range(4)]
- wingTrainAttrList = [{} for _ in range(4)]
- peerlessWeaponTrainAttrList = [{} for _ in range(4)]
- peerlessWeapon2TrainAttrList = [{} for _ in range(4)]
- ipyDataMgr = IpyGameDataPY.IPY_Data()
- for index in xrange(ipyDataMgr.GetLingQiTrainCount()):
- trainIpyData = ipyDataMgr.GetLingQiTrainByIndex(index)
- equipPlace = trainIpyData.GetEquipPlace()
- trainType = trainIpyData.GetTrainType()
- dataTrainLV = trainIpyData.GetTrainLV()
-
- if equipPlace == ShareDefine.retGuard1:
- lingQiTrainAttrList = guardTrainAttrList
- elif equipPlace == ShareDefine.retWing:
- lingQiTrainAttrList = wingTrainAttrList
- elif equipPlace == ShareDefine.retPeerlessWeapon:
- lingQiTrainAttrList = peerlessWeaponTrainAttrList
- elif equipPlace == ShareDefine.retPeerlessWeapon2:
- lingQiTrainAttrList = peerlessWeapon2TrainAttrList
- else:
- continue
-
- trainLV = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_LingQiTrainLV % (equipPlace, trainType))
-
- if dataTrainLV > trainLV:
- continue
- elif dataTrainLV == trainLV:
- trainItemCount = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_LingQiTrainItemCount % (equipPlace, trainType))
- else:
- trainItemCount = trainIpyData.GetEatCntTotal()
-
- # 等阶额外属性
- lvAttrTypeList = trainIpyData.GetLVAttrTypeList()
- lvAttrValueList = trainIpyData.GetLVAttrValueList()
- for i, attrID in enumerate(lvAttrTypeList):
- attrValue = lvAttrValueList[i]
- PlayerControl.CalcAttrDict_Type(attrID, attrValue, lingQiTrainAttrList)
-
- # 培养丹增加属性
- eatCntEverytime = trainIpyData.GetEatCntEverytime()
- if trainItemCount and eatCntEverytime:
- eatItemAttrTypeList = trainIpyData.GetEatItemAttrTypeList()
- eatItemAttrValueList = trainIpyData.GetEatItemAttrValueList()
- attrMultiple = trainItemCount / eatCntEverytime
- for i, attrID in enumerate(eatItemAttrTypeList):
- attrValue = eatItemAttrValueList[i]
- PlayerControl.CalcAttrDict_Type(attrID, attrValue * attrMultiple, lingQiTrainAttrList)
-
- #GameWorld.DebugLog("守护培养属性: %s" % guardTrainAttrList)
- #GameWorld.DebugLog("翅膀培养属性: %s" % wingTrainAttrList)
- #GameWorld.DebugLog("灭世培养属性: %s" % peerlessWeaponTrainAttrList)
- #GameWorld.DebugLog("噬魂培养属性: %s" % peerlessWeapon2TrainAttrList)
- PlayerControl.SetCalcAttrListValue(curPlayer, ChConfig.Def_CalcAttrFunc_GuardTarin, guardTrainAttrList)
- PlayerControl.SetCalcAttrListValue(curPlayer, ChConfig.Def_CalcAttrFunc_WingTarin, wingTrainAttrList)
- PlayerControl.SetCalcAttrListValue(curPlayer, ChConfig.Def_CalcAttrFunc_PeerlessWeaponTrain, peerlessWeaponTrainAttrList)
- PlayerControl.SetCalcAttrListValue(curPlayer, ChConfig.Def_CalcAttrFunc_PeerlessWeapon2Train, peerlessWeapon2TrainAttrList)
-
- lqFightPowerEx = eval(IpyGameDataPY.GetFuncCompileCfg("FightpowerFormula", 2))
- PlayerControl.SetMFPExFightPower(curPlayer, ShareDefine.Def_MFPType_LingQi, lqFightPowerEx)
-
- #GameWorld.DebugLog("灵器属性1: %s" % allAttrList)
- #GameWorld.DebugLog("灵器属性2: %s" % lingQiAttrList)
- #GameWorld.DebugLog("灵器评分战力: equipScoreTotal=%s, %s" % (equipScoreTotal, lqFightPowerEx))
- PlayerControl.SetCalcAttrListValue(curPlayer, ChConfig.Def_CalcAttrFunc_LingQi, allAttrList)
- PlayerControl.SetCalcAttrListValue(curPlayer, ChConfig.Def_CalcAttrFunc_LingQiAttr, lingQiAttrList)
return
def CalcAttr_LegendAttr(curPlayer, curEquip, allAttrListEquip, legendAttrDict={}):
@@ -395,81 +107,7 @@
# BYTE Star; // 星数
#};
def OnEquipPartSuiteActivate(index, clientData, tick):
- curPlayer = GameWorld.GetPlayerManager().GetPlayerByIndex(index)
- classLV = clientData.ClassLV
- suiteID = clientData.SuiteID
- suiteCount = clientData.SuiteCount
- star = clientData.Star
- ipyDataList = IpyGameDataPY.GetIpyGameDataList('EquipSuitAttr', suiteID)
- if not ipyDataList:
- return
-
- actIpyData = None
- for ipyData in ipyDataList:
- needCount = ipyData.GetSuiteCnt()
- needStar = ipyData.GetStar()
- if suiteCount == needCount and star == needStar:
- actIpyData = ipyData
- break
-
- if not actIpyData:
- return
- activateIndex = actIpyData.GetActivateIndex()
- # 这里就不判断是否满足件数、星数条件了,算属性的时候本身也是条件之一,是否激活只是附加条件,这里只处理激活状态变更,能否激活前端判断即可
- isActivate = GameWorld.GetDictValueByBit(curPlayer, ChConfig.Def_PDict_EquipPartSuiteActivate, activateIndex)
- if isActivate:
- return
- GameWorld.SetDictValueByBit(curPlayer, ChConfig.Def_PDict_EquipPartSuiteActivate, activateIndex, 1)
- Sync_EquipPartSuiteActivateInfo(curPlayer)
-
- #广播
- notifyMark = actIpyData.GetIsNotify()
- if notifyMark:
- PlayerControl.WorldNotify(0, 'AllStarLevelUp' if needStar else 'AllStarLevelUp2', [curPlayer.GetPlayerName(), suiteID, suiteCount, star])
-
- RefreshPlayerEquipAttribute(curPlayer, classLV)
- #刷新所有属性
- playControl = PlayerControl.PlayerControl(curPlayer)
- playControl.RefreshPlayerAttrState()
return
-
-def Sync_EquipPartSuiteActivateInfo(curPlayer):
- ## 同步装备位星级套装激活状态信息
- #keyCount = 10
- ipyDataMgr = IpyGameDataPY.IPY_Data()
- dataCount = ipyDataMgr.GetEquipSuitAttrCount()
- if not dataCount:
- return
- lastIpyData = ipyDataMgr.GetEquipSuitAttrByIndex(dataCount - 1)
- if not lastIpyData:
- return
- keyCount = 1 + lastIpyData.GetActivateIndex() / 31
- activateStateList = []
- for i in xrange(keyCount):
- activateStateList.append(curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_EquipPartSuiteActivate % i))
- if activateStateList.count(0) == keyCount:
- return
- activateInfo = ChPyNetSendPack.tagMCEquipPartSuiteActivateInfo()
- activateInfo.SuiteActivateStateInfo = activateStateList
- activateInfo.Count = len(activateInfo.SuiteActivateStateInfo)
- NetPackCommon.SendFakePack(curPlayer, activateInfo)
- return
-
-def ChangeEquipEffectByPlusMaster(curPlayer, classLV):
- # 强化大师特效
- if (classLV != GetEquipFacadeClassLV(curPlayer)):
- return
-
- masterPlusLV = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_EquipPartMasterPlusLV % classLV)
- ## 强化大师影响角色外观显示 强化大师等级 * 1000+第几套*10+是否有套装
- oldEquipShowSwitch = curPlayer.GetEquipShowSwitch()
- updEquipShowSwitch = oldEquipShowSwitch % 1000 + oldEquipShowSwitch / 1000000 * 1000000+ 1000 * masterPlusLV
- GameWorld.DebugLog('强化大师影变化影响角色外观显示,oldEquipShowSwitch=%s,updEquipShowSwitch=%s'%
- (oldEquipShowSwitch, updEquipShowSwitch))
- if oldEquipShowSwitch != updEquipShowSwitch:
- curPlayer.SetEquipShowSwitch(updEquipShowSwitch)
- return
-
def ChangeEquipfacadeByHorsePetSkin(curPlayer, skinType, skinIndex):
##骑宠觉醒外观变更 灵宠外观索引*10000000+坐骑外观索引*1000000+灵根特效表key * 1000+第几套*10+是否有套装
@@ -521,198 +159,7 @@
return 0
-#获取当前是第几套装备外观
-def GetEquipFacadeClassLV(curPlayer):return curPlayer.GetEquipShowSwitch()%1000/10
-
-## 获取公共部位强化熟练度
-def GetEquipPartProficiency(curPlayer, packType, index):
- return curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_EquipPartProficiency % (packType, index))
-
-## 设置公共部位强化熟练度
-def SetEquipPartProficiency(curPlayer, packType, index, value):
- PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_EquipPartProficiency % (packType, index), value)
- return
-
-## 获取公共部位强化等级
-def GetEquipPartPlusLV(curPlayer, packType, index):
- return curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_EquipPartPlusLV % (packType, index))
-
-## 设置公共部位强化等级
-def SetEquipPartPlusLV(curPlayer, packType, index, curEquip, setPlusLV):
- befPlusLV = GetEquipPartPlusLV(curPlayer, packType, index)
- if befPlusLV == setPlusLV:
- return
-
- PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_EquipPartPlusLV % (packType, index), setPlusLV)
- #===========================================================================
- # if curEquip and not curEquip.IsEmpty():
- # curEquip.SetItemStarLV(starLV)
- #===========================================================================
-
- # 同步更新强化总等级
- befTotalPlusLV = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_TotalPlusLV)
- updTotalPlusLV = max(0, befTotalPlusLV + setPlusLV - befPlusLV)
- PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_TotalPlusLV, updTotalPlusLV)
- GameWorld.DebugLog("设置强化等级: index=%s,befPlusLV=%s,setPlusLV=%s,befTotalPlusLV=%s,updTotalPlusLV=%s"
- % (index, befPlusLV, setPlusLV, befTotalPlusLV, updTotalPlusLV))
- return
-
-## 获取公共部位强化进化等级
-def GetEquipPartPlusEvolveLV(curPlayer, packType, index):
- return curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_EquipPartPlusEvolveLV % (packType, index))
-
-
-## 设置公共部位强化进化等级
-def SetEquipPartPlusEvolveLV(curPlayer, packType, index, setEvolveLV):
- befEvolveLV = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_EquipPartPlusEvolveLV % (packType, index))
- if befEvolveLV == setEvolveLV:
- return
- PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_EquipPartPlusEvolveLV % (packType, index), setEvolveLV)
-
- # 同步更新进化总等级
- befTotalPlusEvolveLV = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_TotalPlusEvolveLV)
- updTotalPlusEvolveLV = max(0, befTotalPlusEvolveLV + setEvolveLV - befEvolveLV)
- PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_TotalPlusEvolveLV, updTotalPlusEvolveLV)
- GameWorld.DebugLog("设置进化等级: index=%s,befEvolveLV=%s,setEvolveLV=%s,befTotalPlusEvolveLV=%s,updTotalPlusEvolveLV=%s"
- % (index, befEvolveLV, setEvolveLV, befTotalPlusEvolveLV, updTotalPlusEvolveLV))
- return
-
-## 通知公共部位强化等级
-def NotifyEquipPartPlusLV(curPlayer, packType=IPY_GameWorld.rptEquip, index=None):
- ePartStarLVPack = ChPyNetSendPack.tagMCEquipPartPlusInfo()
- ePartStarLVPack.Clear()
- ePartStarLVPack.InfoList = []
-
- syncIndexList = []
- if index == None:
- equipMaxClasslv = IpyGameDataPY.GetFuncCfg('EquipMaxClasslv')
- for equipPlace in ChConfig.Pack_EquipPart_CanPlusStar.get(packType, []):
- for classlv in xrange(1, equipMaxClasslv+1):
- ipyData = IpyGameDataPY.GetIpyGameData('EquipPlaceIndexMap', classlv, equipPlace)
- if not ipyData:
- continue
- syncIndexList.append(ipyData.GetGridIndex())
- else:
- syncIndexList = [index]
-
- for i in syncIndexList:
- ePartStarLV = ChPyNetSendPack.tagMCEquipPartPlusLV()
- ePartStarLV.Clear()
- ePartStarLV.PackType = packType
- ePartStarLV.EquipIndex = i
- ePartStarLV.EquipPartStarLV = GetEquipPartPlusLV(curPlayer, packType, i)
- ePartStarLV.Proficiency = GetEquipPartProficiency(curPlayer, packType, i)
- ePartStarLV.EvolveLV = GetEquipPartPlusEvolveLV(curPlayer, packType, i)
- ePartStarLVPack.InfoList.append(ePartStarLV)
-
- ePartStarLVPack.Count = len(ePartStarLVPack.InfoList)
- NetPackCommon.SendFakePack(curPlayer, ePartStarLVPack)
- return
-
-
-## 全身强化等级
-def GetTotalPlusLV(curPlayer, isActive=True):
- return curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_TotalPlusLV)
-
-## 全身进化等级
-def GetTotalPlusEvolveLV(curPlayer):
- return curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_TotalPlusEvolveLV)
-
-## 全身橙装及以上装备数
-def GetEquipOrangeCount(curPlayer):
- return curPlayer.NomalDictGetProperty(ChConfig.Def_PlayerKey_EquipOrangeCount)
-
-
-# 获取装备的强化类型
-def GetEquipPlusType(curEquip):
- equipPlace = curEquip.GetEquipPlace()
- plusTypeDict = IpyGameDataPY.GetFuncEvalCfg("StrengthenLevelLimit", 1)
- if not plusTypeDict:
- GameWorld.ErrLog("没有强化类型映射表")
- return
-
- return plusTypeDict.get(equipPlace)
-
-
# 获取满套装化的最低阶数,如5件套,4件5级,1件3级,则返回3
def GetEquipSuitsLVByType(curPlayer, suitType, groupType):
return 0
-# suiteLV = 999
-# equipSuitTypeDict = IpyGameDataPY.GetFuncEvalCfg('EquipSuitType')
-# if groupType not in equipSuitTypeDict:
-# return 0
-# maxCnt = len(equipSuitTypeDict[groupType])
-# cnt = 0
-# for equipPlace in equipSuitTypeDict[groupType]:
-# curSuiteLV = GetEquipPartSuiteLV(curPlayer, equipPlace, suitType)
-# if curSuiteLV > 0:
-# cnt += 1
-# suiteLV = min(curSuiteLV, suiteLV)
-#
-# if cnt != maxCnt:
-# return 0
-# return 0 if suiteLV == 999 else suiteLV
-
-
-
-def SetEquipPartStar(curPlayer, index, setStarLV):
- #设置公共部位星数
-
- befStarLV = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_EquipPartStar % index)
- if befStarLV == setStarLV:
- return
- PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_EquipPartStar % index, setStarLV)
-
- # 同步更新星级总等级
- befTotalStarLV = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_TotalEquipStar)
- updTotalStarLV = max(0, befTotalStarLV + setStarLV - befStarLV)
- PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_TotalEquipStar, updTotalStarLV)
- # 开服活动数据
- OpenServerCampaign.UpdOpenServerCampaignRecordData(curPlayer, ShareDefine.Def_Campaign_Type_StarLV, updTotalStarLV)
- GameWorld.DebugLog("设置部位星级: index=%s,befStarLV=%s,setStarLV=%s,befTotalStarLV=%s,updTotalStarLV=%s"
- % (index, befStarLV, setStarLV, befTotalStarLV, updTotalStarLV))
- return
-
-
-def GetEquipPartStar(curPlayer, equipPackindex):
- #获取公共部位星数
- return curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_EquipPartStar % equipPackindex)
-
-
-## 获取公共部位生效的星数, 因装备的最高可到星数影响,用于算当前装备属性使用, 不影响全身星级
-def GetEquipPartStarByRank(curPlayer, equipPackindex, curEquip):
- maxStarLV = ItemCommon.GetItemMaxStar(curEquip)
- return min(GetEquipPartStar(curPlayer, equipPackindex), maxStarLV)
-
-def GetTotalEquipStars(curPlayer):
- ##获取部位总星数
- return curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_TotalEquipStar)
-
-## 通知公共部位星数
-def NotifyEquipPartStar(curPlayer, index=None):
- ePartStarLVPack = ChPyNetSendPack.tagMCEquipPartStarInfo()
- ePartStarLVPack.Clear()
- ePartStarLVPack.InfoList = []
- syncIndexList = []
- if index == None:
- equipMaxClasslv = IpyGameDataPY.GetFuncCfg('EquipMaxClasslv')
- for equipPlace in ChConfig.Pack_EquipPart_CanPlusStar.get(IPY_GameWorld.rptEquip, []):
- for classlv in xrange(1, equipMaxClasslv+1):
- ipyData = IpyGameDataPY.GetIpyGameData('EquipPlaceIndexMap', classlv, equipPlace)
- if not ipyData:
- continue
- syncIndexList.append(ipyData.GetGridIndex())
- else:
- syncIndexList = [index]
-
- for index in syncIndexList:
- ePartStarLV = ChPyNetSendPack.tagMCEquipPartStar()
- ePartStarLV.Clear()
- ePartStarLV.EquipPackIndex = index
- ePartStarLV.Star = GetEquipPartStar(curPlayer, index)
- ePartStarLVPack.InfoList.append(ePartStarLV)
-
- ePartStarLVPack.Count = len(ePartStarLVPack.InfoList)
- NetPackCommon.SendFakePack(curPlayer, ePartStarLVPack)
- return
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Item/ItemControler.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Item/ItemControler.py
index 9981cf9..29bd5fd 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Item/ItemControler.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Item/ItemControler.py
@@ -30,7 +30,6 @@
import PlayerFamily
import ChPyNetSendPack
import NetPackCommon
-import Operate_EquipStone
import PlayerXiangong
import IpyGameDataPY
import DataRecordPack
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Item/UseItem/ItemCommon.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Item/UseItem/ItemCommon.py
index 1ebb559..f4d4cca 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Item/UseItem/ItemCommon.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Item/UseItem/ItemCommon.py
@@ -29,9 +29,6 @@
import EventReport
import ChItem
import IpyGameDataPY
-import Operate_EquipStone
-import Operate_EquipWash
-import FormulaControl
import ChPyNetSendPack
import NetPackCommon
import PyGameData
@@ -839,65 +836,6 @@
return 0
keyStr = ChConfig.Def_VPackCnt_Dict[packindex]
return IpyGameDataPY.GetFuncCfg(keyStr)
-
-
-## 杀怪掉落提示
-# @param curPlayer 当前玩家
-# @return None
-def NotifyItemDropByKill(curPlayer, curItem, npcID, notifyMark='', mapID=0):
- return #吕超说此处屏蔽
-
-def CacheNotifyEquipDetailInfo(curPlayer, curEquip):
- ''' 缓存装备广播信息中的装备明细信息
- 因为本版本需要的查看的内容相对较多,为了减少全服广播流量消耗,所以先进行缓存,玩家点击查看时再进行查询
- '''
-
- guid = curEquip.GetGUID()
- packType = curEquip.GetItemPlaceType()
- packIndex = curEquip.GetItemPlaceIndex()
- if packType != IPY_GameWorld.rptEquip:
- return guid
-
- classLV = GetItemClassLV(curEquip)
- if not classLV:
- return guid
-
- itemID = curEquip.GetItemTypeID()
- #部位星级
- equipStar = ChEquip.GetEquipPartStarByRank(curPlayer, packIndex, curEquip)
-
- #部位强化数据
- plusLV = ChEquip.GetEquipPartPlusLV(curPlayer, packType, packIndex)
- plusEvolveLV = ChEquip.GetEquipPartPlusEvolveLV(curPlayer, packType, packIndex)
-
- #部位洗练数据
- washLV = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_EquipWashLV % packIndex)
- washValueList = []
- for attrNum in xrange(1, Operate_EquipWash.Def_EquipWashMaxAttrCount + 1):
- value = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_EquipWashValue % (packIndex, attrNum))
- washValueList.append(value)
-
- #部位宝石数据
- stoneIDList = Operate_EquipStone.GetEquipIndexStoneIDList(curPlayer, packIndex)
-
- #本阶已穿装备ID [[itemID,star], ...]
- classItems = []
- ipyDataList = IpyGameDataPY.GetIpyGameDataByCondition('EquipPlaceIndexMap', {'ClassLV':classLV}, True)
- if ipyDataList:
- equipPack = curPlayer.GetItemManager().GetPack(packType)
- for ipyData in ipyDataList:
- index = ipyData.GetGridIndex()
- classEquip = equipPack.GetAt(index)
- if not classEquip or classEquip.IsEmpty():
- continue
- equipID = classEquip.GetItemTypeID()
- star = ChEquip.GetEquipPartStarByRank(curPlayer, index, classEquip)
- classItems.append([equipID, star])
-
- cacheInfo = [guid, itemID, equipStar, plusLV, plusEvolveLV, washLV, washValueList, stoneIDList, classItems]
- cacheInfo = json.dumps(cacheInfo, ensure_ascii=False)
- GameWorld.GetPlayerManager().GameServer_QueryPlayerResult(0, 0, 0, "NotifyEquipDetailInfo", cacheInfo, len(cacheInfo))
- return guid
## 使用物品的特殊提示
# @param curPlayer 当前玩家
@@ -1993,40 +1931,10 @@
DR_DelItem(curPlayer, packIndex, "VPack_%s" % packIndex if not eventName else eventName, dataDict)
ItemControler.Sync_VPackItem_Clear(curPlayer, packIndex, placeList)
return
-
-
-## 获取物品最高强化进化等级
-# @param itemType: 物品类型
-# @return 最大星级,0为不可强化
-def GetItemMaxPlusEvolveLV(curPlayer, equipPackindex, curItem):
- packType = IPY_GameWorld.rptEquip
- curPlusLV = ChEquip.GetEquipPartPlusLV(curPlayer, packType, equipPackindex)
- equipPlace = curItem.GetEquipPlace()
- ipyData = IpyGameDataPY.InterpolationSearch('EquipPlusEvolve', 'NeedPlusLV', curPlusLV, {'EquipPlace':equipPlace})
- if not ipyData:
- return 0
- return ipyData.GetEvolveLV()
-
-## 获取物品最高星数
-# @param itemType: 物品类型
-# @return 最大星级,0为不可强化
-def GetItemMaxStar(curItem):
- itemColor = curItem.GetItemColor()
- maxStarDict = IpyGameDataPY.GetFuncEvalCfg('EquipPartStar', 1)
- if str(itemColor) not in maxStarDict:
- return 0
- classLV = GetItemClassLV(curItem)
- return maxStarDict[str(itemColor)].get(str(classLV), 0)
-
## 获取物品阶级或品级
def GetItemClassLV(curItem):
return curItem.GetLV()
-
-def GetWingLV(curItem):
- ## 获取翅膀代数等级
- wingLVDict = IpyGameDataPY.GetFuncEvalCfg("WingLV", 1)
- return wingLVDict.get(str(curItem.GetLV()), 0)
## 装备评分
def GetEquipGearScore(curItem):
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 f8a8fff..2a3f9d4 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/ChPlayer.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/ChPlayer.py
@@ -55,7 +55,6 @@
import PlayerDienstgrad
import PlayerFreeGoods
import PlayerRecover
-import PlayerEquipDecompose
import PlayerCrossRealmPK
import PlayerCrossChampionship
import GameFuncComm
@@ -652,8 +651,6 @@
# 通知设置的被动功法
#PassiveBuffEffMng.OnLoginGFPassive(curPlayer)
PlayerOnlinePrize.OnPlayerLogin(curPlayer)
- #装备分解
- #PlayerEquipDecompose.PlayerLogin(curPlayer)
# 极品白拿
PlayerFreeGoods.OnLogin(curPlayer)
# BOSS复活活动
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/GameFuncComm.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/GameFuncComm.py
index 52d3a74..cf7afb1 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/GameFuncComm.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/GameFuncComm.py
@@ -24,21 +24,10 @@
import ChPyNetSendPack
import GameWorld
import NetPackCommon
-#import PlayerGodWeapon
-#import PlayerHorse
-#import PlayerPet
import ShareDefine
import IpyGameDataPY
import PlayerControl
-import PlayerPrestigeSys
-import PlayerBillboard
-import PlayerTreasure
import PlayerSignDay
-#import PlayerGoldGift
-#import PlayerEquipDecompose
-#import PlayerCrossChampionship
-#import PlayerFreeGoods
-#import FunctionNPCCommon
import PlayerActBuyCountGift
import PlayerActLoginNew
import PlayerActTask
@@ -46,42 +35,18 @@
import ItemCommon
import ItemControler
import PlayerArena
-#import PlayerLianTi
-#import PlayerFaQi
+import PlayerTask
# 功能开启需执行的函数{功能ID:执行函数, ...} 函数需返回是否激活成功, 功能开启有需要处理功能逻辑的这里增加函数调用配置即可
FuncOpenLogicDict = {
- ShareDefine.GameFuncID_Official:lambda curObj:PlayerPrestigeSys.DoOfficialOpen(curObj),
- ShareDefine.GameFuncID_Billboard:lambda curObj:PlayerBillboard.DoBillboardOpen(curObj),
ShareDefine.GameFuncID_SignDay:lambda curObj:PlayerSignDay.DoSignDayOpen(curObj),
- ShareDefine.GameFuncID_Treasure:lambda curObj:PlayerTreasure.DoTreasureOpen(curObj),
ShareDefine.GameFuncID_Arena:lambda curObj:PlayerArena.DoArenaOpen(curObj),
- #ShareDefine.GameFuncID_Horse:lambda curObj:PlayerHorse.DoHorseOpen(curObj),
- #ShareDefine.GameFuncID_GodWeapon:lambda curObj:PlayerGodWeapon.DoGodWeaponOpen(curObj),
- #ShareDefine.GameFuncID_Pet:lambda curObj:PlayerPet.DoPetOpen(curObj),
- #ShareDefine.GameFuncID_FirstGoldTip:lambda curObj:PlayerGoldGift.DoFirstGoldOpen(curObj),
- #ShareDefine.GameFuncID_EquipDecompose:lambda curObj:PlayerEquipDecompose.DoEquipDecomposeOpen(curObj),
- #ShareDefine.GameFuncID_FreeGoods:lambda curObj:PlayerFreeGoods.DoFreeGoodsOpen(curObj),
- #ShareDefine.GameFuncID_OSSail:lambda curObj:FunctionNPCCommon.OSSaleOpenMail(curObj),
- #ShareDefine.GameFuncID_AddPoint:lambda curObj:PlayerControl.DoAddPointOpen(curObj),
- #ShareDefine.GameFuncID_FaQi:lambda curObj:PlayerFaQi.DoFaQiOpen(curObj),
- #ShareDefine.GameFuncID_LianTi:lambda curObj:PlayerLianTi.DoLianTiOpen(curObj),
- #ShareDefine.GameFuncID_Championship:lambda curObj:PlayerCrossChampionship.DoChampionshipOpen(curObj),
}
-
-## 注意:功能开启需执行的函数 及 功能开启后升级逻辑 只会执行其中一个
-## 注意:功能开启需执行的函数 及 功能开启后升级逻辑 只会执行其中一个
-## 注意:功能开启需执行的函数 及 功能开启后升级逻辑 只会执行其中一个
-
-# 功能开启后升级逻辑 需要处理的函数 {功能ID:执行函数, ...}
-#FuncLVUpLogicDict = {
-# ShareDefine.GameFuncID_Pet:lambda curObj:PlayerPet.DoLVUPLogic_Pet(curObj),
-# }
def GetFuncOpenLVIpyData(funcID): return IpyGameDataPY.GetIpyGameData("FuncOpenLV", funcID)
-def DoFuncOpenLogic(curPlayer, finishMissionIDList=[]):
+def DoFuncOpenLogic(curPlayer):
'''执行触发功能开启逻辑
@param finishMissionIDList: 完成的任务ID列表
'''
@@ -95,11 +60,11 @@
ipyData = ipyGameData.GetFuncOpenLVByIndex(i)
funcID = ipyData.GetFuncId()
limitMissionID = ipyData.GetLimitMissionID()
- if limitMissionID and limitMissionID in finishMissionIDList:
- if not curPlayer.NomalDictGetProperty(ChConfig.Def_Player_Dict_MissionFinish % limitMissionID):
- PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_Player_Dict_MissionFinish % limitMissionID, 1)
- GameWorld.DebugLog(" 设置功能开启所需任务完成: funcID=%s,limitMissionID=%s" % (funcID, limitMissionID), curPlayer.GetPlayerID())
-
+ if limitMissionID and not curPlayer.NomalDictGetProperty(ChConfig.Def_Player_Dict_MissionFinish % limitMissionID) \
+ and PlayerTask.IsTaskFinish(curPlayer, limitMissionID):
+ PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_Player_Dict_MissionFinish % limitMissionID, 1)
+ GameWorld.DebugLog(" 设置功能开启所需任务完成: funcID=%s,limitMissionID=%s" % (funcID, limitMissionID), curPlayer.GetPlayerID())
+
isOpen = GameWorld.GetDictValueByBit(curPlayer, ChConfig.Def_Player_Dict_GameFuncFirstTouch, funcID, True)
if isOpen:
#GameWorld.DebugLog(" 功能已经开启过, 不需要重复触发开启! funcID=%s" % (funcID), curPlayer.GetPlayerID())
@@ -142,6 +107,7 @@
## 功能是否可用
def GetFuncCanUse(curPlayer, funcID):
+ if funcID < 0: return False
return GameWorld.GetDictValueByBit(curPlayer, ChConfig.Def_Player_Dict_GameFuncFirstTouch, funcID, True)
## 获取功能限制等级(等级条件为全局)
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerActivity.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerActivity.py
index 2c65b4a..ec38573 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerActivity.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerActivity.py
@@ -480,9 +480,6 @@
ipyData = IpyGameDataPY.GetIpyGameData('DailyAction', dailyID)
if not ipyData:
return
-# if not GameFuncComm.GetFuncCanUse(curPlayer, ShareDefine.GameFuncID_DailyQuest):
-# #GameWorld.DebugLog("日常任务功能未开启!dailyID=%s" % dailyID)
-# return
# 由GameServer决定
# 目前跨服PK暂不需要判断,因为跨服PK次数结算在本服,玩家可能上次未结算离线,等非匹配期间上线,也需要加上,所以暂不判断
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerBillboard.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerBillboard.py
index 4054605..bb56211 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerBillboard.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerBillboard.py
@@ -43,12 +43,6 @@
return
-def DoBillboardOpen(curPlayer):
- ## 排行榜开启时需要处理的
- #UpdatePlayerBillboardOnLeaveServer(curPlayer, True) # 主动同步一次榜单
- #OpenServerCampaign.DoBillboardOpen(curPlayer) # 同步开服活动榜单
- return
-
def BillboardOnLogin(curPlayer):
# 上线默认同步排行榜
UpdatePlayerBillboardOnLeaveServer(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 d35a1a2..9ad261d 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerControl.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerControl.py
@@ -3325,41 +3325,6 @@
return IpyGameDataPY.GetFuncCfg("PKConfig", 2)
#---------------------------------------------------------------------
-##获得玩家升级, 获得的属性点
-# @param curPlayer 玩家实例
-# @return 返回值, 获得的属性点
-# @remarks 获得玩家升级, 获得的属性点
-def GetLvUp_AddPoint(curPlayer):
- curPlayerID = curPlayer.GetID()
- curLV = curPlayer.GetLV() # 当前等级
-
- addPointDict = IpyGameDataPY.GetFuncEvalCfg("LVUPAddPoint", 1, {})
- addPoint = GameWorld.GetDictValueByRangeKey(addPointDict, curLV, 0)
-
- if addPoint == None:
- raise Exception('玩家获得升级属性点异常, curLV = %s PlayerID = %s' % (curLV, curPlayerID))
- return
- return int(addPoint+ GetFabaoAddPoint(curPlayer) + GetTitleAddExtraPoint(curPlayer))
-
-def GetAllPointByLV(curPlayer):
- ##获取当前等级可得到属性点数
- openLV = GameFuncComm.GetFuncLimitLV(ShareDefine.GameFuncID_AddPoint)
- curLV = curPlayer.GetLV()
- if curLV < openLV:
- return 0
- # 初始点+(升级点+法宝效果)*称号效果倍数+境界点
- setFreePoint = IpyGameDataPY.GetFuncCfg("LVUPAddPoint", 2)
- fabaoAddPoint = GetFabaoAddPoint(curPlayer)
- titleAddPoint = GetTitleAddExtraPoint(curPlayer)
- addPointDict = IpyGameDataPY.GetFuncEvalCfg("LVUPAddPoint", 1, {})
- for rangLVs, point in addPointDict.items():
- if curLV < rangLVs[0]:
- continue
- setFreePoint += (point + fabaoAddPoint + titleAddPoint) * (min(curLV, rangLVs[1]) - rangLVs[0] + 1)
-
- #境界提升点数
- setFreePoint += curPlayer.GetOfficialRank() * IpyGameDataPY.GetFuncCfg("LVUPAddPoint", 3)
- return setFreePoint
def GetTitleAddExtraPoint(curPlayer):
# 称号额外增加玩家每级获得的灵根点
@@ -3367,23 +3332,6 @@
if titleID and curPlayer.GetDienstgradManager().GetDienstgrad(titleID):
return IpyGameDataPY.GetFuncCfg("TitleAddPoint", 2)
return 0
-
-def GetFabaoAddPoint(curPlayer):
- #法宝额外增加玩家每级获得的灵根点
- return 0
-
-def DoAddPointOpen(curPlayer):
- '''加点功能开启'''
- beforeFreePoint = curPlayer.GetFreePoint()
-
- setFreePoint = GetAllPointByLV(curPlayer)
- curLV = curPlayer.GetLV()
- addDataDict = {'beforeFreePoint':beforeFreePoint}
- curPlayer.SetFreePoint(setFreePoint)
- DataRecordPack.DR_Freepoint(curPlayer, "AddPointOpen", setFreePoint, addDataDict)
- GameWorld.DebugLog(' 加点功能开启处理 beforeFreePoint=%s,curLV=%s, setFreePoint=%s'%(beforeFreePoint, curLV, setFreePoint), curPlayer.GetID())
- return
-
#---------------------------------------------------------------------
###############################################################
@@ -4757,6 +4705,13 @@
return 0
return lvIpyData.GetExp()
+def GetOpenMaxLV():
+ ## 获取游戏开放的最大等级
+ maxLV = IpyGameDataPY.GetFuncCfg("PlayerMaxLV", 1)
+ ipyDataMgr = IpyGameDataPY.IPY_Data()
+ realmIpyData = ipyDataMgr.GetRealmByIndex(ipyDataMgr.GetRealmCount() - 1)
+ return min(maxLV, realmIpyData.GetLVMax())
+
def GetPlayerMaxLV(curPlayer):
## 获取玩家实际可升的最大等级
maxLV = IpyGameDataPY.GetFuncCfg("PlayerMaxLV", 1)
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerEquipDecompose.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerEquipDecompose.py
deleted file mode 100644
index 1f17628..0000000
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerEquipDecompose.py
+++ /dev/null
@@ -1,308 +0,0 @@
-#!/usr/bin/python
-# -*- coding: GBK -*-
-#
-#
-##@package PlayerEquipDecompose.py
-#
-# @todo:装备分解
-#
-# @author xdh
-# @date 2016-08-05
-# @version 1.0
-# @note:
-#------------------------------------------------------------------------------
-#"""Version = 2017-05-24 14:51"""
-#------------------------------------------------------------------------------
-import IpyGameDataPY
-import IPY_GameWorld
-import GameWorld
-import ItemCommon
-import ChPyNetSendPack
-import ShareDefine
-import NetPackCommon
-import PlayerControl
-import ChConfig
-import FormulaControl
-import DataRecordPack
-import PlayerSuccess
-import GameFuncComm
-import ItemControler
-import random
-import json
-
-import math
-#---------------------------------------------------------------------
-
-
-##登录处理
-# @param curPlayer 玩家
-# @return None
-def PlayerLogin(curPlayer):
- Sync_EDLVInfo(curPlayer)
- return
-
-def DoEquipDecomposeOpen(curPlayer):
- #功能开启
- RefreshEDAttr(curPlayer) # 属性刷新
- return
-
-#//A3 2C 装备分解 #tagCMEquipDecompose
-#
-#struct tagCMEquipDecompose
-#{
-# tagHead Head;
-# BYTE Count; //材料所在背包索引的数量
-# WORD IndexList[Count]; //材料所在背包索引列表
-# DWORD ItemIDList[Count]; //材料所在背包物品ID列表
-# BYTE IsAuto; //是否自动分解
-#};
-## 玩家分解装备封包 A5 08
-# @param playerIndex 玩家索引
-# @param clientData 客户端封包
-# @param tick 时间
-# @return None
-def OnDoEquipDecompose(index, clientData, tick):
- curPlayer = GameWorld.GetPlayerManager().GetPlayerByIndex(index)
- if not clientData.Count:
- return
- eatIndexList = clientData.IndexList
- eatItemIDList = clientData.ItemIDList
- isAuto = clientData.IsAuto
- EatItems(curPlayer, eatIndexList, eatItemIDList, isAuto)
- return
-
-# 吞噬物品, 返回被吞数量
-def EatItems(curPlayer, eatIndexList, eatItemIDList, isAuto=False):
- if len(eatIndexList) != len(eatItemIDList):
- return 0, 0
- drDelItemList, totalAddExp, delAllCnt, giveItemIDDict = __GetCanEatItemInfo(curPlayer, eatIndexList, eatItemIDList)
- if not totalAddExp:
- GameWorld.DebugLog(" 装备吸收 没有可吞噬物品!")
- return 0, 0
- LV = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_EquipDecomposeLV)
- Exp = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_EquipDecomposeExp)
- reduceTotalExp, updLV, updExp = __GetEatItemResult(curPlayer, LV, Exp, totalAddExp)
-
- PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_EquipDecomposeExp, updExp)
- if LV != updLV:
- PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_EquipDecomposeLV, updLV)
-
- #刷属性
- RefreshEDAttr(curPlayer) # 属性刷新
- PlayerControl.PlayerControl(curPlayer).RefreshPlayerAttrState()
- #给炼丹材料
- curDecomposeCnt = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_EquipDecomposeCnt)
- updDecomposeCnt = curDecomposeCnt + delAllCnt
- perDecomposeCnt = IpyGameDataPY.GetFuncCfg('EquipDecomposeAward')
- PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_EquipDecomposeCnt, updDecomposeCnt%perDecomposeCnt)
- jsonItemList = []
- giveCnt = 0
- if perDecomposeCnt and updDecomposeCnt >= perDecomposeCnt:
- awardRateList = IpyGameDataPY.GetFuncEvalCfg('EquipDecomposeAward', 2)
- resetItemIDList = IpyGameDataPY.GetFuncEvalCfg('EquipDecomposeAward', 3)
- giveCnt = updDecomposeCnt/perDecomposeCnt
- minCnt, minItemID = 0, 0
- for itemid in resetItemIDList:
- cnt = ItemControler.FindPlayerItemCountByItemID(curPlayer, IPY_GameWorld.rptItem, itemid)
- cnt += ItemControler.FindPlayerItemCountByItemID(curPlayer, IPY_GameWorld.rptWarehouse, itemid)
- if not minItemID or cnt < minCnt:
- minCnt = cnt
- minItemID = itemid
-
- #giveItemIDDict = {}
- for _ in xrange(giveCnt):
- itmeID = GameWorld.GetResultByRandomList(awardRateList)
- if not itmeID:
- continue
- if itmeID in resetItemIDList and minItemID: #给玩家拥有最少的材料
- itmeID = minItemID
-
- giveItemIDDict[itmeID] = giveItemIDDict.get(itmeID, 0) + 1
-
- if giveItemIDDict:
- for giveItemID, itemCnt in giveItemIDDict.items():
- jsonItemList.append(ItemCommon.GetJsonItem([giveItemID,itemCnt,1]))
- needSpace = len(giveItemIDDict)
- packSpace = ItemCommon.GetItemPackSpace(curPlayer, IPY_GameWorld.rptItem, needSpace)
- if packSpace < needSpace:
- prizeItemList = [[giveItemID, itemCnt, 1] for giveItemID, itemCnt in giveItemIDDict.items()]
- PlayerControl.SendMailByKey("DefaultLackSpace", [curPlayer.GetPlayerID()], prizeItemList)
- else:
- for giveItemID, itemCnt in giveItemIDDict.items():
- ItemControler.GivePlayerItem(curPlayer, giveItemID, itemCnt, 0, [IPY_GameWorld.rptItem])
-
- #同步客户端
- Sync_EDLVInfo(curPlayer, jsonItemList)
- # 流向
- #saveDataDict = {"ExpBefore":Exp, "AddTotalExp":reduceTotalExp, "ExpAfter":updExp,
- # "DelItemList(ItemID,delCnt,baseExp,addExp)":drDelItemList, 'isAuto':isAuto}
- #DataRecordPack.DR_ClassUpSystem(curPlayer, "EquipDecomposeUp", updLV, saveDataDict)
-
- #EventReport.WriteEvent__lv(curPlayer, LV, updLV, Exp, updExp)
- # 整理背包
- tick = GameWorld.GetGameWorld().GetTick()
- ItemControler.ResetItem(curPlayer, IPY_GameWorld.rptItem, 0, 0, tick)
- return len(drDelItemList), giveCnt
-
-##获取可以吞噬的物品信息
-# @param curPlayer: 玩家实例
-# @return [可吞噬的物品列表], 最大可提供的经验
-def __GetCanEatItemInfo(curPlayer, expIndexList, eatItemIDList):
- eatItemList = []
- totalAddExp = 0
- allitemCnt = 0
- awardItemDict = {}
- eatEquipAwardExDict = IpyGameDataPY.GetFuncEvalCfg("EquipDecomposeAward2", 1, {})
- eatEquipAwardItemID = IpyGameDataPY.GetFuncCfg("EquipDecomposeAward", 4)
- itemPack = curPlayer.GetItemManager().GetPack(IPY_GameWorld.rptItem)
- for i, index in enumerate(expIndexList):
- eatItem = itemPack.GetAt(index)
-
- if not eatItem or eatItem.IsEmpty():
- continue
-
- eatItemID = eatItem.GetItemTypeID()
- if eatItemIDList[i] != eatItemID:
- GameWorld.ErrLog(' 装备分解客户端发的物品索引与实际物品ID不对应 index=%s,eatItemID=%s,wantEatItemID=%s'%(index, eatItemID, eatItemIDList[i]))
- continue
- if eatItem.GetType() == ChConfig.Def_ItemType_EquipDecomposeExp:
- curEff = eatItem.GetEffectByIndex(0)
- baseExp = curEff.GetEffectValue(0)
- elif ItemCommon.CheckItemIsEquip(eatItem):
- itemColor = eatItem.GetItemColor()
- itemClass = eatItem.GetLV()
- isSuite = 1 if eatItem.GetSuiteID() else 0
- ipyData = IpyGameDataPY.GetIpyGameData("PetEatEquip", itemColor, itemClass)
- if not ipyData:
- GameWorld.DebugLog(" tagPetEatEquip.txt,未配置该物品! eatItemID=%s, EquipColor=%s,EquipClass=%s" % (eatItemID, itemColor, itemClass))
- continue
- baseExp = ipyData.GetExp()
-
- if itemColor >= ChConfig.Def_Quality_Orange:
- awardCount = eval(IpyGameDataPY.GetFuncCompileCfg("EquipDecomposeAward", 5))
- awardItemDict[eatEquipAwardItemID] = awardItemDict.get(eatEquipAwardItemID, 0) + awardCount
- GameWorld.DebugLog("分解橙装以上额外奖励: eatEquip=%s,itemClass=%s,itemColor=%s,isSuite=%s,awardCount=%s total:%s"
- % (eatItem.GetItemTypeID(), itemClass, itemColor, isSuite, awardCount, awardItemDict))
-
- # 高品质额外奖励
- for exAwardColor, exAwardInfo in eatEquipAwardExDict.items():
- if itemColor < int(exAwardColor):
- continue
- exItemID, exItemCountFormat = exAwardInfo
- exAwardCount = eval(FormulaControl.GetCompileFormula("EquipDecomposeAwardEx%s" % exAwardColor, exItemCountFormat))
- if not exItemID or exAwardCount <= 0:
- continue
- awardItemDict[exItemID] = awardItemDict.get(exItemID, 0) + exAwardCount
- GameWorld.DebugLog("分解高级品质额外奖励: eatEquip=%s,itemClass=%s,itemColor=%s,isSuite=%s,exAwardColor=%s,exItemID=%s,exAwardCount=%s total:%s"
- % (eatItem.GetItemTypeID(), itemClass, itemColor, isSuite, exAwardColor, exItemID, exAwardCount, awardItemDict))
-
- else:
- GameWorld.ErrLog(' 不可分解的道具index=%s eatItemID=%s'%(index, eatItemID))
- continue
- itemCnt = eatItem.GetCount() # 装备一般默认1,如是经验道具则一般可叠加
- addExp = baseExp * itemCnt
-
- totalAddExp += addExp
- allitemCnt += itemCnt
- ItemCommon.DelItem(curPlayer, eatItem, itemCnt, True, ChConfig.ItemDel_EquipDecompose)
-
-
- GameWorld.DebugLog(" 吸收 删除物品 i=%s,baseExp=%s,itemCnt=%s,addExp=%s,totalAddExp=%s"
- % (index, baseExp, itemCnt, addExp, totalAddExp))
- # 先检索可吃列表,防止升级过程中吃掉原来不可吃的[index, 物品实例, 基础经验]
- eatItemList.append([eatItemID, itemCnt, baseExp, addExp])
-
- PlayerSuccess.DoAddSuccessProgress(curPlayer, ShareDefine.SuccType_DecomposeEquip, allitemCnt)
- return eatItemList, totalAddExp, allitemCnt, awardItemDict
-
-
-##获取吞噬结果
-# @param curPlayer: 玩家实例
-# @return 实际需要扣除的经验, 最终目标物品, 最终经验值
-def __GetEatItemResult(curPlayer, LV, Exp, totalAddExp):
- remainExp = totalAddExp # 剩余可用经验
- reduceTotalExp = 0 # 真正需要扣除的经验
- ipyMgr = IpyGameDataPY.IPY_Data()
- maxLV = ipyMgr.GetEquipDecomposeByIndex(ipyMgr.GetEquipDecomposeCount()-1).GetLV()
- # 经验检查
- while remainExp > 0:
- if LV +1 >= maxLV:
- break
- maxExp = __GetLvUpNeedExp(LV)
-
- if not maxExp:
- break
-
- needExp = max(0, maxExp - Exp)
- if remainExp >= needExp:
- Exp = 0
- reduceTotalExp += needExp
- remainExp -= needExp
- LV += 1
- else:
- Exp += remainExp
- reduceTotalExp += remainExp
- remainExp = 0
-
- #等级满后也可以分解加经验,故所有装备都分解
- Exp += remainExp
- reduceTotalExp = totalAddExp
- GameWorld.DebugLog("总可加经验=%s,实际总扣除经验=%s,newLV=%s,最终经验=%s" %
- (totalAddExp, reduceTotalExp, LV, Exp))
- return reduceTotalExp, LV, Exp
-
-
-
-def __GetLvUpNeedExp(lv):
- """获取装备分解升级需要经验"""
- #配置的等级从1开始
- ipyData = IpyGameDataPY.GetIpyGameData("EquipDecompose", lv+1)
- if not ipyData:
- return 0
- return ipyData.GetUpNeedExp()
-
-
-## 刷属性
-def RefreshEDAttr(curPlayer):
- if not GameFuncComm.GetFuncCanUse(curPlayer, ShareDefine.GameFuncID_EquipDecompose):
- return
- allAttrList = [{} for _ in range(4)]
- curLV = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_EquipDecomposeLV)
- ipyData = IpyGameDataPY.GetIpyGameData('EquipDecompose', curLV+1)
- if not ipyData:
- return
- for attrID, attrValue in ipyData.GetAttr().items():
- PlayerControl.CalcAttrDict_Type(int(attrID), attrValue, allAttrList)
-
-
- # 保存计算值
- PlayerControl.SetCalcAttrListValue(curPlayer, ChConfig.Def_CalcAttrFunc_EquipDecompose, allAttrList)
- return
-
-
-
-#// A3 2D 装备分解设置 #tagCMDecomposeSeting
-#
-#struct tagCMDecomposeSeting
-#{
-# tagHead Head;
-# DWORD Seting;
-#};
-def OnDecomposeSetingSave(index, clientData, tick):
- curPlayer = GameWorld.GetPlayerManager().GetPlayerByIndex(index)
- PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_EquipDecomposeSeting, clientData.Seting)
- return
-
-## 分解等级相关信息
-def Sync_EDLVInfo(curPlayer, getItemInfo=[]):
- getItemInfo = json.dumps(getItemInfo, ensure_ascii=False)
- PackData = ChPyNetSendPack.tagMCEquipDecomposeInfo()
- PackData.Clear()
- PackData.LV = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_EquipDecomposeLV)
- PackData.Exp = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_EquipDecomposeExp)
- PackData.Seting = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_EquipDecomposeSeting)
- PackData.DecomposeCnt = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_EquipDecomposeCnt)
- PackData.GetItemData = str(getItemInfo)
- PackData.GetItemLen = len(PackData.GetItemData)
- NetPackCommon.SendFakePack(curPlayer, PackData)
- return
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerFeastWeekParty.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerFeastWeekParty.py
index dfd5f5d..9e99874 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerFeastWeekParty.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerFeastWeekParty.py
@@ -25,7 +25,6 @@
import PlayerControl
import ItemControler
import ChPyNetSendPack
-import Operate_EquipStone
import DataRecordPack
import PlayerGodWeapon
import NetPackCommon
@@ -227,7 +226,6 @@
AddFeastWeekPartyActionCnt(curPlayer, ChConfig.Def_WPAct_Rune, itemColor, False, isSync=isSync)
AddFeastWeekPartyActionCnt(curPlayer, ChConfig.Def_WPAct_Login, 1, False, False, isSync)
- AddFeastWeekPartyActionCnt(curPlayer, ChConfig.Def_WPAct_Stone, Operate_EquipStone.GetTotalStoneLV(curPlayer), False, True, isSync)
AddFeastWeekPartyActionCnt(curPlayer, ChConfig.Def_WPAct_GodWeapon, PlayerGodWeapon.GetGodWeaponTotalLV(curPlayer), False, True, isSync)
return
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerPrestigeSys.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerPrestigeSys.py
index 9de8871..136bccd 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerPrestigeSys.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerPrestigeSys.py
@@ -44,14 +44,6 @@
# 需要记录任务值的任务类型列表
NeedTaskValueTypeList = [RealmTaskType_UseXiantao]
-def DoOfficialOpen(curPlayer):
- #功能开启
-# curRealmLV = curPlayer.GetOfficialRank()
-# if not curRealmLV:
-# DoRealmLVUpLogic(curPlayer)
- return True
-
-
def OnLogin(curPlayer):
SyncRealmInfo(curPlayer, isAll=True)
if ChConfig.Def_InitOfficialRank > 0 and not curPlayer.GetOfficialRank():
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerSuccess.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerSuccess.py
index 855c92f..55a741d 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerSuccess.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerSuccess.py
@@ -35,12 +35,7 @@
import datetime
import time
import math
-import ChEquip
-import PlayerRune
-import Operate_EquipStone
-import Operate_EquipWash
import PlayerFeastRedPacket
-import PlayerDogz
import DataRecordPack
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerTask.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerTask.py
index 7e9b122..1ff3d57 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerTask.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerTask.py
@@ -311,7 +311,7 @@
if not __giveNewTask(curPlayer, taskGroup):
SyncTaskInfo(curPlayer, [taskGroup])
- GameFuncComm.DoFuncOpenLogic(curPlayer, [taskID])
+ GameFuncComm.DoFuncOpenLogic(curPlayer)
return
def SyncTaskInfo(curPlayer, taskGroupList=None):
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerTreasure.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerTreasure.py
index e781718..6d4e4b1 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerTreasure.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerTreasure.py
@@ -47,11 +47,6 @@
TreasureType_HeroHigh = 12 # 英雄招募 - 高级
TreasureType_HeroScore = 13 # 英雄招募 - 积分
-def DoTreasureOpen(curPlayer):
- ## 寻宝开启
- Sync_TreasureInfo(curPlayer)
- return
-
def OnTreasureLogin(curPlayer):
Sync_TreasureInfo(curPlayer)
return
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerWeekParty.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerWeekParty.py
index 6465475..4fa463b 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerWeekParty.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerWeekParty.py
@@ -25,7 +25,6 @@
import PlayerControl
import ItemControler
import ChPyNetSendPack
-import Operate_EquipStone
import PlayerFeastWeekParty
import DataRecordPack
import PlayerGodWeapon
@@ -238,7 +237,6 @@
AddWeekPartyActionCnt(curPlayer, ChConfig.Def_WPAct_Rune, itemColor, False, isSync=isSync)
AddWeekPartyActionCnt(curPlayer, ChConfig.Def_WPAct_Login, 1, False, False, isSync)
- AddWeekPartyActionCnt(curPlayer, ChConfig.Def_WPAct_Stone, Operate_EquipStone.GetTotalStoneLV(curPlayer), False, True, isSync)
AddWeekPartyActionCnt(curPlayer, ChConfig.Def_WPAct_GodWeapon, PlayerGodWeapon.GetGodWeaponTotalLV(curPlayer), False, True, isSync)
return
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ShareDefine.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ShareDefine.py
index 02a556f..cf177ef 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ShareDefine.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ShareDefine.py
@@ -844,45 +844,17 @@
# 游戏功能ID定义,需确保唯一,与PyGameFuncControl.txt中FuncId一致
GameFuncID_Official = 12 # 官爵,境界
GameFuncID_Family = 15 # 战盟,仙盟
-GameFuncID_Billboard = 72 # 排行榜
GameFuncID_SignDay = 81 # 签到
-GameFuncID_Treasure = 99 # 寻宝
GameFuncID_Arena = 195 # 竞技场
-GameFuncID_Wing = 3 # 翅膀
-GameFuncID_Pet = 6 # 宠物,灵宠
-GameFuncID_MagicWeapon = 7 # 法宝
-GameFuncID_Horse = 8 # 坐骑
-GameFuncID_GodWeapon = 20 # 神器
-GameFuncID_Talent = 149 # 天赋
-GameFuncID_RefineExp = 60 # 经验炼制,祈愿
-GameFuncID_RefineMoney = 61 # 金币炼制,祈愿
-GameFuncID_WorldLV = 71 # 世界等级
-GameFuncID_Friend = 73 # 好友
-GameFuncID_RefineStove = 87 # 炼丹炉
-GameFuncID_EquipWash = 91 # 洗练
-GameFuncID_FirstGoldTip = 128 # 首充优势提示
-GameFuncID_EquipDecompose = 123 # 装备分解
-GameFuncID_DailyQuest = 78 # 日常
-GameFuncID_FreeGoods = 130 # 极品白拿
-GameFuncID_OSSail = 132 # 开服特惠
-GameFuncID_HorsePetRobBoss = 139# 骑宠争夺
-GameFuncID_AddPoint = 145 # 加点功能/灵根功能
-GameFuncID_LittleHelper = 146 # 小助手
-GameFuncID_TJG = 147 # 脱机挂
-GameFuncID_SuperGift = 150 # 超值礼包
-GameFuncID_CrossRealmPK = 157 # 跨服天梯
-GameFuncID_PenglaiBoss = 162 # 蓬莱仙境
-GameFuncID_ZhuXianBoss = 163 # 诛仙BOSS
-GameFuncID_FaQi = 199 # 法器
-GameFuncID_LianTi = 207 # 炼体
-GameFuncID_CrossBattlefield = 208 # 跨服古神战场
-GameFuncID_Championship = 210 # 排位
-GameFuncID_Guaji = 228 # 挂机
# 以下为暂时无用的
-GameFuncID_RunDaily = 34 # 日常跑环
-GameFuncID_RunFamily = 53 # 战盟跑环
-GameFuncID_ArrestTask = 7100 # 悬赏任务
+GameFuncID_Wing = -1 # 翅膀 3
+GameFuncID_Pet = -1 # 宠物,灵宠 6
+GameFuncID_Horse = -1 # 坐骑 8
+GameFuncID_GodWeapon = -1 # 神器 20
+GameFuncID_OSSail = -1 # 开服特惠 132
+GameFuncID_AddPoint = -1 # 加点功能/灵根功能 145
+GameFuncID_LittleHelper = -1 # 小助手 146
#家族悬赏任务完成状态记录位标识
Def_ArrestOverState_BitDic = {
--
Gitblit v1.8.0