| | |
| | | return
|
| | | self.__assistAwardItemID = liheItemID
|
| | |
|
| | | fbType = GameWorld.GetMap().GetMapFBTypeByMapID(mapID)
|
| | | friendAddAssistMoneyPer = IpyGameDataPY.GetFuncCfg("AssistAward", 3)
|
| | | GameWorld.DebugLog("执行协助奖励逻辑", self.npcID, self.lineID)
|
| | | copyPlayerManager = GameWorld.GetMapCopyPlayerManager()
|
| | |
| | | addAssistMoney += int(assistMoney * friendAddAssistMoneyPer / 100.0)
|
| | | GameWorld.DebugLog("协助方给活跃令奖励: assistPlayerID=%s,assistMoney=%s,isFriend=%s,addAssistMoney=%s"
|
| | | % (assistPlayerID, assistMoney, isFriend, addAssistMoney), self.npcID, self.lineID)
|
| | | PlayerControl.GiveMoney(assistPlayer, ShareDefine.TYPE_Price_XianyuanCoin, addAssistMoney) # 给活跃令无视发布方是否在线
|
| | | PlayerControl.GiveMoney(assistPlayer, ShareDefine.TYPE_Price_FamilyActivity, addAssistMoney) # 给活跃令无视发布方是否在线
|
| | | if fbType == IPY_GameWorld.fbtNull:
|
| | | PlayerControl.NotifyCode(assistPlayer, "AssistSuccess")
|
| | | else:
|
| | | overDict = {FBCommon.Over_isAssist:1, FBCommon.Over_money:FBCommon.GetJsonMoneyList({ShareDefine.TYPE_Price_FamilyActivity:addAssistMoney}),
|
| | | FBCommon.Over_itemInfo:[]}
|
| | | FBCommon.NotifyFBOver(assistPlayer, mapID, PlayerControl.GetFBFuncLineID(assistPlayer), 1, overDict)
|
| | |
|
| | | if noAssistPlayer:
|
| | | todayGiftCount = assistPlayer.NomalDictGetProperty(ChConfig.Def_PDict_GetThanksGiftCount % liheItemID)
|
| | |
| | | if key not in PyGameData.g_npcHurtDict:
|
| | | ## 只统计最大伤血归属的boss
|
| | | npcData = GameWorld.GetGameData().FindNPCDataByID(npcID)
|
| | | if not npcData:
|
| | | if not npcData or not ChConfig.IsGameBoss(npcData):
|
| | | return defendHurtList
|
| | | if not npcData.GetIsBoss() or NPCCommon.GetDropOwnerType(npcData) != ChConfig.DropOwnerType_MaxHurt:
|
| | | if NPCCommon.GetDropOwnerType(npcData) != ChConfig.DropOwnerType_MaxHurt:
|
| | | mapID = GameWorld.GetMap().GetMapID()
|
| | | if mapID not in [ChConfig.Def_FBMapID_SealDemon]:
|
| | | return defendHurtList
|
| | | defendHurtList = PlayerHurtList(lineID, objID, npcID)
|
| | | PyGameData.g_npcHurtDict[key] = defendHurtList
|
| | |
| | | return False
|
| | | return defendHurtList.IsAssistPlayer(playerID)
|
| | |
|
| | | def CheckPlayerCanAttackFBNPC(curPlayer, curNPC, mapID, isNotify=False):
|
| | | ## 检查玩家可否攻击有副本次数的NPC
|
| | | enterCnt = curPlayer.NomalDictGetProperty(ChConfig.Def_Player_Dict_EnterFbCntDay % mapID)
|
| | | if enterCnt < FBCommon.GetEnterFBMaxCnt(curPlayer, mapID):
|
| | | return True
|
| | | |
| | | # 没有次数的,如果是助战玩家也可攻击
|
| | | if IsAssistPlayer(curPlayer.GetPlayerID(), curNPC):
|
| | | return True
|
| | | |
| | | if isNotify:
|
| | | PlayerControl.NotifyCode(curPlayer, "AttackFBBossLimit")
|
| | | |
| | | return False
|
| | |
|