2
/// Defines a source unit.
4
#ifndef SWTOR_PARSER_LOGUNIT_H
5
#define SWTOR_PARSER_LOGUNIT_H
10
#include "parser/LogAbility.h"
20
UNIT_TYPE_COMPANION = 2,
27
/// Default constructor.
28
/// @param name The unit name.
29
/// @param type The unit type.
30
LogUnit(std::string name, LogUnitType type);
31
/// Default deconstructor.
33
/// Gets the unit name.
34
/// @return The unit name.
35
std::string GetName();
36
/// Gets the unit type.
37
/// @return The unit type.
38
LogUnitType GetType();
39
/// Adds a new ability to the vector.
40
/// @param name The ability name.
41
void AddAbility(std::string name);
42
/// Gets all abilities.
43
/// @return Vector containing the used abilities.
44
std::vector<LogAbility*> GetAbilities();
45
/// Gets one ability by ID.
47
/// @return The LogAbility if found, NULL otherwise.
48
LogAbility *GetAbilityByID(int id);
49
/// Gets one ability by name.
50
/// @param name The ability name.
51
/// @return The LogAbility if found, NULL otherwise.
52
LogAbility *GetAbilityByName(std::string name);
53
/// Gets the total value from all abilities.
54
/// @param type The hit type.
55
/// @return Integer with the total value of all abilities.
56
int GetTotalValue(LogHitType type);
57
/// Gets the total threat from all abilities.
58
/// @param type The hit type.
59
/// @return Integer with the total threat of all abilities.
60
int GetTotalThreat(LogHitType type);
62
std::string m_name; ///< The unit name.
63
LogUnitType m_type; ///< The unit type.
64
std::vector<LogAbility*> m_abilities; ///< Vector containing the used abilities.