mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-02-04 19:43:48 +00:00
refactor(Core/Object): getLevel() -> GetLevel() (#14122)
* refactor(Core/Object): getLevel() -> GetLevel() * fix build and sneak some doxygen in * codeSTLE * codestyle
This commit is contained in:
@@ -546,7 +546,7 @@ bool Creature::UpdateEntry(uint32 Entry, const CreatureData* data, bool changele
|
||||
}
|
||||
|
||||
SetMeleeDamageSchool(SpellSchools(cInfo->dmgschool));
|
||||
CreatureBaseStats const* stats = sObjectMgr->GetCreatureBaseStats(getLevel(), cInfo->unit_class);
|
||||
CreatureBaseStats const* stats = sObjectMgr->GetCreatureBaseStats(GetLevel(), cInfo->unit_class);
|
||||
float armor = (float)stats->GenerateArmor(cInfo); // TODO: Why is this treated as uint32 when it's a float?
|
||||
SetModifierValue(UNIT_MOD_ARMOR, BASE_VALUE, armor);
|
||||
SetModifierValue(UNIT_MOD_RESISTANCE_HOLY, BASE_VALUE, float(cInfo->resistance[SPELL_SCHOOL_HOLY]));
|
||||
@@ -1213,7 +1213,7 @@ bool Creature::isCanInteractWithBattleMaster(Player* player, bool msg) const
|
||||
|
||||
bool Creature::isCanTrainingAndResetTalentsOf(Player* player) const
|
||||
{
|
||||
return player->getLevel() >= 10
|
||||
return player->GetLevel() >= 10
|
||||
&& GetCreatureTemplate()->trainer_type == TRAINER_TYPE_CLASS
|
||||
&& player->getClass() == GetCreatureTemplate()->trainer_class;
|
||||
}
|
||||
@@ -2898,7 +2898,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)
|
||||
|
||||
Reference in New Issue
Block a user