mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-02-14 07:53:44 +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:
@@ -255,11 +255,11 @@ public:
|
||||
bool OnCastItemCombatSpell(Player* /*player*/, Unit* victim, SpellInfo const* /*spellInfo*/, Item* /*item*/) override
|
||||
{
|
||||
// spell proc chance gets severely reduced on victims > 60 (formula unknown)
|
||||
if (victim->getLevel() > 60)
|
||||
if (victim->GetLevel() > 60)
|
||||
{
|
||||
// gives ~0.1% proc chance at lvl 70
|
||||
float const lvlPenaltyFactor = 9.93f;
|
||||
float const failureChance = (victim->getLevel() - 60) * lvlPenaltyFactor;
|
||||
float const failureChance = (victim->GetLevel() - 60) * lvlPenaltyFactor;
|
||||
|
||||
// base ppm chance was already rolled, only roll success chance
|
||||
return !roll_chance_f(failureChance);
|
||||
|
||||
@@ -273,7 +273,7 @@ int32 DoHighUnlearnCost(Player* /*player*/) //tailor, alchemy
|
||||
|
||||
int32 DoMedUnlearnCost(Player* player) //blacksmith, leatherwork
|
||||
{
|
||||
uint8 level = player->getLevel();
|
||||
uint8 level = player->GetLevel();
|
||||
if (level < 51)
|
||||
return 250000;
|
||||
else if (level < 66)
|
||||
@@ -284,7 +284,7 @@ int32 DoMedUnlearnCost(Player* player) //blacksmith, leather
|
||||
|
||||
int32 DoLowUnlearnCost(Player* player) //blacksmith
|
||||
{
|
||||
uint8 level = player->getLevel();
|
||||
uint8 level = player->GetLevel();
|
||||
if (level < 66)
|
||||
return 50000;
|
||||
else
|
||||
@@ -486,7 +486,7 @@ public:
|
||||
if (creature->IsTrainer())
|
||||
AddGossipItemFor(player, GOSSIP_ICON_TRAINER, GOSSIP_TEXT_TRAIN, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_TRAIN);
|
||||
|
||||
if (player->HasSkill(SKILL_ALCHEMY) && player->GetBaseSkillValue(SKILL_ALCHEMY) >= 350 && player->getLevel() > 67)
|
||||
if (player->HasSkill(SKILL_ALCHEMY) && player->GetBaseSkillValue(SKILL_ALCHEMY) >= 350 && player->GetLevel() > 67)
|
||||
{
|
||||
if (player->GetQuestRewardStatus(Q_MASTER_TRANSMUTE) || player->GetQuestRewardStatus(Q_MASTER_ELIXIR) || player->GetQuestRewardStatus(Q_MASTER_POTION))
|
||||
{
|
||||
@@ -683,7 +683,7 @@ public:
|
||||
}
|
||||
}
|
||||
//WEAPONSMITH SPEC
|
||||
if (player->HasSpell(S_WEAPON) && player->getLevel() > 49 && player->GetBaseSkillValue(SKILL_BLACKSMITHING) >= 250)
|
||||
if (player->HasSpell(S_WEAPON) && player->GetLevel() > 49 && player->GetBaseSkillValue(SKILL_BLACKSMITHING) >= 250)
|
||||
{
|
||||
switch (creatureId)
|
||||
{
|
||||
@@ -992,7 +992,7 @@ public:
|
||||
player->PrepareQuestMenu(creature->GetGUID());
|
||||
}
|
||||
|
||||
if (player->HasSkill(SKILL_LEATHERWORKING) && player->GetBaseSkillValue(SKILL_LEATHERWORKING) >= 225 && player->getLevel() > 40)
|
||||
if (player->HasSkill(SKILL_LEATHERWORKING) && player->GetBaseSkillValue(SKILL_LEATHERWORKING) >= 225 && player->GetLevel() > 40)
|
||||
{
|
||||
switch (creature->GetEntry())
|
||||
{
|
||||
@@ -1085,7 +1085,7 @@ public:
|
||||
AddGossipItemFor(player, GOSSIP_ICON_VENDOR, GOSSIP_TEXT_BROWSE_GOODS, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_TRADE);
|
||||
|
||||
//TAILORING SPEC
|
||||
if (player->HasSkill(SKILL_TAILORING) && player->GetBaseSkillValue(SKILL_TAILORING) >= 350 && player->getLevel() > 59)
|
||||
if (player->HasSkill(SKILL_TAILORING) && player->GetBaseSkillValue(SKILL_TAILORING) >= 350 && player->GetLevel() > 59)
|
||||
{
|
||||
if (player->GetQuestRewardStatus(10831) || player->GetQuestRewardStatus(10832) || player->GetQuestRewardStatus(10833))
|
||||
{
|
||||
@@ -1247,7 +1247,7 @@ public:
|
||||
bool OnGossipHello(Player* player, GameObject* gameobject) override
|
||||
{
|
||||
//ENGINEERING SPEC
|
||||
if (player->HasSkill(SKILL_ENGINEERING) && player->GetBaseSkillValue(SKILL_ENGINEERING) >= 225 && player->getLevel() >= 35)
|
||||
if (player->HasSkill(SKILL_ENGINEERING) && player->GetBaseSkillValue(SKILL_ENGINEERING) >= 225 && player->GetLevel() >= 35)
|
||||
{
|
||||
if (player->GetQuestRewardStatus(3643) || player->GetQuestRewardStatus(3641) || player->GetQuestRewardStatus(3639))
|
||||
{
|
||||
@@ -1268,7 +1268,7 @@ public:
|
||||
}
|
||||
|
||||
//LEATHERWORKING SPEC
|
||||
if (player->HasSkill(SKILL_LEATHERWORKING) && player->GetBaseSkillValue(SKILL_LEATHERWORKING) >= 225 && player->getLevel() >= 40)
|
||||
if (player->HasSkill(SKILL_LEATHERWORKING) && player->GetBaseSkillValue(SKILL_LEATHERWORKING) >= 225 && player->GetLevel() >= 40)
|
||||
{
|
||||
if (!HasLeatherSpecialty(player) && (player->GetQuestRewardStatus(5141) || player->GetQuestRewardStatus(5143) || player->GetQuestRewardStatus(5144) || player->GetQuestRewardStatus(5145) || player->GetQuestRewardStatus(5146) || player->GetQuestRewardStatus(5148)))
|
||||
{
|
||||
|
||||
@@ -34,7 +34,7 @@ public:
|
||||
{
|
||||
if (quest->GetQuestId() == QUEST_APPRENTICE_ANGLER)
|
||||
{
|
||||
uint32 level = player->getLevel();
|
||||
uint32 level = player->GetLevel();
|
||||
int32 moneyRew = 0;
|
||||
if (level <= 10)
|
||||
moneyRew = 85;
|
||||
|
||||
Reference in New Issue
Block a user