예제 #1
0
def region_healers(conn, combat, timeline, region_list, options):
    toon_dict = armoryutils.sqlite_scrapeCharacters(options.armorydb_path, [], options.realm_str, options.region_str)
    color_dict = armoryutils.classColors()
    
    for healer_str, healer_int in sorted(combat['healer_list']):
        graph_list = []
        graph_list.append(Graph([('vbar', color_dict[toon_dict[healer_str]['class']][2])],
                lambda timeline, index: timeline.getEventData(index, 'count(*)', suffix=('_CAST_START', '_CAST_SUCCESS'), sourceName=healer_str).fetchone()[0] != 0,
                smoothing=None))
        region_list.append(Region(timeline, ("%s: %s" % (healer_str, healer_int)), graph_list, len(timeline), 15, region_list[-1], 'under'))

        graph_list = []
        graph_list.append(AuraGraph(combat, "Mark of the Faceless", "MotF", True, destType='PC', destName=healer_str))
        region_list.append(Region(timeline, "Auras", graph_list, len(timeline), 15, region_list[-1], 'under'))

        graph_list = []
        graph_list.append(Graph([('upbar', css('heal_pc_inst'))],
                lambda timeline, index: timeline.getEventData(index, 'sum(amount) - sum(extra)', suffix='_HEAL', destType='PC', sourceType='PC', sourceName=healer_str).fetchone()[0] or 0,
                smoothing=None))
        region_list.append(Region(timeline, "  Healing", graph_list, len(timeline), 0.005, region_list[-1], 'under'))

        graph_list = []
        graph_list.append(Graph([('downbar', css('overheal_pc_inst'))],
                lambda timeline, index: timeline.getEventData(index, 'sum(extra)', suffix='_HEAL', destType='PC', sourceType='PC', sourceName=healer_str).fetchone()[0] or 0,
                smoothing=None))
        region_list.append(Region(timeline, "  Overhealing", graph_list, len(timeline), 0.005, region_list[-1], 'under', True))
예제 #2
0
 def render(self, draw, region):
     start_dt = region.timeline.start_dt
     
     color_dict = armoryutils.classColors()
     
     index = 0
     for death in conn_execute(region.timeline.conn, '''select time, destName from event where time >= ? and time <= ? and eventType = ? and destType = ? and fakeDeath = ? order by time''',
                                  (region.timeline.start_dt, region.timeline.end_dt, 'UNIT_DIED', 'PC', 0)).fetchall():
         while not region.timeline.containsTime(death['time'], index):
             index += 1
             
         draw.line([(index + region.getLeft(), 10000), (index + region.getLeft(), 0)], fill=color_dict[self.char_dict[death['destName']]['class']][2])
예제 #3
0
def region_dps(conn, combat, timeline, region_list, options):
    toon_dict = armoryutils.sqlite_scrapeCharacters(options.armorydb_path, [], options.realm_str, options.region_str)
    color_dict = armoryutils.classColors()
    
    for dps_str, dps_int in combat['dps_list']:
        graph_list = []
        graph_list.append(Graph([('vbar', color_dict[toon_dict[dps_str]['class']][2])],
                lambda timeline, index: timeline.getEventData(index, 'count(*)', suffix=('_CAST_START', '_CAST_SUCCESS'), sourceName=dps_str).fetchone()[0] != 0,
                smoothing=None))
        region_list.append(Region(timeline, ("%s: %s" % (dps_str, dps_int)), graph_list, len(timeline), 15, region_list[-1], 'under'))

        graph_list = []
        graph_list.append(AuraGraph(combat, "Mark of the Faceless", "MotF", True, destType='PC', destName=dps_str))
        region_list.append(Region(timeline, "Auras", graph_list, len(timeline), 15, region_list[-1], 'under'))

        graph_list = []
        graph_list.append(Graph([('upbar', css('dps_boss_bar')), ('upline', css('dps_boss_trend'))],
                lambda timeline, index: timeline.getEventData(index, 'sum(amount) - sum(extra)', suffix='_DAMAGE', sourceType=('PC','Pet'), destType=('NPC','Mount'), sourceName=dps_str, \
                                                              destName=tuple(instanceData()[combat['instance']][combat['encounter']]['boss'])).fetchone()[0] or 0,
                smoothing=[3,3,3,5]))
        graph_list.append(Graph([('upbar', css('dps_trash_bar')), ('upline', css('dps_trash_trend'))],
                lambda timeline, index: timeline.getEventData(index, 'sum(amount) - sum(extra)', suffix='_DAMAGE', sourceType=('PC','Pet'), destType=('NPC','Mount'), sourceName=dps_str).fetchone()[0] or 0,
                smoothing=[3,3,3,5]))
        region_list.append(Region(timeline, "  Damage", graph_list, len(timeline), 0.005, region_list[-1], 'under', True))