ManaPlus
Public Member Functions | Data Fields
SkillData Struct Reference

#include <skilldata.h>

Public Member Functions

 SkillData ()
 
 ~SkillData ()
 
void setIcon (const std::string &iconPath)
 

Data Fields

std::string name
 
std::string shortName
 
std::string dispName
 
std::string description
 
MissileInfo missile
 
MissileInfo castingMissile
 
std::string invokeCmd
 
std::string castingAnimation
 
SoundInfo soundHit
 
SoundInfo soundMiss
 
Imageicon
 
int updateEffectId
 
int removeEffectId
 
int hitEffectId
 
int missEffectId
 
int castingSrcEffectId
 
int castingDstEffectId
 
int castingGroundEffectId
 
int srcEffectId
 
int dstEffectId
 
bool haveIcon
 
bool autoTab
 

Detailed Description

Definition at line 32 of file skilldata.h.

Constructor & Destructor Documentation

◆ SkillData()

SkillData::SkillData ( )

Definition at line 36 of file skilldata.cpp.

36  :
37  name(),
38  shortName(),
39  dispName(),
40  description(),
41  missile(),
43  invokeCmd(),
45  soundHit(std::string(), 0),
46  soundMiss(std::string(), 0),
47  icon(nullptr),
48  updateEffectId(-1),
49  removeEffectId(-1),
50  hitEffectId(-1),
51  missEffectId(-1),
55  srcEffectId(-1),
56  dstEffectId(-1),
57  haveIcon(false),
58  autoTab(true)
59 {
60 }
int castingGroundEffectId
Definition: skilldata.h:55
std::string castingAnimation
Definition: skilldata.h:42
MissileInfo missile
Definition: skilldata.h:39
std::string dispName
Definition: skilldata.h:36
int hitEffectId
Definition: skilldata.h:51
int castingSrcEffectId
Definition: skilldata.h:53
SoundInfo soundMiss
Definition: skilldata.h:45
MissileInfo castingMissile
Definition: skilldata.h:40
std::string invokeCmd
Definition: skilldata.h:41
std::string name
Definition: skilldata.h:34
int srcEffectId
Definition: skilldata.h:56
std::string description
Definition: skilldata.h:37
int removeEffectId
Definition: skilldata.h:50
int missEffectId
Definition: skilldata.h:52
int updateEffectId
Definition: skilldata.h:49
int castingDstEffectId
Definition: skilldata.h:54
Image * icon
Definition: skilldata.h:47
bool haveIcon
Definition: skilldata.h:58
int dstEffectId
Definition: skilldata.h:57
std::string shortName
Definition: skilldata.h:35
SoundInfo soundHit
Definition: skilldata.h:44
bool autoTab
Definition: skilldata.h:59

◆ ~SkillData()

SkillData::~SkillData ( )

Definition at line 62 of file skilldata.cpp.

63 {
64  if (icon != nullptr)
65  {
66  icon->decRef();
67  icon = nullptr;
68  }
69 }

References icon.

Member Function Documentation

◆ setIcon()

void SkillData::setIcon ( const std::string &  iconPath)

Definition at line 71 of file skilldata.cpp.

72 {
73  if (!iconPath.empty())
74  icon = Loader::getImage(iconPath);
75 
76  if (icon == nullptr)
77  {
79  paths.getStringValue("unknownItemFile"));
80  }
81 }
std::string getStringValue(const std::string &key) const
static Image * getImageFromTheme(const std::string &path)
Definition: theme.cpp:655
Configuration paths
Image * getImage(const std::string &idPath)
Definition: imageloader.cpp:86

References Loader::getImage(), Theme::getImageFromTheme(), Configuration::getStringValue(), icon, and paths.

Field Documentation

◆ autoTab

bool SkillData::autoTab

Definition at line 59 of file skilldata.h.

◆ castingAnimation

std::string SkillData::castingAnimation

Definition at line 42 of file skilldata.h.

◆ castingDstEffectId

int SkillData::castingDstEffectId

Definition at line 54 of file skilldata.h.

◆ castingGroundEffectId

int SkillData::castingGroundEffectId

Definition at line 55 of file skilldata.h.

◆ castingMissile

MissileInfo SkillData::castingMissile

Definition at line 40 of file skilldata.h.

◆ castingSrcEffectId

int SkillData::castingSrcEffectId

Definition at line 53 of file skilldata.h.

◆ description

std::string SkillData::description

Definition at line 37 of file skilldata.h.

◆ dispName

std::string SkillData::dispName

Definition at line 36 of file skilldata.h.

◆ dstEffectId

int SkillData::dstEffectId

Definition at line 57 of file skilldata.h.

◆ haveIcon

bool SkillData::haveIcon

Definition at line 58 of file skilldata.h.

◆ hitEffectId

int SkillData::hitEffectId

Definition at line 51 of file skilldata.h.

◆ icon

Image* SkillData::icon

Definition at line 47 of file skilldata.h.

Referenced by setIcon(), and ~SkillData().

◆ invokeCmd

std::string SkillData::invokeCmd

Definition at line 41 of file skilldata.h.

◆ missEffectId

int SkillData::missEffectId

Definition at line 52 of file skilldata.h.

◆ missile

MissileInfo SkillData::missile

Definition at line 39 of file skilldata.h.

◆ name

std::string SkillData::name

Definition at line 34 of file skilldata.h.

◆ removeEffectId

int SkillData::removeEffectId

Definition at line 50 of file skilldata.h.

◆ shortName

std::string SkillData::shortName

Definition at line 35 of file skilldata.h.

◆ soundHit

SoundInfo SkillData::soundHit

Definition at line 44 of file skilldata.h.

◆ soundMiss

SoundInfo SkillData::soundMiss

Definition at line 45 of file skilldata.h.

◆ srcEffectId

int SkillData::srcEffectId

Definition at line 56 of file skilldata.h.

◆ updateEffectId

int SkillData::updateEffectId

Definition at line 49 of file skilldata.h.


The documentation for this struct was generated from the following files: