4495 【后端】【1.2.0】中立地图之中,每隔X时间额外获得挂机经验 4477 【后端】【1.2.0】开启离线挂机功能后,系统默认赠送10个小时离线挂机时间(无需使用道具)
| | |
| | | GameFuncID_HorsePetRobBoss = 139# 骑宠争夺
|
| | | GameFuncID_AddPoint = 145 # 加点功能
|
| | | GameFuncID_LittleHelper = 146 # 小助手
|
| | | GameFuncID_TJG = 147 # 脱机挂
|
| | | # 以下为暂时无用的
|
| | | GameFuncID_Truck = 33 # 运镖
|
| | | GameFuncID_RunDaily = 34 # 日常跑环
|
| | |
| | |
|
| | | Def_PDict_PKStateTick = "PKStateTick" # PK状态tick,只要有一方发起攻击,双方均进入PK状态
|
| | | Def_PDict_BossStateTick = "BossStateTick" # boss状态tick,攻击boss即进入boss状态
|
| | |
|
| | | Def_PDict_MapAreaExpTick = "MapAreaExpTick" # 给场景经验tick
|
| | | # 装备累计基础属性
|
| | | Def_PDict_EquipTotalBaseMinAtk = "EquipTotalBaseMinAtk" # 装备累计基础最小攻击
|
| | | Def_PDict_EquipTotalBaseMaxAtk = "EquipTotalBaseMaxAtk" # 装备累计基础最大攻击
|
| | |
| | | reLV = curPlayer.GetLV()
|
| | | worldlv = GameWorld.GetGameWorld().GetGameWorldDictByKey(ShareDefine.Def_Notify_WorldKey_WorldAverageLv)
|
| | | giveLV = eval(IpyGameDataPY.GetFuncCompileCfg('FamilyPartySitAward', 2))
|
| | | addExp = 0
|
| | | if giveLV:
|
| | | Item_AddLV.DoAddLVEx(curPlayer, giveLV, True, True, 0)
|
| | | addExp = Item_AddLV.DoAddLVEx(curPlayer, giveLV, True, True, 0)
|
| | | reLV = curPlayer.GetLV()
|
| | | reExp = PlayerControl.GetPlayerReExp(curPlayer)
|
| | | giveExp = eval(IpyGameDataPY.GetFuncCompileCfg('FamilyPartySitAward'))
|
| | |
| | | PlayerControl.PlayerControl(curPlayer).AddExp(giveExp)
|
| | | exp = gameWorld.GetGameWorldDictByKey(FBPlayerDict_TotalExp % playerID)
|
| | | expPoint = gameWorld.GetGameWorldDictByKey(FBPlayerDict_TotalExpPoint % playerID)
|
| | | newTotalExp = expPoint*ChConfig.Def_PerPointValue+exp+giveExp
|
| | | newTotalExp = expPoint*ChConfig.Def_PerPointValue+exp+giveExp+addExp
|
| | | gameWorld.SetGameWorldDict(FBPlayerDict_TotalExp % playerID, newTotalExp%ChConfig.Def_PerPointValue)
|
| | | gameWorld.SetGameWorldDict(FBPlayerDict_TotalExpPoint % playerID, newTotalExp/ChConfig.Def_PerPointValue)
|
| | |
|
| | |
| | | # 满级
|
| | | if lvUpNeedExp <= 0:
|
| | | PlayerControl.NotifyCode(curPlayer, "GeRen_liubo_607994")
|
| | | return False
|
| | | return 0
|
| | |
|
| | | giveExp = 0
|
| | | for lv in range(curLV, curLV + giveLV):
|
| | |
| | | import IPY_GameWorld
|
| | | import ItemCommon
|
| | | import ItemControler
|
| | | import PlayerTJG
|
| | |
|
| | |
|
| | | # 功能开启需执行的函数{功能ID:执行函数, ...} 函数需返回是否激活成功, 功能开启有需要处理功能逻辑的这里增加函数调用配置即可
|
| | |
| | | ShareDefine.GameFuncID_OSSail:lambda curObj:FunctionNPCCommon.OSSaleOpenMail(curObj),
|
| | | ShareDefine.GameFuncID_AddPoint:lambda curObj:PlayerControl.DoAddPointOpen(curObj),
|
| | | ShareDefine.GameFuncID_Talent:lambda curObj:PlayerGreatMaster.DoTalentOpen(curObj),
|
| | | ShareDefine.GameFuncID_TJG:lambda curObj:PlayerTJG.DoTJGOpen(curObj),
|
| | | #ShareDefine.GameFuncID_RunDaily:lambda curObj:FBCommon.DoFuncOpen_RunDaily(curObj),
|
| | | #ShareDefine.GameFuncID_RunFamily:lambda curObj:FBCommon.DoFuncOpen_RunFamily(curObj),
|
| | | #ShareDefine.GameFuncID_RefineExp:lambda curObj:Operate_PlayerBuyZhenQi.DoFuncOpen_RefineExp(curObj),
|
| | |
| | | import PlayerSuccess
|
| | | import PassiveBuffEffMng
|
| | | import PlayerFamilyRedPacket
|
| | | import FormulaControl
|
| | | import PlayerGoldGift
|
| | | import PlayerFlashSale
|
| | | import PlayerWing
|
| | |
| | | PlayerFamilyRedPacket.ProcessOSRedPacket(curPlayer, tick)
|
| | | #限时抢购
|
| | | PlayerFlashSale.ProcessFlashSaleMail(curPlayer, tick)
|
| | | #地图经验
|
| | | ProcessAreaExp(curPlayer, tick)
|
| | | return
|
| | |
|
| | |
|
| | |
| | | #GameWorld.DebugLog("设置Boss状态tick!tick=%s" % tick, curPlayer.GetPlayerID())
|
| | | return
|
| | |
|
| | | def ProcessAreaExp(curPlayer, tick):
|
| | | ##给场景经验
|
| | | mapID = GameWorld.GetMap().GetMapID()
|
| | | neutralMapExpAwardDict = IpyGameDataPY.GetFuncEvalCfg('NeutralMapExpAward', 1, {})
|
| | | expAwardInfo = GameWorld.GetDictValueByKey(neutralMapExpAwardDict, mapID)
|
| | | if not expAwardInfo:
|
| | | return
|
| | | if len(expAwardInfo) != 2:
|
| | | return
|
| | | secondCD, expFormula = expAwardInfo
|
| | | lastTick = curPlayer.GetDictByKey(ChConfig.Def_PDict_MapAreaExpTick)
|
| | | if not lastTick:
|
| | | curPlayer.SetDict(ChConfig.Def_PDict_MapAreaExpTick, tick)
|
| | | return
|
| | | if tick - lastTick < secondCD:
|
| | | return
|
| | | curPlayer.SetDict(ChConfig.Def_PDict_MapAreaExpTick, tick)
|
| | |
|
| | | reExp = PlayerControl.GetPlayerReExp(curPlayer)
|
| | | reLV = curPlayer.GetLV()
|
| | | worldLV = GameWorld.GetGameWorld().GetGameWorldDictByKey(ShareDefine.Def_Notify_WorldKey_WorldAverageLv)
|
| | | addExp = eval(FormulaControl.GetCompileFormula('NeutralMapExpAward%s'%mapID, expFormula))
|
| | | PlayerControl.PlayerControl(curPlayer).AddExp(addExp)
|
| | | return
|
| | |
| | | ]
|
| | |
|
| | | Def_EatSpace = 5 # 低于X格自动吞噬
|
| | |
|
| | |
|
| | | def DoTJGOpen(curPlayer):
|
| | | ##脱机挂功能开启 赠送脱机时间
|
| | | addTime = IpyGameDataPY.GetFuncCfg('TJGGiftTime')
|
| | | AddTJGTime(curPlayer, addTime)
|
| | | GameWorld.DebugLog('脱机挂功能开启 赠送脱机时间 %s'%addTime, curPlayer.GetID())
|
| | | return
|
| | |
|
| | | #===============================================================================
|
| | | # //B2 01 脱机挂状态 # tagCMLoginState
|
| | | # struct tagCMLoginState
|
| | |
| | | GameFuncID_HorsePetRobBoss = 139# 骑宠争夺
|
| | | GameFuncID_AddPoint = 145 # 加点功能
|
| | | GameFuncID_LittleHelper = 146 # 小助手
|
| | | GameFuncID_TJG = 147 # 脱机挂
|
| | | # 以下为暂时无用的
|
| | | GameFuncID_Truck = 33 # 运镖
|
| | | GameFuncID_RunDaily = 34 # 日常跑环
|