hxp
2025-08-04 fd3137f3c58f6fb5f53c0bfc38c55c74e7709f72
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerRefineStove.py
@@ -25,9 +25,7 @@
import ShareDefine
import ItemCommon
import PlayerSuccess
import PlayerAttrFruit
import IpyGameDataPY
import PlayerActivity
import PlayerFairyCeremony
import PlayerNewFairyCeremony
import PlayerActGarbageSorting
@@ -322,10 +320,10 @@
def CalcStoveAttr(curPlayer):
    # 果实加成
    allAttrYaoList = [{} for _ in range(4)]
    fightPowerEx = PlayerAttrFruit.CalcAttrFruitAddAtrr(curPlayer, allAttrYaoList, ShareDefine.Def_AttrFruitFunc_Stove)
    PlayerControl.SetCalcAttrListValue(curPlayer, ChConfig.Def_CalcAttrFunc_StoveYao, allAttrYaoList)
    PlayerControl.SetMFPExFightPower(curPlayer, ShareDefine.Def_MFPType_StoveYao, fightPowerEx)
#    allAttrYaoList = [{} for _ in range(4)]
#    fightPowerEx = PlayerAttrFruit.CalcAttrFruitAddAtrr(curPlayer, allAttrYaoList, ShareDefine.Def_AttrFruitFunc_Stove)
#    PlayerControl.SetCalcAttrListValue(curPlayer, ChConfig.Def_CalcAttrFunc_StoveYao, allAttrYaoList)
#    PlayerControl.SetMFPExFightPower(curPlayer, ShareDefine.Def_MFPType_StoveYao, fightPowerEx)
    return
@@ -337,62 +335,63 @@
#    tagHead        Head;
#};
def PlayerPrayElixir(index, clientPack, tick):
    curPlayer = GameWorld.GetPlayerManager().GetPlayerByIndex(index)
    prayCnt = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_AlchemyPrayCnt)
    limitCnt = PlayerVip.GetPrivilegeValue(curPlayer, ChConfig.VIPPrivilege_PrayElixir)
    if prayCnt >= limitCnt:
        GameWorld.DebugLog('今日祈福丹药次数已满!prayCnt=%s' % prayCnt)
        return
    packSpace = ItemCommon.GetItemPackSpace(curPlayer, IPY_GameWorld.rptItem, 1)
    if not packSpace:
        PlayerControl.NotifyCode(curPlayer, "GeRen_chenxin_998371")
        return
    alchemyItemList = IpyGameDataPY.GetFuncEvalCfg('GodAlchemy')
    newItemInfoList = []
    for itemInfo in alchemyItemList:
        itemID = itemInfo[1]
#        if not GetIsCanOutByAlchemyLV(curPlayer, itemID):
#            #GameWorld.DebugLog('祈福丹药,炼丹等级未达到,移除产出库!itemID=%s'%itemID)
#            continue
        if PlayerAttrFruit.IsFruitEatFull(curPlayer, itemID):
            #GameWorld.DebugLog('祈福丹药,使用次数已满,移除产出库!itemID=%s'%itemID)
            continue
        newItemInfoList.append(itemInfo)
    if not newItemInfoList:
        GameWorld.DebugLog('祈福丹药,没有丹药可产出!!')
        return
    makeItemInfo = GameWorld.GetResultByWeightList(newItemInfoList)
    if not makeItemInfo:
        GameWorld.DebugLog("祈福丹药, 结果错误!")
        return
    makeItemID, itemCount = makeItemInfo
    makeItemData = GameWorld.GetGameData().GetItemByTypeID(makeItemID)
    if not makeItemData:
        return
    costMoney = IpyGameDataPY.GetFuncCfg('GodAlchemy', 2)
    if not PlayerControl.PayMoney(curPlayer, IPY_GameWorld.TYPE_Price_Gold_Money, costMoney, ChConfig.Def_Cost_AlchemyPray):
        return
    #给物品
    ItemControler.GivePlayerItem(curPlayer, makeItemID, itemCount, 0, [IPY_GameWorld.rptItem],
                                 event=[ChConfig.ItemGive_Refine, False, {}])
    #GameWorld.DebugLog('makeItemID=%s,newItemInfoList=%s'%(makeItemID, newItemInfoList))
    #紫色及以上全服广播
    notifyColor = IpyGameDataPY.GetFuncCfg("AlchemyNotify", 1)
    needNotifyItemIDList = IpyGameDataPY.GetFuncEvalCfg("AlchemyNotify", 2)
    notNotifyItemIDList = IpyGameDataPY.GetFuncEvalCfg("AlchemyNotify", 3)
    if makeItemID not in notNotifyItemIDList and (makeItemID in needNotifyItemIDList or makeItemData.GetItemColor() >= notifyColor):
        PlayerControl.WorldNotify(0, "BlastfurnaceBlessing", [curPlayer.GetPlayerName(), makeItemID])
    #更新次数
    PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_AlchemyPrayCnt, prayCnt + 1)
    Sycn_AlchemyPrayMsg(curPlayer, makeItemID)
    return
