xdh
2019-02-21 0494d4903383737139445b11e525a9e2ca583801
6268 【后端】【1.6.100】增加道具七日巡礼积分和节日巡礼积分支持
2个文件已修改
1个文件已添加
48 ■■■■■ 已修改文件
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChConfig.py 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Item/ChItem.py 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Item/UseItem/Item_WeekPartyPoint.py 43 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChConfig.py
@@ -449,6 +449,8 @@
Def_Effect_ItemGiveSoulSplinters = 240   # 使用道具给予聚魂碎片
Def_Effect_ItemGiveSoulCore = 241      #使用道具给予核心环
Def_Effect_ItemGiveHonor = 242      #使用道具给予荣誉
Def_Effect_ItemGiveWeekPartyPoint = 245      #使用道具给予七日巡礼积分
Def_Effect_ItemGiveWeekPartyPoint1 = 246      #使用道具给予节日巡礼积分
#----以下未使用或代码依然存在的---
Def_Effect_ItemGiveGongXun = 1920        #使用道具给予功勋
Def_Effect_ItemGiveRuneJH = 1925       #使用道具给予符印精华
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Item/ChItem.py
@@ -723,7 +723,8 @@
                            ChConfig.Def_Effect_AddKillBossCnt:"Item_AddKillBossCnt", # 增加BOSS可击杀次数
                            ChConfig.Def_Effect_AddMagicWeaponUpExp:"Item_AddMagicWeaponUpExp", # 增加法宝升星经验
                            ChConfig.Def_Effect_ChatBubbleBox:"Item_ChatBubbleBox", # 激活聊天气泡框
                            #ChConfig.Def_PhoneVip_EffID:"Item_AddPhoneVip", # 手机VIP物品卡
                            ChConfig.Def_Effect_ItemGiveWeekPartyPoint:"Item_WeekPartyPoint", # 增加活动巡礼积分
                            ChConfig.Def_Effect_ItemGiveWeekPartyPoint1:"Item_WeekPartyPoint", # 增加活动巡礼积分
                            #ChConfig.Def_Effect_AddZhenQiByTimes:"Item_AddZhenQiByTimes", # 增加真气按一天使用次数减少
                            #ChConfig.Def_Effect_AddPrestige:"Item_AddPrestige",  # 给人物威望
                            #ChConfig.Def_Effect_FamilyImpeach:"Item_FamilyImpeach",  # 弹劾符
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Item/UseItem/Item_WeekPartyPoint.py
New file
@@ -0,0 +1,43 @@
#!/usr/bin/python
# -*- coding: GBK -*-
#
# @todo: 使用道具给予七日巡礼积分
#
# @author: xdh
# @date 2019-2-21 下午09:58:45
# @version 1.0
#
# @note:
#
#---------------------------------------------------------------------
import PlayerControl
import ItemCommon
import PyGameData
import ShareDefine
import ChConfig
def BatchUseItem(curPlayer, curRoleItem, tick, useCnt, exData):
    curEffID = curRoleItem.GetEffectByIndex(0).GetEffectID()
    dayIndex = curRoleItem.GetEffectByIndex(0).GetEffectValue(0) - 1
    if curEffID == ChConfig.Def_Effect_ItemGiveWeekPartyPoint:
        actWeekPartyInfo = PyGameData.g_operationActionDict.get(ShareDefine.OperationActionName_WeekParty, {})
        state = actWeekPartyInfo.get(ShareDefine.ActKey_State, 0)
        if not state:
            return
        curPoint = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_WeekPartyPoint % dayIndex, 0, ChConfig.Def_PDictType_WeekParty)
        updPoint = curPoint + useCnt
        PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_WeekPartyPoint % dayIndex, updPoint, ChConfig.Def_PDictType_WeekParty)
        PlayerControl.NotifyCode(curPlayer, 'SevenDayIntegral', [dayIndex+1, useCnt])
    elif curEffID == ChConfig.Def_Effect_ItemGiveWeekPartyPoint1:
        actFeastWeekPartyInfo = PyGameData.g_operationActionDict.get(ShareDefine.OperationActionName_FeastWeekParty, {})
        state = actFeastWeekPartyInfo.get(ShareDefine.ActKey_State, 0)
        if not state:
            return
        curPoint = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_FeastWeekPartyPoint % dayIndex, 0, ChConfig.Def_PDictType_FeastWeekParty)
        updPoint = curPoint + useCnt
        PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_FeastWeekPartyPoint % dayIndex, updPoint, ChConfig.Def_PDictType_FeastWeekParty)
        PlayerControl.NotifyCode(curPlayer, 'SevenDayIntegral1', [dayIndex+1, useCnt])
    ItemCommon.DelItem(curPlayer, curRoleItem, useCnt, True)
    return True, useCnt