コード例 #1
0
ファイル: hitLog.py プロジェクト: NikolayXHD/xvmconfig
 def __init__(self, section):
     self.section = section
     self.listLog = []
     self.players = {}
     self.countLines = 0
     self.maxCountLines = None
     self.isAddToEnd = False
     self.S_LINES = section + LINES
     self.S_ADD_TO_END = section + ADD_TO_END
     self.S_FORMAT_HISTORY = section + FORMAT_HISTORY
     self.ATTACK_REASON_FIRE_ID = ATTACK_REASON.getIndex(ATTACK_REASON.FIRE)
     self.ATTACK_REASON_RAM_ID = ATTACK_REASON.getIndex(ATTACK_REASON.RAM)
     self.attackReasonID = 0
     self.damage = 0
     self.damageRatio = 0
     self.isGroup = False
     self.vehID = 0
     self.hitLogConfig = {}
コード例 #2
0
 def __onVehicleKilled(self, targetID, attackerID, equipmentID, reason,
                       numVehiclesAffected):
     targetVeh = BigWorld.entity(targetID)
     playerVehID = BigWorld.player().playerVehicleID
     if targetVeh is not None and targetVeh.masterVehID == playerVehID and targetVeh.typeDescriptor.name == self.__KAMIKAZE_VEH_NAME:
         if attackerID == playerVehID and numVehiclesAffected > 0 and reason == ATTACK_REASON.getIndex(
                 ATTACK_REASON.SPAWNED_BOT_EXPLOSION):
             BREvents.playSound(BREvents.KAMIKAZE_HITS_TARGET)
         else:
             BREvents.playSound(BREvents.KAMIKAZE_TARGET_LOST)
     return
コード例 #3
0
 def getAttackReasonIdx(self):
     return _getNodeValue(self._data,
                          'attackReason',
                          default=ATTACK_REASON.getIndex(
                              ATTACK_REASON.SHOT))
コード例 #4
0
 def isBattleAbilityConsumable(self):
     return self.__attackReasonID in (ATTACK_REASON.getIndex(ATTACK_REASON.ARTILLERY_EQ), ATTACK_REASON.getIndex(ATTACK_REASON.BOMBER_EQ))