#    curPlayer = GameWorld.GetPlayerManager().GetPlayerByIndex(index)
#    prayCnt = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_AlchemyPrayCnt)
#    limitCnt = PlayerVip.GetPrivilegeValue(curPlayer, ChConfig.VIPPrivilege_PrayElixir)
#    if prayCnt >= limitCnt:
#        GameWorld.DebugLog('今日祈福丹药次数已满!prayCnt=%s' % prayCnt)
#        return
#    packSpace = ItemCommon.GetItemPackSpace(curPlayer, IPY_GameWorld.rptItem, 1)
#    if not packSpace:
#        PlayerControl.NotifyCode(curPlayer, "GeRen_chenxin_998371")
#        return
#
#    alchemyItemList = IpyGameDataPY.GetFuncEvalCfg('GodAlchemy')
#
#    newItemInfoList = []
#    for itemInfo in alchemyItemList:
#        itemID = itemInfo[1]
##        if not GetIsCanOutByAlchemyLV(curPlayer, itemID):
##            #GameWorld.DebugLog('祈福丹药,炼丹等级未达到,移除产出库!itemID=%s'%itemID)
##            continue
#        if PlayerAttrFruit.IsFruitEatFull(curPlayer, itemID):
#            #GameWorld.DebugLog('祈福丹药,使用次数已满,移除产出库!itemID=%s'%itemID)
#            continue
#        newItemInfoList.append(itemInfo)
#    if not newItemInfoList:
#        GameWorld.DebugLog('祈福丹药,没有丹药可产出!!')
#        return
#
#    makeItemInfo = GameWorld.GetResultByWeightList(newItemInfoList)
#    if not makeItemInfo:
#        GameWorld.DebugLog("祈福丹药, 结果错误!")
#        return
#
#    makeItemID, itemCount = makeItemInfo
#    makeItemData = GameWorld.GetGameData().GetItemByTypeID(makeItemID)
#    if not makeItemData:
#        return
#
#    costMoney = IpyGameDataPY.GetFuncCfg('GodAlchemy', 2)
#    if not PlayerControl.PayMoney(curPlayer, IPY_GameWorld.TYPE_Price_Gold_Money, costMoney, ChConfig.Def_Cost_AlchemyPray):
#        return
#    #给物品
#    ItemControler.GivePlayerItem(curPlayer, makeItemID, itemCount, 0, [IPY_GameWorld.rptItem],
#                                 event=[ChConfig.ItemGive_Refine, False, {}])
#    #GameWorld.DebugLog('makeItemID=%s,newItemInfoList=%s'%(makeItemID, newItemInfoList))
#
#    #紫色及以上全服广播
#    notifyColor = IpyGameDataPY.GetFuncCfg("AlchemyNotify", 1)
#    needNotifyItemIDList = IpyGameDataPY.GetFuncEvalCfg("AlchemyNotify", 2)
#    notNotifyItemIDList = IpyGameDataPY.GetFuncEvalCfg("AlchemyNotify", 3)
#    if makeItemID not in notNotifyItemIDList and (makeItemID in needNotifyItemIDList or makeItemData.GetItemColor() >= notifyColor):
#        PlayerControl.WorldNotify(0, "BlastfurnaceBlessing", [curPlayer.GetPlayerName(), makeItemID])
#
#    #更新次数
#    PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_AlchemyPrayCnt, prayCnt + 1)
#    Sycn_AlchemyPrayMsg(curPlayer, makeItemID)
#    return
def Sycn_AlchemyPrayMsg(curPlayer, itemID=0):