def getLoogedEfficiency(self, types): """ Returns logged efficiency by the given type mask. :param types: damage types represented by bit mask (see PERSONAL_EFFICIENCY_TYPE) :return: list of _DamageInfo objects """ return [ d for d in reversed(self.__efficiencyLog) if BitmaskHelper.hasAnyBitSet(types, d.getType()) ]
def _onEfficiencyReceived(self, events): if self.__logViewMode == _DETAILS_LOG_VIEW_MODE.HIDE: return for e in events: if BitmaskHelper.hasAnyBitSet(self.__contentMask, e.getType()): vo = self._buildLogMessageVO(e) self.as_addDetailMessageS(**vo)
def addToLog(self, events): if self.__logViewMode == _VIEW_MODE.HIDE: return for e in events: if BitmaskHelper.hasAnyBitSet(self.__contentMask, e.getType()): vo = self._buildLogMessageVO(e) self.__addToListProxy(**vo)
def _setTotalValue(self, etype, value): if BitmaskHelper.hasAnyBitSet(self.__totalDamageContentMask, etype): value = _formatTotalValue(value) else: value = None if value != self.__totalValues[etype]: self.__totalValues[etype] = value return (True, value) else: return (False, value)
def _setTotalValue(self, etype, value): """ Sets total value with the given efficiency type, taking into account user's preferences. :param etype: Efficiency type, see PERSONAL_EFFICIENCY_TYPE :param value: New value :return: tuple(bool, value), where bool - whether value is changed, v value - formatted value """ if BitmaskHelper.hasAnyBitSet(self.__totalDamageContentMask, etype): value = _formatTotalValue(value) else: value = None if value != self.__totalValues[etype]: self.__totalValues[etype] = value return (True, value) else: return (False, value)
def __formatTotalDamage(self, etype, value): if BitmaskHelper.hasAnyBitSet(self.__contentMask, etype): return _summaryDamageFormatter(value) else: return None
def getLoogedEfficiency(self, types): return [ d for d in reversed(self.__efficiencyLog) if BitmaskHelper.hasAnyBitSet(types, d.getType()) ]
def isHighExplosive(self): return BitmaskHelper.hasAnyBitSet(self.__hitFlags, HIT_FLAGS.IS_HIGH_EXPLOSIVE)
def isCritical(self): return BitmaskHelper.hasAnyBitSet(self.__hitFlags, HIT_FLAGS.IS_CRITICAL)
def isBlocked(self): return BitmaskHelper.hasAnyBitSet(self.__hitFlags, HIT_FLAGS.IS_BLOCKED)
def isAttackerAlly(self): return BitmaskHelper.hasAnyBitSet(self.__hitFlags, HIT_FLAGS.IS_ALLAY)
def isBattleConsumables(self): return BitmaskHelper.hasAnyBitSet(self.__hitFlags, HIT_FLAGS.IS_BATTLE_CONSUMABLES)
def isNonPlayerAttackReason(self): return BitmaskHelper.hasAnyBitSet(self.__hitFlags, HIT_FLAGS.IS_NON_PLAYER_ATTACK_REASON)