| | |
| | | NotifyCode(curPlayer, "CrossMap10")
|
| | | return False
|
| | |
|
| | | if curPlayer.GetDictByKey(ChConfig.Def_PlayerKey_ClientCustomScene):
|
| | | GameWorld.Log("客户端自定义场景下无法传送!", curPlayer.GetPlayerID())
|
| | | return False
|
| | | |
| | | return True
|
| | |
|
| | |
|
| | |
| | | playerID = curPlayer.GetPlayerID()
|
| | | if not isDisconnect:
|
| | | CrossPlayerData.ClearCrossSyncDataCache(curPlayer)
|
| | | PyGameData.g_fbBuyBuffTimeDict.pop(playerID, None)
|
| | | #清除地图玩家缓存
|
| | | PyGameData.g_playerReqEnterFBEx.pop(playerID, None)
|
| | | NPCCommon.ClearPriWoodPile(curPlayer)
|
| | | #移除地图缓存的境界难度玩家ID信息
|
| | | for playerIDList in PyGameData.g_realmDiffPlayerDict.values():
|
| | | if playerID in playerIDList:
|
| | |
| | | #进入副本通用检查
|
| | | fbIpyData = FBCommon.GetFBIpyData(mapID)
|
| | | fbLineIpyData = FBCommon.GetFBLineIpyData(mapID, lineID)
|
| | | sceneMapID = mapID if not fbLineIpyData else fbLineIpyData.GetMapID()
|
| | | sceneMapID = mapID #if not fbLineIpyData else fbLineIpyData.GetMapID()
|
| | | #过滤封包地图ID
|
| | | if not GameWorld.GetMap().IsMapIDExist(sceneMapID):
|
| | | GameWorld.ErrLog('###非法地图数据,sceneMapID: %s' % (sceneMapID), curPlayer.GetID())
|
| | |
| | | GameWorld.Log("非队长,无法发起进入组队副本请求!", curPlayer.GetPlayerID())
|
| | | return
|
| | | isSendToGameServer = True
|
| | | if isSendToGameServer or mapID in ChConfig.Def_MapID_SendToGameServer \
|
| | | or mapID in ReadChConfig.GetEvalChConfig("MapID_SendToGameServer"):
|
| | | if isSendToGameServer:
|
| | | extendParamList = []
|
| | | if mapID in ChConfig.Def_MapID_LineIDToPropertyID:
|
| | | enterCnt = curPlayer.NomalDictGetProperty(ChConfig.Def_Player_Dict_EnterFbCntDay % mapID)
|
| | | enterCnt = curPlayer.NomalDictGetProperty(ChConfig.Def_Player_Dict_FbEnterCnt % mapID)
|
| | | extendParamList = [enterCnt]
|
| | | elif mapID in ChConfig.MirrorBattleMapIDList:
|
| | | reqInfoEx["sceneMapID"] = sceneMapID
|
| | | extendParamList = [reqInfoEx]
|
| | | #elif mapID in ChConfig.MirrorBattleMapIDList:
|
| | | # reqInfoEx["sceneMapID"] = sceneMapID
|
| | | # extendParamList = [reqInfoEx]
|
| | | SendToGameServerEnterFB(curPlayer, mapID, lineID, tick, extendParamList)
|
| | | return
|
| | |
|
| | |
| | | if isNotify:
|
| | | NotifyCode(curPlayer, "Carry_lhs_697674")
|
| | | return ShareDefine.EntFBAskRet_Sit
|
| | | |
| | | if curPlayer.GetDictByKey(ChConfig.Def_PlayerKey_ClientCustomScene):
|
| | | if isNotify:
|
| | | NotifyCode(curPlayer, "Carry_lhs_697674")
|
| | | GameWorld.Log("客户端自定义场景下无法进入副本!", curPlayer.GetPlayerID())
|
| | | return ShareDefine.EntFBAskRet_Other
|
| | |
|
| | | if playerAction in ChConfig.Def_Player_Cannot_TransState:
|
| | | #Carry_lhs_697674:您当前所处的状态不能进行传送!
|
| | |
| | | curPlayer.SetDict(ChConfig.Def_PlayerKey_TransTick, tick)
|
| | |
|
| | | mapID = FBCommon.GetRecordMapID(mapID)
|
| | | fbLineIpyData = FBCommon.GetFBLineIpyData(mapID, funcLineID)
|
| | | sceneMapID = mapID if not fbLineIpyData else fbLineIpyData.GetMapID()
|
| | | sceneMapID = mapID #if not fbLineIpyData else fbLineIpyData.GetMapID()
|
| | |
|
| | | # 地图分流, 减少单地图压力
|
| | | FBMapShuntDict = ReadChConfig.GetEvalChConfig("FBMapShunt")
|
| | |
| | | return tagLineID
|
| | | tagLinePlayerCountDict = PyGameData.g_commMapLinePlayerCountDict[tagMapID] # 此分线包含所有分线,含未开放的及活动分线
|
| | |
|
| | | if bossID and tagMapID != ChConfig.Def_FBMapID_BossHome:
|
| | | tagLineID = 0 # Boss的话未分流前先强制1线,即为0
|
| | | #if bossID and tagMapID != ChConfig.Def_FBMapID_BossHome:
|
| | | # tagLineID = 0 # Boss的话未分流前先强制1线,即为0
|
| | | playerID = curPlayer.GetPlayerID()
|
| | | playChangeLineID = curPlayer.NomalDictGetProperty(ChConfig.Def_Player_Dict_PlayChangeLineID)
|
| | | funcChangeLineID = curPlayer.NomalDictGetProperty(ChConfig.Def_Player_Dict_FuncChangeLineID)
|
| | |
| | | # @return 返回值真, 给钱成功
|
| | | # @param isSysHint 是否系统提示(默认是)
|
| | | # @remarks 玩家获得金钱
|
| | | def GiveMoney(curPlayer, priceType, value, giveType=ChConfig.Def_GiveMoney_Unknown, addDataDict={}, isSysHint=True, isGiveBourseMoney=True):
|
| | | def GiveMoney(curPlayer, priceType, value, giveType=ChConfig.Def_GiveMoney_Unknown, addDataDict={}, isSysHint=True, isGiveBourseMoney=True, notifyAward=False):
|
| | | if value == 0:
|
| | | return True
|
| | |
|
| | |
| | | # NotifyCode(curPlayer, "GetMoney", [priceType, str(round(value/100.0, 2))])
|
| | | # else:
|
| | | # NotifyCode(curPlayer, "GetMoney", [priceType, value])
|
| | | if notifyAward:
|
| | | ItemControler.NotifyGiveAwardInfo(curPlayer, [], giveType, moneyInfo={priceType:value})
|
| | | |
| | | __GiveMoneyAfter(curPlayer, priceType, value, giveType, addDataDict)
|
| | |
|
| | | if befMoney == 0:
|
| | |
| | | if actExpIpyData and curPlayer.GetLV() >= actExpIpyData.GetLVLimit():
|
| | | fightExpRate += actExpIpyData.GetAddExpRate()
|
| | |
|
| | | if curPlayer.GetMapID() not in [ChConfig.Def_FBMapID_FamilyInvade]: #守卫人皇不加组队加成
|
| | | fightExpRate += curPlayer.GetDictByKey(ChConfig.Def_PlayerKey_TeamExpRate) # 组队
|
| | | #if curPlayer.GetMapID() not in [ChConfig.Def_FBMapID_FamilyInvade]: #守卫人皇不加组队加成
|
| | | # fightExpRate += curPlayer.GetDictByKey(ChConfig.Def_PlayerKey_TeamExpRate) # 组队
|
| | |
|
| | | #地图多倍经验加成,默认是1倍不加成
|
| | | mapExpAddMultiple = max(0, FBCommon.GetAreaRewardMultiple(curPlayer) - 1)
|
| | | mapExpAddMultiple = 0
|
| | | fightExpRate += mapExpAddMultiple * ChConfig.Def_MaxRateValue
|
| | |
|
| | | if totalExpRate != fightExpRate:
|
| | |
| | | value = ComMainLevelValue(chapterID, levelNum, wave)
|
| | | SetMainLevelPassValue(curPlayer, value)
|
| | | if wave == 0:
|
| | | lvID = chapterID * 100 + levelNum
|
| | | PlayerBillboard.UpdatePlayerBillboard(curPlayer, ShareDefine.Def_BT_MainLevel, lvID)
|
| | | PlayerTask.UpdTaskValue(curPlayer, ChConfig.TaskType_MainLevel)
|
| | | return value
|
| | | def GetMainLevelPassInfo(curPlayer):
|
| | |
| | | curPlayer.SetExAttr5(value, False, True)
|
| | | if not value:
|
| | | CrossPlayerData.ClearCrossSyncDataCache(curPlayer)
|
| | | return
|
| | |
|
| | | ## 前端自定义场景
|
| | | def GetCustomMapID(curPlayer): return curPlayer.GetExAttr14() / 1000
|
| | | def GetCustomLineID(curPlayer): return curPlayer.GetExAttr14() % 1000
|
| | | ## 自定义场景后端判断已结算后需直接重置为0,防止前端没有退出场景直接下线导致数据没有重置,可能引发可以重复进
|
| | | def SetCustomMap(curPlayer, mapID, lineID):
|
| | | value = mapID * 1000 + lineID
|
| | | if value != curPlayer.GetExAttr14():
|
| | | curPlayer.SetExAttr14(value, False, True)
|
| | | return
|
| | |
|
| | | ## 铜钱点, 支持铜钱超20亿
|
| | |
| | | NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_FightPower_HighestEx, highestFightPower / ChConfig.Def_PerPointValue)
|
| | |
|
| | | GameWorld.DebugLog("总战力: %s, 历史最高战力: %s, beforeFightPower=%s" % (value, highestFightPower, beforeFightPower), curPlayer.GetPlayerID())
|
| | | PlayerBillboard.UpdatePlayerFPTotalBillboard(curPlayer)
|
| | | #PlayerBillboard.UpdatePlayerFPTotalBillboard(curPlayer)
|
| | | # 记录开服活动数据
|
| | | #OpenServerCampaign.UpdOpenServerCampaignRecordData(curPlayer, ShareDefine.Def_Campaign_Type_FightPower, totalFightPower)
|
| | | #if beforeFightPower != totalFightPower:
|