9931 【BT0.1】【主干】境界修改(修仙之路)
| | |
| | | list LVAttrValueList; //每级额外属性值(非累积)
|
| | | };
|
| | |
|
| | | //境界修仙之路
|
| | |
|
| | | struct tagRealmXXZL
|
| | | {
|
| | | WORD _TaskID; //任务ID
|
| | | BYTE TaskType; //任务类型
|
| | | DWORD NeedValue; //所需任务值
|
| | | list AwardItemList; //奖励物品列表 [[物品ID,个数,是否拍品], ...]
|
| | | };
|
| | |
|
| | | //境界表 #tagRealm
|
| | |
|
| | | struct tagRealm
|
| | |
| | | ("KillCnt", c_int), #击杀次数
|
| | | ("ItemAddCnt", c_int), #物品增加次数
|
| | | ("BuyCnt", c_ubyte), #购买次数
|
| | | ("KillCntTotal", c_int), #击杀次数 - 累计
|
| | | ]
|
| | |
|
| | | def __init__(self):
|
| | |
| | | self.KillCnt = 0
|
| | | self.ItemAddCnt = 0
|
| | | self.BuyCnt = 0
|
| | | self.KillCntTotal = 0
|
| | | return
|
| | |
|
| | | def GetLength(self):
|
| | |
| | | BossType:%d,
|
| | | KillCnt:%d,
|
| | | ItemAddCnt:%d,
|
| | | BuyCnt:%d
|
| | | BuyCnt:%d,
|
| | | KillCntTotal:%d
|
| | | '''\
|
| | | %(
|
| | | self.BossType,
|
| | | self.KillCnt,
|
| | | self.ItemAddCnt,
|
| | | self.BuyCnt
|
| | | self.BuyCnt,
|
| | | self.KillCntTotal
|
| | | )
|
| | | return DumpString
|
| | |
|
| | |
| | | ItemAddCnt = 0 #(WORD ItemAddCnt)//物品增加次数
|
| | | PassGradeCnt = 0 #(BYTE PassGradeCnt)//星级值对应个数, 每个key存9个lineID
|
| | | PassGrade = list() #(vector<DWORD> PassGrade)//副本线路对应星级值列表
|
| | | EnterCntTotal = 0 #(DWORD EnterCntTotal)//累计进入次数
|
| | | data = None
|
| | |
|
| | | def __init__(self):
|
| | |
| | | for i in range(self.PassGradeCnt):
|
| | | value,_pos=CommFunc.ReadDWORD(_lpData,_pos)
|
| | | self.PassGrade.append(value)
|
| | | self.EnterCntTotal,_pos = CommFunc.ReadDWORD(_lpData, _pos)
|
| | | return _pos
|
| | |
|
| | | def Clear(self):
|
| | |
| | | self.ItemAddCnt = 0
|
| | | self.PassGradeCnt = 0
|
| | | self.PassGrade = list()
|
| | | self.EnterCntTotal = 0
|
| | | return
|
| | |
|
| | | def GetLength(self):
|
| | |
| | | length += 2
|
| | | length += 1
|
| | | length += 4 * self.PassGradeCnt
|
| | | length += 4
|
| | |
|
| | | return length
|
| | |
|
| | |
| | | data = CommFunc.WriteBYTE(data, self.PassGradeCnt)
|
| | | for i in range(self.PassGradeCnt):
|
| | | data = CommFunc.WriteDWORD(data, self.PassGrade[i])
|
| | | data = CommFunc.WriteDWORD(data, self.EnterCntTotal)
|
| | | return data
|
| | |
|
| | | def OutputString(self):
|
| | |
| | | RecoverCnt:%d,
|
| | | ItemAddCnt:%d,
|
| | | PassGradeCnt:%d,
|
| | | PassGrade:%s
|
| | | PassGrade:%s,
|
| | | EnterCntTotal:%d
|
| | | '''\
|
| | | %(
|
| | | self.FBID,
|
| | |
| | | self.RecoverCnt,
|
| | | self.ItemAddCnt,
|
| | | self.PassGradeCnt,
|
| | | "..."
|
| | | "...",
|
| | | self.EnterCntTotal
|
| | | )
|
| | | return DumpString
|
| | |
|
| | |
| | | ("Cmd", c_ubyte),
|
| | | ("SubCmd", c_ubyte),
|
| | | ("IsPass", c_ubyte), #是否通关副本
|
| | | ("XXZLAwardState", c_int), #修仙之路领奖状态;按二进制位存储每个任务ID是否已领取
|
| | | ]
|
| | |
|
| | | def __init__(self):
|
| | |
| | | self.Cmd = 0xA3
|
| | | self.SubCmd = 0x11
|
| | | self.IsPass = 0
|
| | | self.XXZLAwardState = 0
|
| | | return
|
| | |
|
| | | def GetLength(self):
|
| | |
| | | DumpString = '''// A3 11 通知玩家境界信息 //tagMCSyncRealmInfo:
|
| | | Cmd:%s,
|
| | | SubCmd:%s,
|
| | | IsPass:%d
|
| | | IsPass:%d,
|
| | | XXZLAwardState:%d
|
| | | '''\
|
| | | %(
|
| | | self.Cmd,
|
| | | self.SubCmd,
|
| | | self.IsPass
|
| | | self.IsPass,
|
| | | self.XXZLAwardState
|
| | | )
|
| | | return DumpString
|
| | |
|
| | |
| | | TodayExpPoint = 0 #(DWORD TodayExpPoint)
|
| | | YestordayExp = 0 #(DWORD YestordayExp)
|
| | | YestordayExpPoint = 0 #(DWORD YestordayExpPoint)
|
| | | TotalCount = 0 #(DWORD TotalCount)// 累计活跃放置次数
|
| | | data = None
|
| | |
|
| | | def __init__(self):
|
| | |
| | | self.TodayExpPoint,_pos = CommFunc.ReadDWORD(_lpData, _pos)
|
| | | self.YestordayExp,_pos = CommFunc.ReadDWORD(_lpData, _pos)
|
| | | self.YestordayExpPoint,_pos = CommFunc.ReadDWORD(_lpData, _pos)
|
| | | self.TotalCount,_pos = CommFunc.ReadDWORD(_lpData, _pos)
|
| | | return _pos
|
| | |
|
| | | def Clear(self):
|
| | |
| | | self.TodayExpPoint = 0
|
| | | self.YestordayExp = 0
|
| | | self.YestordayExpPoint = 0
|
| | | self.TotalCount = 0
|
| | | return
|
| | |
|
| | | def GetLength(self):
|
| | |
| | | length += 1
|
| | | length += 1
|
| | | length += len(self.RewardInfo)
|
| | | length += 4
|
| | | length += 4
|
| | | length += 4
|
| | | length += 4
|
| | |
| | | data = CommFunc.WriteDWORD(data, self.TodayExpPoint)
|
| | | data = CommFunc.WriteDWORD(data, self.YestordayExp)
|
| | | data = CommFunc.WriteDWORD(data, self.YestordayExpPoint)
|
| | | data = CommFunc.WriteDWORD(data, self.TotalCount)
|
| | | return data
|
| | |
|
| | | def OutputString(self):
|
| | |
| | | TodayExp:%d,
|
| | | TodayExpPoint:%d,
|
| | | YestordayExp:%d,
|
| | | YestordayExpPoint:%d
|
| | | YestordayExpPoint:%d,
|
| | | TotalCount:%d
|
| | | '''\
|
| | | %(
|
| | | self.Head.OutputString(),
|
| | |
| | | self.TodayExp,
|
| | | self.TodayExpPoint,
|
| | | self.YestordayExp,
|
| | | self.YestordayExpPoint
|
| | | self.YestordayExpPoint,
|
| | | self.TotalCount
|
| | | )
|
| | | return DumpString
|
| | |
|
| | |
| | | Def_Player_Dict_ReqFBMissionType = "ReqFBMissionType" # 请求进入副本的任务类型
|
| | | Def_Player_Dict_PlayerFBStar_MapId = "FBStar_%s_%s" # 副本星级星级信息, 参数为[mapID, key编号], 按位存储每个lineID对应的星级
|
| | | Def_Player_Dict_CustomMapStep = "CustomMapStep_%s_%s" # 前端自定义场景阶段, 参数(mapID, lineID),对应 CustomMapStep_Fight ...
|
| | | Def_Player_Dict_EnterFbCntTotal = "EnterFbCntTotal_%s" # 进入副本总累计次数, 参数为副本ID
|
| | | Def_Player_Dict_EnterFbCntDay = "EnterFbCntDay_%s" # 今日进入副本次数, 参数为副本ID
|
| | | Def_Player_Dict_BuyFbCntDay = "BuyFbCntDay_%s" # 今日购买副本进入次数, 参数为副本ID
|
| | | Def_Player_Dict_RecoverFbCnt = "RecoverFbCnt_%s" # 今日找回的副本次数, 参数为副本ID
|
| | |
| | | Def_PDict_Activity_ExtraRealmPoint = "Activity_ExtraRealmPoint" # 多倍活动额外获得的修行点
|
| | |
|
| | | # 活跃放置
|
| | | Def_PDict_ActivityCountTotal = "ActivityCountTotal" # 累计活跃放置修炼次数
|
| | | Def_PDict_ActivityCanCostTotalPoint = "ActivityCanCostTotalPoint" # 当前总活跃值(可消耗)
|
| | | Def_PDict_ActivityPlaceStartTime = "ActivityPlaceStartTime" # 活跃放置开始time值
|
| | | Def_PDict_ActivityPlaceRemainCount = "ActivityPlaceRemainCount" # 活跃放置剩余进行次数
|
| | |
| | | Def_PDict_AutoFightSetting = "AFSetting_%s_%s"
|
| | |
|
| | | # 世界boss
|
| | | Def_PDict_Boss_KillCntTotal = "Boss_KillCntTotal_%s" # 已杀boss总次数<%s-索引>
|
| | | Def_PDict_WorldBoss_HurtCnt = "WorldBoss_HurtCnt" # 当日已摸世界boss次数
|
| | | Def_PDict_Boss_KillCnt = "Boss_KillCnt_%s" # 当日已杀世界boss次数<%s-索引>
|
| | | Def_PDict_Boss_KillCntItemAddCnt = "Boss_KillCntItemAddCnt_%s" # 物品增加的当日可杀世界boss次数<%s-索引>
|
| | |
| | | Def_PDict_FeastRedPacketCanGrabCnt = "FeastRedPacketCanGrabCnt" # 节日红包可抢次数
|
| | |
|
| | | #境界
|
| | | Def_PDict_RealmXXZLAward = "RealmXXZLAward" #境界修仙之路领奖状态;按二进制位存储每个任务ID是否已领取
|
| | | Def_PDict_RealmFBIsOpen = "RealmFBIsOpen" #渡劫副本是否开启 0未开启 1已开启 2可升级境界
|
| | | Def_PDict_RealmFBAttrAdd = "RealmFBAttrAdd_%s" #渡劫副本属性加成 参数属性ID
|
| | | Def_PDict_RealmExp = "RealmExp" #境界修为池总经验
|
| | |
| | | Def_RewardType_SuccessScore, #成就积分奖励 59
|
| | | Def_RewardType_BuyOne, #买一送多活动免费奖励 60
|
| | | Def_RewardType_CustomAward, #自定义奖励 61
|
| | | )= range(62)
|
| | | Def_RewardType_RealmXXZL, #境界修仙之路奖励 62
|
| | | )= range(63)
|
| | |
|
| | |
|
| | | #boss复活相关活动定义
|
| | |
| | | ("KillCnt", c_int), #击杀次数
|
| | | ("ItemAddCnt", c_int), #物品增加次数
|
| | | ("BuyCnt", c_ubyte), #购买次数
|
| | | ("KillCntTotal", c_int), #击杀次数 - 累计
|
| | | ]
|
| | |
|
| | | def __init__(self):
|
| | |
| | | self.KillCnt = 0
|
| | | self.ItemAddCnt = 0
|
| | | self.BuyCnt = 0
|
| | | self.KillCntTotal = 0
|
| | | return
|
| | |
|
| | | def GetLength(self):
|
| | |
| | | BossType:%d,
|
| | | KillCnt:%d,
|
| | | ItemAddCnt:%d,
|
| | | BuyCnt:%d
|
| | | BuyCnt:%d,
|
| | | KillCntTotal:%d
|
| | | '''\
|
| | | %(
|
| | | self.BossType,
|
| | | self.KillCnt,
|
| | | self.ItemAddCnt,
|
| | | self.BuyCnt
|
| | | self.BuyCnt,
|
| | | self.KillCntTotal
|
| | | )
|
| | | return DumpString
|
| | |
|
| | |
| | | ItemAddCnt = 0 #(WORD ItemAddCnt)//物品增加次数
|
| | | PassGradeCnt = 0 #(BYTE PassGradeCnt)//星级值对应个数, 每个key存9个lineID
|
| | | PassGrade = list() #(vector<DWORD> PassGrade)//副本线路对应星级值列表
|
| | | EnterCntTotal = 0 #(DWORD EnterCntTotal)//累计进入次数
|
| | | data = None
|
| | |
|
| | | def __init__(self):
|
| | |
| | | for i in range(self.PassGradeCnt):
|
| | | value,_pos=CommFunc.ReadDWORD(_lpData,_pos)
|
| | | self.PassGrade.append(value)
|
| | | self.EnterCntTotal,_pos = CommFunc.ReadDWORD(_lpData, _pos)
|
| | | return _pos
|
| | |
|
| | | def Clear(self):
|
| | |
| | | self.ItemAddCnt = 0
|
| | | self.PassGradeCnt = 0
|
| | | self.PassGrade = list()
|
| | | self.EnterCntTotal = 0
|
| | | return
|
| | |
|
| | | def GetLength(self):
|
| | |
| | | length += 2
|
| | | length += 1
|
| | | length += 4 * self.PassGradeCnt
|
| | | length += 4
|
| | |
|
| | | return length
|
| | |
|
| | |
| | | data = CommFunc.WriteBYTE(data, self.PassGradeCnt)
|
| | | for i in range(self.PassGradeCnt):
|
| | | data = CommFunc.WriteDWORD(data, self.PassGrade[i])
|
| | | data = CommFunc.WriteDWORD(data, self.EnterCntTotal)
|
| | | return data
|
| | |
|
| | | def OutputString(self):
|
| | |
| | | RecoverCnt:%d,
|
| | | ItemAddCnt:%d,
|
| | | PassGradeCnt:%d,
|
| | | PassGrade:%s
|
| | | PassGrade:%s,
|
| | | EnterCntTotal:%d
|
| | | '''\
|
| | | %(
|
| | | self.FBID,
|
| | |
| | | self.RecoverCnt,
|
| | | self.ItemAddCnt,
|
| | | self.PassGradeCnt,
|
| | | "..."
|
| | | "...",
|
| | | self.EnterCntTotal
|
| | | )
|
| | | return DumpString
|
| | |
|
| | |
| | | ("Cmd", c_ubyte),
|
| | | ("SubCmd", c_ubyte),
|
| | | ("IsPass", c_ubyte), #是否通关副本
|
| | | ("XXZLAwardState", c_int), #修仙之路领奖状态;按二进制位存储每个任务ID是否已领取
|
| | | ]
|
| | |
|
| | | def __init__(self):
|
| | |
| | | self.Cmd = 0xA3
|
| | | self.SubCmd = 0x11
|
| | | self.IsPass = 0
|
| | | self.XXZLAwardState = 0
|
| | | return
|
| | |
|
| | | def GetLength(self):
|
| | |
| | | DumpString = '''// A3 11 通知玩家境界信息 //tagMCSyncRealmInfo:
|
| | | Cmd:%s,
|
| | | SubCmd:%s,
|
| | | IsPass:%d
|
| | | IsPass:%d,
|
| | | XXZLAwardState:%d
|
| | | '''\
|
| | | %(
|
| | | self.Cmd,
|
| | | self.SubCmd,
|
| | | self.IsPass
|
| | | self.IsPass,
|
| | | self.XXZLAwardState
|
| | | )
|
| | | return DumpString
|
| | |
|
| | |
| | | TodayExpPoint = 0 #(DWORD TodayExpPoint)
|
| | | YestordayExp = 0 #(DWORD YestordayExp)
|
| | | YestordayExpPoint = 0 #(DWORD YestordayExpPoint)
|
| | | TotalCount = 0 #(DWORD TotalCount)// 累计活跃放置次数
|
| | | data = None
|
| | |
|
| | | def __init__(self):
|
| | |
| | | self.TodayExpPoint,_pos = CommFunc.ReadDWORD(_lpData, _pos)
|
| | | self.YestordayExp,_pos = CommFunc.ReadDWORD(_lpData, _pos)
|
| | | self.YestordayExpPoint,_pos = CommFunc.ReadDWORD(_lpData, _pos)
|
| | | self.TotalCount,_pos = CommFunc.ReadDWORD(_lpData, _pos)
|
| | | return _pos
|
| | |
|
| | | def Clear(self):
|
| | |
| | | self.TodayExpPoint = 0
|
| | | self.YestordayExp = 0
|
| | | self.YestordayExpPoint = 0
|
| | | self.TotalCount = 0
|
| | | return
|
| | |
|
| | | def GetLength(self):
|
| | |
| | | length += 1
|
| | | length += 1
|
| | | length += len(self.RewardInfo)
|
| | | length += 4
|
| | | length += 4
|
| | | length += 4
|
| | | length += 4
|
| | |
| | | data = CommFunc.WriteDWORD(data, self.TodayExpPoint)
|
| | | data = CommFunc.WriteDWORD(data, self.YestordayExp)
|
| | | data = CommFunc.WriteDWORD(data, self.YestordayExpPoint)
|
| | | data = CommFunc.WriteDWORD(data, self.TotalCount)
|
| | | return data
|
| | |
|
| | | def OutputString(self):
|
| | |
| | | TodayExp:%d,
|
| | | TodayExpPoint:%d,
|
| | | YestordayExp:%d,
|
| | | YestordayExpPoint:%d
|
| | | YestordayExpPoint:%d,
|
| | | TotalCount:%d
|
| | | '''\
|
| | | %(
|
| | | self.Head.OutputString(),
|
| | |
| | | self.TodayExp,
|
| | | self.TodayExpPoint,
|
| | | self.YestordayExp,
|
| | | self.YestordayExpPoint
|
| | | self.YestordayExpPoint,
|
| | | self.TotalCount
|
| | | )
|
| | | return DumpString
|
| | |
|
| | |
| | | PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_ActivityPlaceTodayExpPoint, 0)
|
| | | PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_ActivityPlaceYestorDayExp, 0)
|
| | | PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_ActivityPlaceYestorDayExpPoint, 0)
|
| | | PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_ActivityCountTotal, 0)
|
| | |
|
| | | rewardItemCount = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_ActivityPlaceRewardItem)
|
| | | for i in xrange(rewardItemCount):
|
| | |
| | | infoPack.KillCnt = killCnt
|
| | | infoPack.ItemAddCnt = itemAddCnt
|
| | | infoPack.BuyCnt = hasBuyCnt
|
| | | infoPack.KillCntTotal = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_Boss_KillCntTotal % index, 0)
|
| | | packdata.KillCntInfoList.append(infoPack)
|
| | |
|
| | | packdata.Cnt = len(packdata.KillCntInfoList)
|
| | |
| | | PlayerActivity.OnEnterFBActivity(curPlayer, fbID, updCnt, addCountEx)
|
| | | PlayerSuccess.AddEnterFBSuccess(curPlayer, fbID, addCountEx)
|
| | | updValue = updCnt
|
| | | GameWorld.DebugLog(" AddEnterFBCount fbID=%s, addCount=%s, lineBit=%s, enterCnt=%s,updValue=%s" |
| | | % (fbID, addCount, lineBit, enterCnt, updValue), curPlayer.GetPlayerID())
|
| | | enterCntTotalKey = ChConfig.Def_Player_Dict_EnterFbCntTotal % fbID
|
| | | enterCntTotal = min(curPlayer.NomalDictGetProperty(enterCntTotalKey) + addCount, ChConfig.Def_UpperLimit_DWord)
|
| | | PlayerControl.NomalDictSetProperty(curPlayer, enterCntTotalKey, enterCntTotal)
|
| | | GameWorld.DebugLog(" AddEnterFBCount fbID=%s, addCount=%s, lineBit=%s, enterCnt=%s,updValue=%s,enterCntTotal=%s" |
| | | % (fbID, addCount, lineBit, enterCnt, updValue, enterCntTotal), curPlayer.GetPlayerID())
|
| | | Sync_FBPlayerFBInfoData(curPlayer, fbID)
|
| | | OnFBCountChangeEffectRecoverCount(curPlayer, fbID)
|
| | | return True
|
| | |
| | | mapInfo.Clear()
|
| | | mapInfo.FBID = mID
|
| | | mapInfo.EnterCnt = curPlayer.NomalDictGetProperty(ChConfig.Def_Player_Dict_EnterFbCntDay % mID)
|
| | | mapInfo.EnterCntTotal = curPlayer.NomalDictGetProperty(ChConfig.Def_Player_Dict_EnterFbCntTotal % mID)
|
| | | mapInfo.RecoverCnt = curPlayer.NomalDictGetProperty(ChConfig.Def_Player_Dict_RecoverFbCnt % mID)
|
| | | mapInfo.ItemAddCnt = curPlayer.NomalDictGetProperty(ChConfig.Def_Player_Dict_ItemAddFbCnt % mID)
|
| | |
|
| | |
| | | ("list", "LVAttrValueList", 0),
|
| | | ),
|
| | |
|
| | | "RealmXXZL":(
|
| | | ("WORD", "TaskID", 1),
|
| | | ("BYTE", "TaskType", 0),
|
| | | ("DWORD", "NeedValue", 0),
|
| | | ("list", "AwardItemList", 0),
|
| | | ),
|
| | |
|
| | | "Realm":(
|
| | | ("WORD", "Lv", 1),
|
| | | ("BYTE", "LvLarge", 0),
|
| | |
| | | def GetEatItemAttrValueList(self): return self.EatItemAttrValueList # 每X个培养丹增加属性值=EatCntEverytime
|
| | | def GetLVAttrTypeList(self): return self.LVAttrTypeList # 每级额外属性类(非累积)
|
| | | def GetLVAttrValueList(self): return self.LVAttrValueList # 每级额外属性值(非累积) |
| | | |
| | | # 境界修仙之路 |
| | | class IPY_RealmXXZL(): |
| | | |
| | | def __init__(self): |
| | | self.TaskID = 0
|
| | | self.TaskType = 0
|
| | | self.NeedValue = 0
|
| | | self.AwardItemList = [] |
| | | return |
| | | |
| | | def GetTaskID(self): return self.TaskID # 任务ID
|
| | | def GetTaskType(self): return self.TaskType # 任务类型
|
| | | def GetNeedValue(self): return self.NeedValue # 所需任务值
|
| | | def GetAwardItemList(self): return self.AwardItemList # 奖励物品列表 [[物品ID,个数,是否拍品], ...] |
| | | |
| | | # 境界表 |
| | | class IPY_Realm(): |
| | |
| | | self.ipyLingQiAttrLen = len(self.ipyLingQiAttrCache)
|
| | | self.ipyLingQiTrainCache = self.__LoadFileData("LingQiTrain", IPY_LingQiTrain)
|
| | | self.ipyLingQiTrainLen = len(self.ipyLingQiTrainCache)
|
| | | self.ipyRealmXXZLCache = self.__LoadFileData("RealmXXZL", IPY_RealmXXZL)
|
| | | self.ipyRealmXXZLLen = len(self.ipyRealmXXZLCache)
|
| | | self.ipyRealmCache = self.__LoadFileData("Realm", IPY_Realm)
|
| | | self.ipyRealmLen = len(self.ipyRealmCache)
|
| | | self.ipyLianTiCache = self.__LoadFileData("LianTi", IPY_LianTi)
|
| | |
| | | def GetLingQiAttrByIndex(self, index): return self.ipyLingQiAttrCache[index]
|
| | | def GetLingQiTrainCount(self): return self.ipyLingQiTrainLen
|
| | | def GetLingQiTrainByIndex(self, index): return self.ipyLingQiTrainCache[index]
|
| | | def GetRealmXXZLCount(self): return self.ipyRealmXXZLLen
|
| | | def GetRealmXXZLByIndex(self, index): return self.ipyRealmXXZLCache[index]
|
| | | def GetRealmCount(self): return self.ipyRealmLen
|
| | | def GetRealmByIndex(self, index): return self.ipyRealmCache[index]
|
| | | def GetLianTiCount(self): return self.ipyLianTiLen
|
| | |
| | | killBossCntLimitDict = IpyGameDataPY.GetFuncCfg('KillBossCntLimit', 1)
|
| | | limitIndex = GameWorld.GetDictValueByKey(killBossCntLimitDict, npcID)
|
| | | if limitIndex != None:
|
| | | totalKey = ChConfig.Def_PDict_Boss_KillCntTotal % limitIndex
|
| | | totalCnt = min(curPlayer.NomalDictGetProperty(totalKey, 0) + 1, ChConfig.Def_UpperLimit_DWord)
|
| | | PlayerControl.NomalDictSetProperty(curPlayer, totalKey, totalCnt)
|
| | | #今日杀怪次数+1
|
| | | key = ChConfig.Def_PDict_Boss_KillCnt % limitIndex
|
| | | newCnt = curPlayer.NomalDictGetProperty(key, 0) + 1
|
| | | PlayerControl.NomalDictSetProperty(curPlayer, key, newCnt)
|
| | | BossHurtMng.NotifyAttackBossCnt(curPlayer, limitIndex)
|
| | | GameWorld.DebugLog("今日杀怪次数 playerID=%s, newCnt=%s" % (curPlayer.GetPlayerID(), newCnt))
|
| | | GameWorld.DebugLog("更新击杀Boss次数: index=%s, todayCnt=%s, totalCnt=%s" % (limitIndex, newCnt, totalCnt), curPlayer.GetPlayerID())
|
| | |
|
| | | dataDict = {"objID":npcID, "bossID":npcID, "touchCnt":newCnt,
|
| | | dataDict = {"objID":npcID, "bossID":npcID, "touchCnt":newCnt, "totalCnt":totalCnt,
|
| | | "AccID":curPlayer.GetAccID(), "PlayerID":curPlayer.GetPlayerID()}
|
| | | DataRecordPack.SendEventPack("AddKillBossCnt", dataDict, curPlayer)
|
| | | PlayerSuccess.DoAddSuccessProgress(curPlayer, ShareDefine.SuccType_FeastRedPack_KillBoss, 1, [limitIndex])
|
| | |
| | | #自定义奖励
|
| | | elif rewardType == ChConfig.Def_RewardType_CustomAward:
|
| | | PlayerCustomAward.OnGetCustomAward(curPlayer, dataEx)
|
| | | #境界修仙之路奖励
|
| | | elif rewardType == ChConfig.Def_RewardType_RealmXXZL:
|
| | | PlayerPrestigeSys.GetXXZLAward(curPlayer, dataEx)
|
| | | #玩法前瞻奖励
|
| | | elif rewardType == ChConfig.Def_RewardType_GameNotice:
|
| | | OnGiveAwardByClient(curPlayer, rewardType, ChConfig.Def_PDict_GameNoticeAwardState, IpyGameDataPY.GetFuncEvalCfg("GameNoticeReward", 1))
|
| | |
| | | PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_ActivityPlaceRewardItemCount % i, 0)
|
| | | PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_ActivityPlaceRewardItem, 0)
|
| | | PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_ActivityPlaceRewardCount, 0)
|
| | | totalCount = min(curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_ActivityCountTotal) + rewardCount, ChConfig.Def_UpperLimit_DWord)
|
| | | PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_ActivityCountTotal, totalCount)
|
| | |
|
| | | GameWorld.DebugLog("领取活跃放置奖励: rewardCount=%s,rewardItemCount=%s,rewardItemList=%s" % (rewardCount, rewardItemCount, rewardItemList))
|
| | | GameWorld.DebugLog("领取活跃放置奖励: totalCount=%s,rewardCount=%s,rewardItemCount=%s,rewardItemList=%s" % (totalCount, rewardCount, rewardItemCount, rewardItemList))
|
| | | ItemControler.GivePlayerItemOrMail(curPlayer, rewardItemList)
|
| | |
|
| | | EventShell.EventRespons_ActivityPlace(curPlayer, "getreward")
|
| | |
| | | placeInfo.TodayExpPoint = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_ActivityPlaceTodayExpPoint)
|
| | | placeInfo.YestordayExp = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_ActivityPlaceYestorDayExp)
|
| | | placeInfo.YestordayExpPoint = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_ActivityPlaceYestorDayExpPoint)
|
| | | placeInfo.TotalCount = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_ActivityCountTotal)
|
| | | NetPackCommon.SendFakePack(curPlayer, placeInfo)
|
| | | return
|
| | |
|
| | |
| | | #};
|
| | | def OpenRealmFB(index, clientData, tick):
|
| | | return
|
| | |
|
| | | def GetXXZLAward(curPlayer, taskID):
|
| | | ## 领取修仙之路奖励
|
| | | awardState = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_RealmXXZLAward)
|
| | | if awardState&pow(2, taskID):
|
| | | GameWorld.DebugLog("已领取过境界修仙之路该奖励, taskID=%s" % taskID, curPlayer.GetPlayerID())
|
| | | return
|
| | |
|
| | | ipyData = IpyGameDataPY.GetIpyGameData("RealmXXZL", taskID)
|
| | | if not ipyData:
|
| | | return
|
| | | taskType = ipyData.GetTaskType()
|
| | | needValue = ipyData.GetNeedValue()
|
| | | curValue= 0
|
| | | |
| | | #1. 得到 XXX法宝, 所需值为法宝ID
|
| | | if taskType == 1:
|
| | | magicWeaponID = needValue
|
| | | if curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_MagicWeaponLV % magicWeaponID) >= 1:
|
| | | curValue = needValue
|
| | | |
| | | #2. 通关天星塔X层
|
| | | elif taskType == 2:
|
| | | curValue = curPlayer.NomalDictGetProperty(ChConfig.Def_Player_Dict_SkyTowerFloor)
|
| | | |
| | | #3. 击杀世界BOSSX只
|
| | | elif taskType == 3:
|
| | | curValue = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_Boss_KillCntTotal % ShareDefine.Def_Boss_Func_World)
|
| | | |
| | | #4. 活跃修炼X次
|
| | | elif taskType == 4:
|
| | | curValue = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_ActivityCountTotal)
|
| | | |
| | | #5. 击杀个人BOSS:xxx,所需之为个人boss表对应线路id
|
| | | elif taskType == 5:
|
| | | mapID = ChConfig.Def_FBMapID_PersonalBoss
|
| | | lineID = needValue
|
| | | if GameWorld.GetDictValueByBit(curPlayer, ChConfig.Def_Player_Dict_PlayerFBStar_MapId, lineID, False, [mapID]):
|
| | | curValue = needValue
|
| | | |
| | | #6. 通关宗门试炼x次
|
| | | elif taskType == 6:
|
| | | curValue = curPlayer.NomalDictGetProperty(ChConfig.Def_Player_Dict_EnterFbCntTotal % ChConfig.Def_FBMapID_MunekadoTrial)
|
| | | |
| | | #7. 获得X点灵根点
|
| | | elif taskType == 7:
|
| | | curValue = PlayerControl.GetTotalLingGenPoint(curPlayer)
|
| | | |
| | | if curValue < needValue:
|
| | | GameWorld.DebugLog("境界修仙之路当前任务所需值不满足,无法领奖, taskID=%s,taskType=%s,curValue=%s < %s" |
| | | % (taskID, taskType, curValue, needValue), curPlayer.GetPlayerID())
|
| | | return
|
| | | |
| | | awardItemList = ipyData.GetAwardItemList()
|
| | | if not ItemCommon.GiveAwardItem(curPlayer, awardItemList):
|
| | | return
|
| | | |
| | | updAwardState = awardState|pow(2, taskID)
|
| | | PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_RealmXXZLAward, updAwardState)
|
| | | GameWorld.DebugLog("领取境界修仙之路奖励, awardID=%s,updAwardState=%s" % (taskID, updAwardState), curPlayer.GetPlayerID())
|
| | | SyncRealmFBState(curPlayer)
|
| | | return
|
| | |
|
| | | def SyncRealmFBState(curPlayer):
|
| | | #通知客户端渡劫副本是否开启
|
| | | if not GameFuncComm.GetFuncCanUse(curPlayer, ShareDefine.GameFuncID_Official):
|
| | | return
|
| | | #if not GameFuncComm.GetFuncCanUse(curPlayer, ShareDefine.GameFuncID_Official):
|
| | | # return
|
| | | sendPack = ChPyNetSendPack.tagMCSyncRealmInfo()
|
| | | sendPack.IsPass = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_RealmFBIsOpen)
|
| | | sendPack.XXZLAwardState = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_RealmXXZLAward)
|
| | | NetPackCommon.SendFakePack(curPlayer, sendPack)
|
| | | return
|
| | |
|