| | |
| | | import IPY_GameWorld
|
| | | import IpyGameDataPY
|
| | | import PlayerBossReborn
|
| | | import PlayerActHorsePetFeast
|
| | | import ChPyNetSendPack
|
| | | import NetPackCommon
|
| | | import ShareDefine
|
| | |
| | | #GameWorld.DebugLog(" hurtID=%s,hurtType=%s,updValue=%s (%s + %s), playerID=%s,updHurtPlayerValue=%s"
|
| | | # % (hurtID, hurtType, updValue, befValue, addValue, playerID, updHurtPlayerValue), self.npcID, self.lineID)
|
| | | if isNewHurt:
|
| | | self.__Sort()
|
| | | self.Sort()
|
| | |
|
| | | return isNewHurt
|
| | |
|
| | |
| | | return 0
|
| | | return -1
|
| | |
|
| | | def __Sort(self):
|
| | | def Sort(self):
|
| | | ## 伤血排序
|
| | | self.__hurtSortList = sorted(self.__hurtDict.values(), cmp=self.__CmpHurtValue, reverse=True)
|
| | | return
|
| | |
| | | hurtValueObj.HurtValue = hurtValue % ShareDefine.Def_PerPointValue
|
| | | hurtValueObj.HurtValueEx = hurtValue / ShareDefine.Def_PerPointValue
|
| | | hurtValueList.append(hurtValueObj)
|
| | | if len(hurtValueList) > 250:
|
| | | break
|
| | |
|
| | | if not syncPlayerIDList:
|
| | | return
|
| | |
| | | self.checkHurtValidFunc()
|
| | |
|
| | | # 2. 排序
|
| | | self.__Sort()
|
| | | self.Sort()
|
| | |
|
| | | # 3. 同步前端
|
| | | self.__SyncHurtList()
|
| | |
| | | '''第一个可攻击的最大伤血对象
|
| | | @return: atkPlayer, hurtType, hurtID
|
| | | '''
|
| | | |
| | | import AttackCommon
|
| | | atkPlayer, atkHurtType, atkHurtID = None, 0, 0
|
| | | curNPC = self.curNPC
|
| | | refreshPoint = curNPC.GetRefreshPosAt(curNPC.GetCurRefreshPointIndex())
|
| | |
| | | playerDisableReason[playerID] = "dead"
|
| | | continue
|
| | |
|
| | | if not player.GetVisible() or player.GetSightLevel() != curNPC.GetSightLevel():
|
| | | if not player.GetVisible() or not AttackCommon.CheckSightLevel(player, curNPC):
|
| | | playerDisableReason[playerID] = "no visible or sightLevel different"
|
| | | continue
|
| | |
|
| | |
| | | if self.npcID == IpyGameDataPY.GetFuncCfg("BossRebornServerBoss", 3):
|
| | | PlayerBossReborn.DoBossRebornActionBossOnKilledLogic(self)
|
| | |
|
| | | PlayerActHorsePetFeast.DoActBossOnKilledLogic(self)
|
| | | |
| | | ## 同样榜单逻辑的不同功能奖励处理 ...
|
| | |
|
| | | return
|