Skip to content
Permalink
Browse files

Server/Entities: Fix Glyph Slots.

Signed-off-by: AriDEV <aridev666@gmail.com>
  • Loading branch information...
AriDEV committed Jul 6, 2019
1 parent b932f5f commit bf0760da391fd9757c6d88f1660560c869c49861
Showing with 27 additions and 4 deletions.
  1. +26 −3 src/server/game/Entities/Player/Player.h
  2. +1 −1 src/server/game/Globals/ObjectMgr.h
@@ -1259,13 +1259,36 @@ class KillRewarder
struct PlayerTalentInfo
{
PlayerTalentInfo() : UsedTalentCount(0), ResetTalentsCost(0), ResetTalentsTime(0),
ResetSpecializationCost(0), ResetSpecializationTime(0), ActiveSpec(0), SpecsCount(1) { }
ResetSpecializationCost(0), ResetSpecializationTime(0), ActiveSpec(0), SpecsCount(1)
{
for (uint8 i = 0; i < MAX_TALENT_SPECS; ++i)
{
SpecInfo[i].Talents = new PlayerTalentMap();
SpecInfo[i].TalentTree = 0;
SpecInfo[i].SpecializationId = 0;
}
}

~PlayerTalentInfo() { }
~PlayerTalentInfo()
{
for (uint8 i = 0; i < MAX_TALENT_SPECS; ++i)
{
for (PlayerTalentMap::const_iterator itr = SpecInfo[i].Talents->begin(); itr != SpecInfo[i].Talents->end(); ++itr)
delete itr->second;
delete SpecInfo[i].Talents;
}
}

struct TalentSpecInfo
{
TalentSpecInfo() : Talents(nullptr), TalentTree(0), SpecializationId(0) { }
TalentSpecInfo() : Talents(NULL), TalentTree(0), SpecializationId(0)
{
for (uint8 i = 0; i < MAX_GLYPH_SLOT_INDEX; ++i)
{
Glyphs[i] = 0;
}
}

~TalentSpecInfo() { }

PlayerTalentMap* Talents;
@@ -459,7 +459,7 @@ typedef std::pair<QuestRelations::const_iterator, QuestRelations::const_iterator

struct PetLevelInfo
{
PetLevelInfo() : health(0), mana(0), armor(0) { }
PetLevelInfo() : health(0), mana(0), armor(0) { for (uint8 i = 0; i < MAX_STATS; ++i) stats[i] = 0; }

uint16 stats[MAX_STATS] = { };
uint16 health;

0 comments on commit bf0760d

Please sign in to comment.
You can’t perform that action at this time.