Skip to content

Commit

Permalink
Remove duplicated code block from TrainerSpell.
Browse files Browse the repository at this point in the history
  • Loading branch information
evil-at-wow committed May 29, 2023
1 parent 6516f8e commit e73d71a
Showing 1 changed file with 0 additions and 19 deletions.
19 changes: 0 additions & 19 deletions src/game/Entities/Creature.h
Original file line number Diff line number Diff line change
Expand Up @@ -432,24 +432,6 @@ typedef std::list<VendorItemCount> VendorItemCounts;

struct TrainerSpell
{
#ifdef BUILD_PLAYERBOT
TrainerSpell() : spell(0), spellCost(0), reqSkill(0), reqSkillValue(0), reqLevel(0), learnedSpell(0), isProvidedReqLevel(false), conditionId(0) {}

TrainerSpell(uint32 _spell, uint32 _spellCost, uint32 _reqSkill, uint32 _reqSkillValue, uint32 _reqLevel, uint32 _learnedspell, bool _isProvidedReqLevel, uint32 _conditionId)
: spell(_spell), spellCost(_spellCost), reqSkill(_reqSkill), reqSkillValue(_reqSkillValue), reqLevel(_reqLevel), learnedSpell(_learnedspell), isProvidedReqLevel(_isProvidedReqLevel), conditionId(_conditionId) {}

uint32 spell;
uint32 spellCost;
uint32 reqSkill;
uint32 reqSkillValue;
uint32 reqLevel;
uint32 learnedSpell;
uint32 conditionId;
bool isProvidedReqLevel;

// helpers
bool IsCastable() const { return learnedSpell != spell; }
#else
TrainerSpell() : spell(0), spellCost(0), reqSkill(0), reqSkillValue(0), reqLevel(0), learnedSpell(0), conditionId(0), isProvidedReqLevel(false) {}

TrainerSpell(uint32 _spell, uint32 _spellCost, uint32 _reqSkill, uint32 _reqSkillValue, uint32 _reqLevel, uint32 _learnedspell, bool _isProvidedReqLevel, uint32 _conditionId)
Expand All @@ -466,7 +448,6 @@ struct TrainerSpell

// helpers
bool IsCastable() const { return learnedSpell != spell; }
#endif
};

typedef std::unordered_map < uint32 /*spellid*/, TrainerSpell > TrainerSpellMap;
Expand Down

0 comments on commit e73d71a

Please sign in to comment.