Skip to content
This repository has been archived by the owner on Feb 29, 2024. It is now read-only.

Commit

Permalink
Refactor Multiple Classes
Browse files Browse the repository at this point in the history
isInRoots to IsRooted
GetMountID to GetMountDisplayId
getGender to GetGender
getRace to GetRace
getClass to GetClass
getRaceMask to GetRaceMask
getClassMask to GetClassMask
getLevel to GetLevel
setRegeneratingHealth to SetRegenerateHealth
Upstream project renames
  • Loading branch information
Niam5 committed Dec 22, 2023
1 parent 2752faf commit 82e311d
Show file tree
Hide file tree
Showing 107 changed files with 614 additions and 614 deletions.
6 changes: 3 additions & 3 deletions src/server/game/AI/PlayerAI/PlayerAI.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -467,7 +467,7 @@ bool PlayerAI::IsPlayerHealer(Player const* who)
if (!who)
return false;

switch (who->getClass())
switch (who->GetClass())
{
case CLASS_WARRIOR:
case CLASS_HUNTER:
Expand All @@ -493,7 +493,7 @@ bool PlayerAI::IsPlayerRangedAttacker(Player const* who)
if (!who)
return false;

switch (who->getClass())
switch (who->GetClass())
{
case CLASS_WARRIOR:
case CLASS_PALADIN:
Expand Down Expand Up @@ -748,7 +748,7 @@ PlayerAI::TargetedSpell SimpleCharmedPlayerAI::SelectAppropriateCastForSpec()
{
PossibleSpellVector spells;

switch (me->getClass())
switch (me->GetClass())
{
case CLASS_WARRIOR:
if (!me->IsWithinMeleeRange(me->GetVictim()))
Expand Down
6 changes: 3 additions & 3 deletions src/server/game/AI/SmartScripts/SmartScript.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -838,7 +838,7 @@ void SmartScript::ProcessAction(SmartScriptHolder& e, Unit* unit, uint32 var0, u

if (e.action.fleeAssist.withEmote)
{
Trinity::BroadcastTextBuilder builder(me, CHAT_MSG_MONSTER_EMOTE, BROADCAST_TEXT_FLEE_FOR_ASSIST, me->getGender());
Trinity::BroadcastTextBuilder builder(me, CHAT_MSG_MONSTER_EMOTE, BROADCAST_TEXT_FLEE_FOR_ASSIST, me->GetGender());
sCreatureTextMgr->SendChatPacket(me, builder, CHAT_MSG_MONSTER_EMOTE);
}
TC_LOG_DEBUG("scripts.ai", "SmartScript::ProcessAction:: SMART_ACTION_FLEE_FOR_ASSIST: Creature %u DoFleeToGetAssistance", me->GetGUID().GetCounter());
Expand Down Expand Up @@ -1072,7 +1072,7 @@ void SmartScript::ProcessAction(SmartScriptHolder& e, Unit* unit, uint32 var0, u
me->CallForHelp(float(e.action.callHelp.range));
if (e.action.callHelp.withEmote)
{
Trinity::BroadcastTextBuilder builder(me, CHAT_MSG_MONSTER_EMOTE, BROADCAST_TEXT_CALL_FOR_HELP, me->getGender());
Trinity::BroadcastTextBuilder builder(me, CHAT_MSG_MONSTER_EMOTE, BROADCAST_TEXT_CALL_FOR_HELP, me->GetGender());
sCreatureTextMgr->SendChatPacket(me, builder, CHAT_MSG_MONSTER_EMOTE);
}
TC_LOG_DEBUG("scripts.ai", "SmartScript::ProcessAction: SMART_ACTION_CALL_FOR_HELP: Creature %u", me->GetGUID().GetCounter());
Expand Down Expand Up @@ -2024,7 +2024,7 @@ void SmartScript::ProcessAction(SmartScriptHolder& e, Unit* unit, uint32 var0, u
{
for (WorldObject* target : targets)
if (IsCreature(target))
target->ToCreature()->setRegeneratingHealth(e.action.setHealthRegen.regenHealth != 0);
target->ToCreature()->SetRegenerateHealth(e.action.setHealthRegen.regenHealth != 0);

break;
}
Expand Down
32 changes: 16 additions & 16 deletions src/server/game/Achievements/AchievementMgr.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -293,17 +293,17 @@ bool AchievementCriteriaData::Meets(uint32 criteria_id, Player const* source, Wo
case ACHIEVEMENT_CRITERIA_DATA_TYPE_T_PLAYER_CLASS_RACE:
if (!target || target->GetTypeId() != TYPEID_PLAYER)
return false;
if (classRace.class_id && classRace.class_id != target->ToPlayer()->getClass())
if (classRace.class_id && classRace.class_id != target->ToPlayer()->GetClass())
return false;
if (classRace.race_id && classRace.race_id != target->ToPlayer()->getRace())
if (classRace.race_id && classRace.race_id != target->ToPlayer()->GetRace())
return false;
return true;
case ACHIEVEMENT_CRITERIA_DATA_TYPE_S_PLAYER_CLASS_RACE:
if (source->GetTypeId() != TYPEID_PLAYER)
return false;
if (classRace.class_id && classRace.class_id != source->ToPlayer()->getClass())
if (classRace.class_id && classRace.class_id != source->ToPlayer()->GetClass())
return false;
if (classRace.race_id && classRace.race_id != source->ToPlayer()->getRace())
if (classRace.race_id && classRace.race_id != source->ToPlayer()->GetRace())
return false;
return true;
case ACHIEVEMENT_CRITERIA_DATA_TYPE_T_PLAYER_LESS_HEALTH:
Expand All @@ -326,15 +326,15 @@ bool AchievementCriteriaData::Meets(uint32 criteria_id, Player const* source, Wo
case ACHIEVEMENT_CRITERIA_DATA_TYPE_T_LEVEL:
if (!target || !target->IsUnit())
return false;
return target->ToUnit()->getLevel() >= level.minlevel;
return target->ToUnit()->GetLevel() >= level.minlevel;
case ACHIEVEMENT_CRITERIA_DATA_TYPE_T_GENDER:
{
if (!target)
return false;
Unit const* unitTarget = target->ToUnit();
if (!unitTarget)
return false;
return unitTarget->getGender() == gender.gender;
return unitTarget->GetGender() == gender.gender;
}
case ACHIEVEMENT_CRITERIA_DATA_TYPE_SCRIPT:
{
Expand Down Expand Up @@ -677,7 +677,7 @@ void AchievementMgr<Player>::LoadFromDB(PreparedQueryResult achievementResult, P

// title achievement rewards are retroactive
if (AchievementReward const* reward = sAchievementMgr->GetAchievementReward(achievement))
if (uint32 titleId = reward->TitleID[Player::TeamForRace(GetOwner()->getRace()) == ALLIANCE ? 0 : 1])
if (uint32 titleId = reward->TitleID[Player::TeamForRace(GetOwner()->GetRace()) == ALLIANCE ? 0 : 1])
if (CharTitlesEntry const* titleEntry = sCharTitlesStore.LookupEntry(titleId))
GetOwner()->SetTitle(titleEntry);

Expand Down Expand Up @@ -860,7 +860,7 @@ void AchievementMgr<T>::SendAchievementEarned(AchievementEntry const* achievemen

if (Guild* guild = sGuildMgr->GetGuildById(GetOwner()->GetGuildId()))
{
Trinity::BroadcastTextBuilder _builder(GetOwner(), CHAT_MSG_GUILD_ACHIEVEMENT, BROADCAST_TEXT_ACHIEVEMENT_EARNED, GetOwner()->getGender(), _owner, achievement->ID);
Trinity::BroadcastTextBuilder _builder(GetOwner(), CHAT_MSG_GUILD_ACHIEVEMENT, BROADCAST_TEXT_ACHIEVEMENT_EARNED, GetOwner()->GetGender(), _owner, achievement->ID);
Trinity::LocalizedPacketDo<Trinity::BroadcastTextBuilder> _localizer(_builder);
guild->BroadcastWorker(_localizer, GetOwner());
}
Expand All @@ -878,7 +878,7 @@ void AchievementMgr<T>::SendAchievementEarned(AchievementEntry const* achievemen
// if player is in world he can tell his friends about new achievement
else if (GetOwner()->IsInWorld())
{
Trinity::BroadcastTextBuilder _builder(GetOwner(), CHAT_MSG_ACHIEVEMENT, BROADCAST_TEXT_ACHIEVEMENT_EARNED, GetOwner()->getGender(), _owner, achievement->ID);
Trinity::BroadcastTextBuilder _builder(GetOwner(), CHAT_MSG_ACHIEVEMENT, BROADCAST_TEXT_ACHIEVEMENT_EARNED, GetOwner()->GetGender(), _owner, achievement->ID);
Trinity::LocalizedPacketDo<Trinity::BroadcastTextBuilder> _localizer(_builder);
Trinity::PlayerDistWorker<Trinity::LocalizedPacketDo<Trinity::BroadcastTextBuilder>> _worker(GetOwner(), sWorld->getFloatConfig(CONFIG_LISTEN_RANGE_SAY), _localizer);
Cell::VisitWorldObjects(GetOwner(), _worker, sWorld->getFloatConfig(CONFIG_LISTEN_RANGE_SAY));
Expand Down Expand Up @@ -1263,7 +1263,7 @@ void AchievementMgr<T>::UpdateAchievementCriteria(AchievementCriteriaTypes type,
SetCriteriaProgress(achievementCriteria, miscValue1, referencePlayer, PROGRESS_HIGHEST);
break;
case ACHIEVEMENT_CRITERIA_TYPE_REACH_LEVEL:
SetCriteriaProgress(achievementCriteria, referencePlayer->getLevel(), referencePlayer);
SetCriteriaProgress(achievementCriteria, referencePlayer->GetLevel(), referencePlayer);
break;
case ACHIEVEMENT_CRITERIA_TYPE_REACH_SKILL_LEVEL:
if (uint32 skillvalue = referencePlayer->GetBaseSkillValue(achievementCriteria->Asset.SkillID))
Expand Down Expand Up @@ -2877,19 +2877,19 @@ bool AchievementMgr<T>::AdditionalRequirementsSatisfied(AchievementCriteriaEntry
return false;
break;
case ACHIEVEMENT_CRITERIA_ADDITIONAL_CONDITION_SOURCE_RACE: // 25
if (referencePlayer->getRace() != reqValue)
if (referencePlayer->GetRace() != reqValue)
return false;
break;
case ACHIEVEMENT_CRITERIA_ADDITIONAL_CONDITION_SOURCE_CLASS: // 26
if (referencePlayer->getClass() != reqValue)
if (referencePlayer->GetClass() != reqValue)
return false;
break;
case ACHIEVEMENT_CRITERIA_ADDITIONAL_CONDITION_TARGET_RACE: // 27
if (!ref || !ref->IsUnit() || ref->ToUnit()->getRace() != reqValue)
if (!ref || !ref->IsUnit() || ref->ToUnit()->GetRace() != reqValue)
return false;
break;
case ACHIEVEMENT_CRITERIA_ADDITIONAL_CONDITION_TARGET_CLASS: // 28
if (!ref || !ref->IsUnit() || ref->ToUnit()->getClass() != reqValue)
if (!ref || !ref->IsUnit() || ref->ToUnit()->GetClass() != reqValue)
return false;
break;
case ACHIEVEMENT_CRITERIA_ADDITIONAL_CONDITION_MAX_GROUP_MEMBERS: // 29
Expand Down Expand Up @@ -2936,11 +2936,11 @@ bool AchievementMgr<T>::AdditionalRequirementsSatisfied(AchievementCriteriaEntry
return false;
break;
case ACHIEVEMENT_CRITERIA_ADDITIONAL_CONDITION_SOURCE_LEVEL: // 39
if (referencePlayer->getLevel() != reqValue)
if (referencePlayer->GetLevel() != reqValue)
return false;
break;
case ACHIEVEMENT_CRITERIA_ADDITIONAL_CONDITION_TARGET_LEVEL: // 40
if (!ref || !ref->IsUnit() || ref->ToUnit()->getLevel() != reqValue)
if (!ref || !ref->IsUnit() || ref->ToUnit()->GetLevel() != reqValue)
return false;
break;
case ACHIEVEMENT_CRITERIA_ADDITIONAL_CONDITION_TARGET_ZONE: // 41
Expand Down
2 changes: 1 addition & 1 deletion src/server/game/Battlefield/Battlefield.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -268,7 +268,7 @@ void Battlefield::InvitePlayerToWar(Player* player)
return;

// If the player does not match minimal level requirements for the battlefield, kick him
if (player->getLevel() < m_MinLevel)
if (player->GetLevel() < m_MinLevel)
{
if (m_PlayersWillBeKick[player->GetTeamId()].count(player->GetGUID()) == 0)
m_PlayersWillBeKick[player->GetTeamId()][player->GetGUID()] = GameTime::GetGameTime() + 10;
Expand Down
4 changes: 2 additions & 2 deletions src/server/game/Battlegrounds/ArenaTeam.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ bool ArenaTeam::AddMember(ObjectGuid playerGuid)
Player* player = ObjectAccessor::FindPlayer(playerGuid);
if (player)
{
playerClass = player->getClass();
playerClass = player->GetClass();
playerName = player->GetName();
}
else
Expand Down Expand Up @@ -442,7 +442,7 @@ void ArenaTeam::Roster(WorldSession* session)
data << uint8((player ? 1 : 0)); // online flag
data << itr->Name; // member name
data << uint32((itr->Guid == GetCaptain() ? 0 : 1)); // captain flag 0 captain 1 member
data << uint8((player ? player->getLevel() : 0)); // unknown, level?
data << uint8((player ? player->GetLevel() : 0)); // unknown, level?
data << uint8(itr->Class); // class
data << uint32(itr->WeekGames); // played this week
data << uint32(itr->WeekWins); // wins this week
Expand Down
2 changes: 1 addition & 1 deletion src/server/game/Battlegrounds/BattlegroundMgr.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -893,7 +893,7 @@ void BattlegroundMgr::SendBattlegroundList(ObjectGuid guid, Player* player, Batt
BattlegroundDataContainer::iterator it = bgDataStore.find(bgTypeId);
if (it != bgDataStore.end())
{
PvPDifficultyEntry const* bracketEntry = sDBCManager.GetBattlegroundBracketByLevel(it->second.m_Battlegrounds.begin()->second->GetMapId(), player->getLevel());
PvPDifficultyEntry const* bracketEntry = sDBCManager.GetBattlegroundBracketByLevel(it->second.m_Battlegrounds.begin()->second->GetMapId(), player->GetLevel());
if (bracketEntry)
{
BattlegroundBracketId bracketId = bracketEntry->GetBracketId();
Expand Down
4 changes: 2 additions & 2 deletions src/server/game/Calendar/CalendarMgr.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -439,7 +439,7 @@ void CalendarMgr::SendCalendarEventInvite(CalendarInvite const& invite)
ObjectGuid invitee = invite.GetInviteeGUID();
Player* player = ObjectAccessor::FindConnectedPlayer(invitee);

uint8 level = player ? player->getLevel() : sCharacterCache->GetCharacterLevelByGuid(invitee);
uint8 level = player ? player->GetLevel() : sCharacterCache->GetCharacterLevelByGuid(invitee);

WorldPacket data(SMSG_CALENDAR_EVENT_INVITE, 8 + 8 + 8 + 1 + 1 + 1 + (statusTime ? 4 : 0) + 1);
data << invitee.WriteAsPacked();
Expand Down Expand Up @@ -591,7 +591,7 @@ void CalendarMgr::SendCalendarEvent(ObjectGuid guid, CalendarEvent const& calend
ObjectGuid inviteeGuid = calendarInvite->GetInviteeGUID();
Player* invitee = ObjectAccessor::FindPlayer(inviteeGuid);

uint8 inviteeLevel = invitee ? invitee->getLevel() : sCharacterCache->GetCharacterLevelByGuid(inviteeGuid);
uint8 inviteeLevel = invitee ? invitee->GetLevel() : sCharacterCache->GetCharacterLevelByGuid(inviteeGuid);
ObjectGuid::LowType inviteeGuildId = invitee ? invitee->GetGuildId() : sCharacterCache->GetCharacterGuildIdByGuid(inviteeGuid);

data << inviteeGuid.WriteAsPacked();
Expand Down
8 changes: 4 additions & 4 deletions src/server/game/Conditions/ConditionMgr.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -272,19 +272,19 @@ bool Condition::Meets(ConditionSourceInfo& sourceInfo) const
case CONDITION_CLASS:
{
if (Unit* unit = object->ToUnit())
condMeets = (unit->getClassMask() & ConditionValue1) != 0;
condMeets = (unit->GetClassMask() & ConditionValue1) != 0;
break;
}
case CONDITION_RACE:
{
if (Unit* unit = object->ToUnit())
condMeets = (unit->getRaceMask() & ConditionValue1) != 0;
condMeets = (unit->GetRaceMask() & ConditionValue1) != 0;
break;
}
case CONDITION_GENDER:
{
if (Player* player = object->ToPlayer())
condMeets = player->getGender() == ConditionValue1;
condMeets = player->GetGender() == ConditionValue1;
break;
}
case CONDITION_SKILL:
Expand Down Expand Up @@ -338,7 +338,7 @@ bool Condition::Meets(ConditionSourceInfo& sourceInfo) const
case CONDITION_LEVEL:
{
if (Unit* unit = object->ToUnit())
condMeets = CompareValues(static_cast<ComparisionType>(ConditionValue2), static_cast<uint32>(unit->getLevel()), ConditionValue1);
condMeets = CompareValues(static_cast<ComparisionType>(ConditionValue2), static_cast<uint32>(unit->GetLevel()), ConditionValue1);
break;
}
case CONDITION_DRUNKENSTATE:
Expand Down
8 changes: 4 additions & 4 deletions src/server/game/DungeonFinding/LFGMgr.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -482,11 +482,11 @@ void LFGMgr::JoinLfg(Player* player, uint8 roles, LfgDungeonSet& dungeons, const
joinData.result = LFG_JOIN_NOT_MEET_REQS;
else if (player->HasAura(9454)) // check Freeze debuff
joinData.result = LFG_JOIN_NOT_MEET_REQS;
else if (!CanPerformSelectedRoles(player->getClass(), roles))
else if (!CanPerformSelectedRoles(player->GetClass(), roles))
joinData.result = LFG_JOIN_INTERNAL_ERROR;
else if (grp)
{
if (grp->GetMembersCount() > MAXGROUPSIZE)
if (grp->GetMembersCount() > MAX_GROUP_SIZE)
joinData.result = LFG_JOIN_TOO_MUCH_MEMBERS;
else
{
Expand Down Expand Up @@ -1574,7 +1574,7 @@ void LFGMgr::FinishDungeon(ObjectGuid gguid, const uint32 dungeonId, Map const*
if (dungeon->difficulty == DUNGEON_DIFFICULTY_HEROIC)
player->UpdateAchievementCriteria(ACHIEVEMENT_CRITERIA_TYPE_USE_LFD_TO_GROUP_WITH_PLAYERS, 1);

LfgReward const* reward = GetRandomDungeonReward(rDungeonId, player->getLevel());
LfgReward const* reward = GetRandomDungeonReward(rDungeonId, player->GetLevel());
if (!reward)
continue;

Expand Down Expand Up @@ -1781,7 +1781,7 @@ LfgLockMap const LFGMgr::GetLockedDungeons(ObjectGuid guid)
return lock;
}

uint8 level = player->getLevel();
uint8 level = player->GetLevel();
uint8 expansion = player->GetSession()->GetExpansion();
LfgDungeonSet const& dungeons = GetDungeonsByRandom(0);
bool denyJoin = !player->GetSession()->HasPermission(rbac::RBAC_PERM_JOIN_DUNGEON_FINDER);
Expand Down
16 changes: 8 additions & 8 deletions src/server/game/Entities/Creature/Creature.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1234,13 +1234,13 @@ bool Creature::isCanInteractWithBattleMaster(Player* player, bool msg) const

bool Creature::CanResetTalents(Player* player) const
{
return player->getLevel() >= 10
&& player->getClass() == GetCreatureTemplate()->trainer_class;
return player->GetLevel() >= 10
&& player->GetClass() == GetCreatureTemplate()->trainer_class;
}

bool Creature::IsClassTrainerOf(Player const* player) const
{
return player->getClass() == GetCreatureTemplate()->trainer_class;
return player->GetClass() == GetCreatureTemplate()->trainer_class;
}

Player* Creature::GetLootRecipient() const
Expand Down Expand Up @@ -1440,7 +1440,7 @@ void Creature::UpdateLevelDependantStats()
{
CreatureTemplate const* cInfo = GetCreatureTemplate();
uint32 rank = IsPet() ? 0 : cInfo->rank;
CreatureBaseStats const* stats = sObjectMgr->GetCreatureBaseStats(getLevel(), cInfo->unit_class);
CreatureBaseStats const* stats = sObjectMgr->GetCreatureBaseStats(GetLevel(), cInfo->unit_class);

// health
float healthmod = _GetHealthMod(rank);
Expand All @@ -1461,7 +1461,7 @@ void Creature::UpdateLevelDependantStats()
SetStatPctModifier(UnitMods(UNIT_MOD_POWER_START + AsUnderlyingType(powerType)), BASE_PCT, cInfo->ModMana * cInfo->ModManaExtra);
SetPowerType(powerType);

switch (getClass())
switch (GetClass())
{
case UNIT_CLASS_PALADIN:
case UNIT_CLASS_MAGE:
Expand Down Expand Up @@ -1913,8 +1913,8 @@ float Creature::GetAttackDistance(Unit const* player) const
float aggroRate = sWorld->getRate(RATE_CREATURE_AGGRO);
uint8 expansionMaxLevel = uint8(DBCManager::GetMaxLevelForExpansion(GetCreatureTemplate()->expansion));

uint32 playerLevel = player->getLevel();
uint32 creatureLevel = getLevel();
uint32 playerLevel = player->GetLevel();
uint32 creatureLevel = GetLevel();

if (aggroRate == 0.0f)
return 0.0f;
Expand Down Expand Up @@ -2803,7 +2803,7 @@ uint8 Creature::getLevelForTarget(WorldObject const* target) const
if (!isWorldBoss() || !target->ToUnit())
return Unit::getLevelForTarget(target);

uint16 level = target->ToUnit()->getLevel() + sWorld->getIntConfig(CONFIG_WORLD_BOSS_LEVEL_DIFF);
uint16 level = target->ToUnit()->GetLevel() + sWorld->getIntConfig(CONFIG_WORLD_BOSS_LEVEL_DIFF);
if (level < 1)
return 1;
if (level > 255)
Expand Down
2 changes: 1 addition & 1 deletion src/server/game/Entities/Creature/Creature.h
Original file line number Diff line number Diff line change
Expand Up @@ -290,7 +290,7 @@ class TC_GAME_API Creature : public Unit, public GridObject<Creature>, public Ma
bool hasInvolvedQuest(uint32 quest_id) const override;

bool isRegeneratingHealth() { return m_regenHealth; }
void setRegeneratingHealth(bool regenHealth) { m_regenHealth = regenHealth; }
void SetRegenerateHealth(bool regenHealth) { m_regenHealth = regenHealth; }
virtual uint8 GetPetAutoSpellSize() const { return MAX_SPELL_CHARM; }
virtual uint32 GetPetAutoSpellOnPos(uint8 pos) const;
float GetPetChaseDistance() const;
Expand Down
6 changes: 3 additions & 3 deletions src/server/game/Entities/Creature/TemporarySummon.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ void TempSummon::InitStats(uint32 duration)
if (owner && IsTrigger() && m_spells[0])
{
SetFaction(owner->GetFaction());
SetLevel(owner->getLevel());
SetLevel(owner->GetLevel());
if (owner->GetTypeId() == TYPEID_PLAYER)
m_ControlledByPlayer = true;
}
Expand Down Expand Up @@ -392,7 +392,7 @@ void Guardian::InitStats(uint32 duration)
{
Minion::InitStats(duration);

InitStatsForLevel(GetOwner()->getLevel());
InitStatsForLevel(GetOwner()->GetLevel());

if (GetOwner()->GetTypeId() == TYPEID_PLAYER && HasUnitTypeMask(UNIT_MASK_CONTROLABLE_GUARDIAN))
m_charmInfo->InitCharmCreateSpells();
Expand Down Expand Up @@ -422,7 +422,7 @@ Puppet::Puppet(SummonPropertiesEntry const* properties, Unit* owner)
void Puppet::InitStats(uint32 duration)
{
Minion::InitStats(duration);
SetLevel(GetOwner()->getLevel());
SetLevel(GetOwner()->GetLevel());
SetReactState(REACT_PASSIVE);
}

Expand Down
Loading

0 comments on commit 82e311d

Please sign in to comment.