| | |
| | | InvestType_Login, # 登录 9
|
| | | InvestType_LV, # 等级 10
|
| | | InvestType_Boss, # Boss 11
|
| | | ) = range(7, 7 + 5)
|
| | | InvestType_Life, # 终身卡 12
|
| | | ) = range(7, 7 + 6)
|
| | |
|
| | |
|
| | | #前端特殊新手引导存储标记
|
| | |
| | | import NetPackCommon
|
| | | import NPCCommon
|
| | | import PlayerVip
|
| | | import PlayerGoldInvest
|
| | | import GameObj
|
| | |
|
| | | import math
|
| | |
| | | EventRespons_OnFinishTask(curPlayer, taskID, rewardPer)
|
| | | return
|
| | |
|
| | | ## A2 06 快速完成任务#tagCMQuickFinishMission
|
| | | # @param index 索引
|
| | | # @param clientData 封包结构体
|
| | | # @param tick 时间戳
|
| | | # @return None
|
| | | #// A2 06 快速完成任务#tagCMQuickFinishMission
|
| | | #
|
| | | #struct tagCMQuickFinishMission
|
| | | #{
|
| | | # tagHead Head;
|
| | | # DWORD MissionID;
|
| | | # BYTE DoType; // 0-只完成本次;1-完成所有环任务
|
| | | #};
|
| | | def PlayerQuickFinishTask(index, clientData, tick):
|
| | | missionID = clientData.MissionID
|
| | | if missionID <= 0:
|
| | |
| | | doType = clientData.DoType
|
| | | if doType == 1:
|
| | | EventRespons_OnQuickFinishAllAround(curPlayer, missionID)
|
| | | else:
|
| | | EventRespons_OnQuickFinishTask(curPlayer, missionID)
|
| | | return
|
| | | |
| | | isFree = PlayerGoldInvest.CanQuickFinishMissionFree(curPlayer)
|
| | | costMoneyInfo = IpyGameDataPY.GetFuncEvalCfg("QuickFinishMission", 1)
|
| | | if costMoneyInfo and not isFree:
|
| | | moneyType, moneyValue = costMoneyInfo
|
| | | if not PlayerControl.PayMoney(curPlayer, moneyType, moneyValue, ChConfig.Def_Cost_MissionDel, {"MissionID":missionID}):
|
| | | return
|
| | | |
| | | EventRespons_OnQuickFinishTask(curPlayer, missionID)
|
| | | return
|
| | |
|
| | |
|
| | |
| | | if not msgList:
|
| | | GameWorld.DebugAnswer(curPlayer, "重置所有投资: ClearInvest 0")
|
| | | GameWorld.DebugAnswer(curPlayer, "重置指定投资: ClearInvest 类型")
|
| | | GameWorld.DebugAnswer(curPlayer, "类型:7-永久卡;8-周卡;9-登录卡;10-等级卡;11-boss卡;")
|
| | | GameWorld.DebugAnswer(curPlayer, "类型:7-永久卡;8-周卡;9-登录卡;10-等级卡;11-boss卡;;12-终身卡;")
|
| | | return
|
| | |
|
| | | investType = msgList[0]
|
| | |
| | | import ChConfig
|
| | | import FBLogic
|
| | | import PlayerVip
|
| | | import PlayerGoldInvest
|
| | |
|
| | | import operator
|
| | | import json
|
| | |
| | | limitCnt = PlayerVip.GetPrivilegeValue(curPlayer, killLimitPrivilege)
|
| | | else:
|
| | | limitCnt = IpyGameDataPY.GetFuncEvalCfg('KillBossCntLimit', 2, {}).get(bossFuncIndex, 0)
|
| | | limitCnt += PlayerGoldInvest.GetAddBossCnt(curPlayer, bossFuncIndex) # 投资卡加上限
|
| | | return max(0, limitCnt + itemAddKillCnt + hasBuyCnt - hasKillCnt), limitCnt
|
| | |
|
| | |
|
| | |
| | | import GameObj
|
| | | import FBLogic
|
| | | import ChConfig
|
| | | import PlayerGoldInvest
|
| | |
|
| | | import datetime
|
| | | import random
|
| | |
| | | recoverFbCnt = curPlayer.NomalDictGetProperty(ChConfig.Def_Player_Dict_RecoverFbCnt % mapID)
|
| | | itemAddCnt = curPlayer.NomalDictGetProperty(ChConfig.Def_Player_Dict_ItemAddFbCnt % mapID)
|
| | | regainFbCnt = curPlayer.NomalDictGetProperty(ChConfig.Def_Player_Dict_RegainFbCnt % mapID)
|
| | | maxCnt = maxTimes + regainFbCnt + extraCnt + buyCnt + recoverFbCnt + mwAddCnt + itemAddCnt
|
| | | investFBCnt = PlayerGoldInvest.GetAddFBCnt(curPlayer, mapID)
|
| | | maxCnt = maxTimes + regainFbCnt + extraCnt + buyCnt + recoverFbCnt + mwAddCnt + itemAddCnt + investFBCnt
|
| | | return maxCnt
|
| | |
|
| | | def GetFBDetailCntInfo(curPlayer, mapID):
|
| | |
| | | PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_InvestProgress % (investType, 0), progressValue)
|
| | | GameWorld.DebugLog("更新登录投资可领奖天数进度: %s" % progressValue)
|
| | |
|
| | | # 终身卡
|
| | | elif investType == ChConfig.InvestType_Life:
|
| | | for keyNum in range(ChConfig.Def_PDict_InvestKeyCount):
|
| | | PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_InvestReward % (investType, keyNum), 0)
|
| | | |
| | | Sync_InvestInfo(curPlayer, investType)
|
| | | return
|
| | |
|
| | |
| | | if itemID in [20, 30]: # 单位1的仙玉、灵石
|
| | | totalGold += itemCount
|
| | | return totalGold
|
| | |
|
| | | def GetAddBossCnt(curPlayer, bossFuncIndex):
|
| | | ## 获取增加的boss次数上限
|
| | | addBossCnt = 0
|
| | | if GetInvestState(curPlayer, ChConfig.InvestType_Life):
|
| | | lifeCardAddBossCntDict = IpyGameDataPY.GetFuncEvalCfg("InvestPower", 1, {})
|
| | | lifeCardAddCnt = lifeCardAddBossCntDict.get(str(bossFuncIndex), 0)
|
| | | addBossCnt += lifeCardAddCnt
|
| | | return addBossCnt
|
| | |
|
| | | def GetAddFBCnt(curPlayer, mapID):
|
| | | ## 获取增加的副本次数上限
|
| | | addFBCnt = 0
|
| | | if GetInvestState(curPlayer, ChConfig.InvestType_Life):
|
| | | lifeCardAddFBCntDict = IpyGameDataPY.GetFuncEvalCfg("InvestPower", 2, {})
|
| | | lifeCardAddCnt = lifeCardAddFBCntDict.get(str(mapID), 0)
|
| | | addFBCnt += lifeCardAddCnt
|
| | | return addFBCnt
|
| | |
|
| | | def CanQuickFinishMissionFree(curPlayer):
|
| | | ## 可否免费快速完成任务
|
| | | for investType in IpyGameDataPY.GetFuncEvalCfg("InvestPower", 3):
|
| | | if GetInvestState(curPlayer, investType):
|
| | | return True
|
| | | return False
|
| | |
|
| | | def OnKillBoss(curPlayer, npcID):
|
| | | ## 参与击杀boss
|
| | |
| | | GameWorld.DebugLog(" Boss投资无参与击杀该boss,无法领取! rewardIndex=%s" % (rewardIndex))
|
| | | return
|
| | |
|
| | | # 终身卡
|
| | | elif investType == ChConfig.InvestType_Life:
|
| | | pass
|
| | | |
| | | else:
|
| | | return
|
| | |
|