xdh
2019-04-28 06469e3516489bdd51bf7bb11d824e72329a25f3
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Event/EventSrc/QuestRunner.py
@@ -55,6 +55,7 @@
import PlayerBossReborn
import PlayerFairyCeremony
import PlayerNewFairyCeremony
import Operate_EquipStone
import PlayerWeekParty
import PlayerFairyDomain
import PlayerActLogin
@@ -7092,6 +7093,56 @@
    curMission.SetProperty(key, SkillShell.GetElementSkillCnt(curPlayer))
    return
##设置符合条件的已穿基础装备数量
# @param curPlayer 玩家实例
# @param curMission 任务实例
# @param curActionNode节点信息
# @return 返回值无意义
# @remarks <Set_Baseequipcnt key="" classlv="" color="" suite="[suiteID,..]"/>
def DoType_Set_Baseequipcnt(curPlayer, curMission, curActionNode):
    classLV = GameWorld.ToIntDef(curActionNode.GetAttribute("classlv"), 0)
    color = GameWorld.ToIntDef(curActionNode.GetAttribute("color"), 0)
    suite = curActionNode.GetAttribute("suite")
    suiteIDList = eval(suite) if suite else []
    haveCnt = __GetBaseequipcnt(curPlayer, classLV, color, suiteIDList)
    key = curActionNode.GetAttribute("key")
    questID = GameWorld.ToIntDef(curActionNode.GetAttribute("id"), 0)
    if questID != 0:
        curMission = curPlayer.FindMission(questID)
    curMission.SetProperty(key, haveCnt)
    return
def __GetBaseequipcnt(curPlayer, classLV, color, suiteIDList):
    haveCnt = 0
    equipPack = curPlayer.GetItemManager().GetPack(IPY_GameWorld.rptEquip)
    for place in ChConfig.EquipPlace_Base:
        ipyData = IpyGameDataPY.GetIpyGameData('EquipPlaceIndexMap', classLV, place)
        if not ipyData:
            break
        gridIndex = ipyData.GetGridIndex()
        curEquip = equipPack.GetAt(gridIndex)
        if not ItemCommon.CheckItemCanUse(curEquip):
            continue
        if curEquip.GetItemColor() < color:
            continue
        if suiteIDList and curEquip.GetSuiteID() not in suiteIDList:
            continue
        haveCnt += 1
    return haveCnt
##判断符合条件的已穿基础装备数量
# @param None
# @return None <Baseequipcnt cnt="cnt" classlv="" color="" suite="[suiteID,..]"/>
def ConditionType_Baseequipcnt(curPlayer, curMission, curActionNode):
    totalcnt = GameWorld.ToIntDef(curActionNode.GetAttribute("cnt"), 0)
    classLV = GameWorld.ToIntDef(curActionNode.GetAttribute("classlv"), 0)
    color = GameWorld.ToIntDef(curActionNode.GetAttribute("color"), 0)
    suite = curActionNode.GetAttribute("suite")
    suiteIDList = eval(suite) if suite else []
    haveCnt = __GetBaseequipcnt(curPlayer, classLV, color, suiteIDList)
    return haveCnt >= totalcnt
##法宝激活个数
# @param None
# @return None <Mwcnt value="cnt"/>
@@ -7130,7 +7181,22 @@
# @return None <Equiptotalstar value="cnt"/>
def ConditionType_Equiptotalstar(curPlayer, curMission, curActionNode):
    totalcnt = GameWorld.ToIntDef(curActionNode.GetAttribute("value"), 0)
    return #ChEquip.GetTotalEquipStars(curPlayer) >= totalcnt
    return ChEquip.GetTotalEquipStars(curPlayer) >= totalcnt
##装备宝石总等级
# @param None
# @return None <Equiptotalstone value="cnt"/>
def ConditionType_Equiptotalstone(curPlayer, curMission, curActionNode):
    totalcnt = GameWorld.ToIntDef(curActionNode.GetAttribute("value"), 0)
    return Operate_EquipStone.GetTotalStoneLV(curPlayer) >= totalcnt
##技能总等级
# @param None
# @return None <Totalskilllv value="" funcType=""/>
def ConditionType_Totalskilllv(curPlayer, curMission, curActionNode):
    totalcnt = GameWorld.ToIntDef(curActionNode.GetAttribute("value"), 0)
    funcType = GameWorld.ToIntDef(curActionNode.GetAttribute("funcType"), 0)
    return SkillShell.GetAllSkillLV(curPlayer, funcType) >= totalcnt
##激活法宝,确认与成就逻辑后使用
# @param None