| | |
| | |
|
| | | ##----------------------------------------- 归属 -----------------------------------------------
|
| | |
|
| | | def RefreshDropOwner(self, tick, refreshInterval=3000, isDead=False):
|
| | | def RefreshDropOwner(self, tick, refreshInterval=3000, isDead=False, checkCanDead=False):
|
| | | ## 刷新boss掉落归属
|
| | | # @return: 可攻击的掉落归属目标玩家
|
| | |
|
| | |
| | | if isDead:
|
| | | GameWorld.Log("Boss死亡: lineID=%s,objID=%s,npcID=%s,dropOwnerType=%s"
|
| | | % (GameWorld.GetGameWorld().GetLineID(), curNPC.GetID(), curNPC.GetNPCID(), dropOwnerType))
|
| | | if checkCanDead:
|
| | | GameWorld.Log("检查Boss死亡: lineID=%s,objID=%s,npcID=%s,dropOwnerType=%s" |
| | | % (GameWorld.GetGameWorld().GetLineID(), curNPC.GetID(), curNPC.GetNPCID(), dropOwnerType))
|
| | | #if dropOwnerType == ChConfig.DropOwnerType_MaxHurt:
|
| | | maxHurtInfo = NPCHurtManager.RefreshHurtList(curNPC, tick, refreshInterval, isDead)
|
| | | maxHurtInfo = NPCHurtManager.RefreshHurtList(curNPC, tick, refreshInterval, isDead, checkCanDead)
|
| | | if not maxHurtInfo:
|
| | | maxHurtInfo = NPCHurtMgr.RefreshHurtList(curNPC, tick, refreshInterval, isDead)
|
| | |
|
| | |
| | | if tagObj:
|
| | | ownerType, ownerID = ChConfig.Def_NPCHurtTypePlayer, tagObj.GetPlayerID()
|
| | |
|
| | | if isDead:
|
| | | if isDead or checkCanDead:
|
| | | GameWorld.Log("ownerType=%s, ownerID=%s, tagObjID=%s" % (ownerType, ownerID, 0 if not tagObj else tagObj.GetPlayerID()))
|
| | |
|
| | | # 没有攻击目标,则刷新仇恨,支持主动怪
|
| | |
| | | angryObjType = maxAngry.GetObjType()
|
| | | #GameWorld.DebugLog("最大仇恨目标: ID=%s, Type=%s" % (angryID, angryObjType))
|
| | | maxAngryObj = GameWorld.GetObj(angryID, angryObjType)
|
| | | if isDead or checkCanDead:
|
| | | GameWorld.Log("最大仇恨目标: ID=%s, Type=%s,maxAngryObj=%s" % (angryID, angryObjType, maxAngryObj))
|
| | |
|
| | | tagObj = maxAngryObj
|
| | | if angryObjType == IPY_GameWorld.gotPlayer and maxAngryObj and not ownerType:
|
| | |
| | | else:
|
| | | ownerType, ownerID = ChConfig.Def_NPCHurtTypePlayer, maxAngryObj.GetPlayerID()
|
| | |
|
| | | if isDead:
|
| | | if isDead or checkCanDead:
|
| | | GameWorld.Log("angryObj, ownerType=%s, ownerID=%s" % (ownerType, ownerID))
|
| | |
|
| | | self.UpdateDropOwner(tick, ownerType, ownerID, isDead)
|