mirror of
https://github.com/ZhengPeiRu21/mod-individual-progression
synced 2025-11-29 23:44:51 +08:00
Fix compability with latest AzerothCore
This commit is contained in:
@@ -91,12 +91,12 @@ void IndividualProgression::ComputeGearTuning(Player* player, float& computedAdj
|
|||||||
void IndividualProgression::AdjustVanillaStats(Player* player) const
|
void IndividualProgression::AdjustVanillaStats(Player* player) const
|
||||||
{
|
{
|
||||||
float adjustmentValue = -100.0f * (1.0f - vanillaPowerAdjustment);
|
float adjustmentValue = -100.0f * (1.0f - vanillaPowerAdjustment);
|
||||||
float adjustmentApplyPercent = (player->getLevel() - 10.0f) / 50.0f;
|
float adjustmentApplyPercent = (player->GetLevel() - 10.0f) / 50.0f;
|
||||||
float computedAdjustment = player->getLevel() > 10 ? (adjustmentValue * adjustmentApplyPercent) : 0;
|
float computedAdjustment = player->GetLevel() > 10 ? (adjustmentValue * adjustmentApplyPercent) : 0;
|
||||||
|
|
||||||
float adjustmentHealingValue = -100.0f * (1.0f - vanillaHealingAdjustment);
|
float adjustmentHealingValue = -100.0f * (1.0f - vanillaHealingAdjustment);
|
||||||
float adjustmentHealingApplyPercent = (player->getLevel() - 10.0f) / 50.0f;
|
float adjustmentHealingApplyPercent = (player->GetLevel() - 10.0f) / 50.0f;
|
||||||
float computedHealingAdjustment = player->getLevel() > 10 ? (adjustmentHealingValue * adjustmentHealingApplyPercent) : 0;
|
float computedHealingAdjustment = player->GetLevel() > 10 ? (adjustmentHealingValue * adjustmentHealingApplyPercent) : 0;
|
||||||
|
|
||||||
AdjustStats(player, computedAdjustment, computedHealingAdjustment);
|
AdjustStats(player, computedAdjustment, computedHealingAdjustment);
|
||||||
}
|
}
|
||||||
@@ -105,11 +105,11 @@ void IndividualProgression::AdjustTBCStats(Player* player) const
|
|||||||
{
|
{
|
||||||
float adjustmentValue = -100.0f * (1.0f - tbcPowerAdjustment);
|
float adjustmentValue = -100.0f * (1.0f - tbcPowerAdjustment);
|
||||||
float adjustmentApplyPercent = 1;
|
float adjustmentApplyPercent = 1;
|
||||||
float computedAdjustment = player->getLevel() > 10 ? (adjustmentValue * adjustmentApplyPercent) : 0;
|
float computedAdjustment = player->GetLevel() > 10 ? (adjustmentValue * adjustmentApplyPercent) : 0;
|
||||||
|
|
||||||
float adjustmentHealingValue = -100.0f * (1.0f - tbcHealingAdjustment);
|
float adjustmentHealingValue = -100.0f * (1.0f - tbcHealingAdjustment);
|
||||||
float adjustmentHealingApplyPercent = 1;
|
float adjustmentHealingApplyPercent = 1;
|
||||||
float computedHealingAdjustment = player->getLevel() > 10 ? (adjustmentHealingValue * adjustmentHealingApplyPercent) : 0;
|
float computedHealingAdjustment = player->GetLevel() > 10 ? (adjustmentHealingValue * adjustmentHealingApplyPercent) : 0;
|
||||||
|
|
||||||
for (uint8 i = EQUIPMENT_SLOT_START; i < EQUIPMENT_SLOT_END; ++i)
|
for (uint8 i = EQUIPMENT_SLOT_START; i < EQUIPMENT_SLOT_END; ++i)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -78,9 +78,9 @@ public:
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
// Player is still in Vanilla content - give money at 60 level cap
|
// Player is still in Vanilla content - give money at 60 level cap
|
||||||
return ((!sIndividualProgression->hasPassedProgression(player, PROGRESSION_NAXX40) && player->getLevel() == 60) ||
|
return ((!sIndividualProgression->hasPassedProgression(player, PROGRESSION_NAXX40) && player->GetLevel() == 60) ||
|
||||||
// Player is in TBC content - give money at 70 level cap
|
// Player is in TBC content - give money at 70 level cap
|
||||||
(!sIndividualProgression->hasPassedProgression(player, PROGRESSION_TBC_TIER_5) && player->getLevel() == 70));
|
(!sIndividualProgression->hasPassedProgression(player, PROGRESSION_TBC_TIER_5) && player->GetLevel() == 70));
|
||||||
}
|
}
|
||||||
|
|
||||||
void OnAfterUpdateMaxHealth(Player* player, float& value) override
|
void OnAfterUpdateMaxHealth(Player* player, float& value) override
|
||||||
@@ -100,8 +100,8 @@ public:
|
|||||||
if (!sIndividualProgression->hasPassedProgression(player, PROGRESSION_NAXX40))
|
if (!sIndividualProgression->hasPassedProgression(player, PROGRESSION_NAXX40))
|
||||||
{
|
{
|
||||||
float adjustmentAmount = 1.0f - sIndividualProgression->vanillaHealthAdjustment;
|
float adjustmentAmount = 1.0f - sIndividualProgression->vanillaHealthAdjustment;
|
||||||
float applyPercent = ((player->getLevel() - 10.0f) / 50.0f);
|
float applyPercent = ((player->GetLevel() - 10.0f) / 50.0f);
|
||||||
float computedAdjustment = player->getLevel() > 10 ? 1.0f - applyPercent * adjustmentAmount : 1.0f;
|
float computedAdjustment = player->GetLevel() > 10 ? 1.0f - applyPercent * adjustmentAmount : 1.0f;
|
||||||
value *= computedAdjustment;
|
value *= computedAdjustment;
|
||||||
}
|
}
|
||||||
// Player is in TBC content - give TBC health adjustment
|
// Player is in TBC content - give TBC health adjustment
|
||||||
@@ -140,7 +140,7 @@ public:
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
// Player is still in Vanilla content - do not give XP past level 60
|
// Player is still in Vanilla content - do not give XP past level 60
|
||||||
if (!sIndividualProgression->hasPassedProgression(player, PROGRESSION_NAXX40) && player->getLevel() >= 60)
|
if (!sIndividualProgression->hasPassedProgression(player, PROGRESSION_NAXX40) && player->GetLevel() >= 60)
|
||||||
{
|
{
|
||||||
// Still award XP to pets - they won't be able to pass the player's level
|
// Still award XP to pets - they won't be able to pass the player's level
|
||||||
Pet* pet = player->GetPet();
|
Pet* pet = player->GetPet();
|
||||||
@@ -149,7 +149,7 @@ public:
|
|||||||
amount = 0;
|
amount = 0;
|
||||||
}
|
}
|
||||||
// Player is in TBC content - do not give XP past level 70
|
// Player is in TBC content - do not give XP past level 70
|
||||||
else if (!sIndividualProgression->hasPassedProgression(player, PROGRESSION_TBC_TIER_5) && player->getLevel() >= 70)
|
else if (!sIndividualProgression->hasPassedProgression(player, PROGRESSION_TBC_TIER_5) && player->GetLevel() >= 70)
|
||||||
{
|
{
|
||||||
// Still award XP to pets - they won't be able to pass the player's level
|
// Still award XP to pets - they won't be able to pass the player's level
|
||||||
Pet* pet = player->GetPet();
|
Pet* pet = player->GetPet();
|
||||||
@@ -511,10 +511,10 @@ private:
|
|||||||
static void AdjustVanillaStats(Pet* pet)
|
static void AdjustVanillaStats(Pet* pet)
|
||||||
{
|
{
|
||||||
float adjustmentValue = -100.0f * (1.0f - sIndividualProgression->vanillaPowerAdjustment);
|
float adjustmentValue = -100.0f * (1.0f - sIndividualProgression->vanillaPowerAdjustment);
|
||||||
float adjustmentApplyPercent = (pet->getLevel() - 10.0f) / 50.0f;
|
float adjustmentApplyPercent = (pet->GetLevel() - 10.0f) / 50.0f;
|
||||||
float computedAdjustment = pet->getLevel() > 10 ? (adjustmentValue * adjustmentApplyPercent) : 0;
|
float computedAdjustment = pet->GetLevel() > 10 ? (adjustmentValue * adjustmentApplyPercent) : 0;
|
||||||
float hpAdjustmentValue = -100.0f * (1.0f - sIndividualProgression->vanillaHealthAdjustment);
|
float hpAdjustmentValue = -100.0f * (1.0f - sIndividualProgression->vanillaHealthAdjustment);
|
||||||
float hpAdjustment = pet->getLevel() > 10 ? (hpAdjustmentValue * adjustmentApplyPercent) : 0;
|
float hpAdjustment = pet->GetLevel() > 10 ? (hpAdjustmentValue * adjustmentApplyPercent) : 0;
|
||||||
AdjustStats(pet, computedAdjustment, hpAdjustment);
|
AdjustStats(pet, computedAdjustment, hpAdjustment);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -522,9 +522,9 @@ private:
|
|||||||
{
|
{
|
||||||
float adjustmentValue = -100.0f * (1.0f - sIndividualProgression->tbcPowerAdjustment);
|
float adjustmentValue = -100.0f * (1.0f - sIndividualProgression->tbcPowerAdjustment);
|
||||||
float adjustmentApplyPercent = 1;
|
float adjustmentApplyPercent = 1;
|
||||||
float computedAdjustment = pet->getLevel() > 10 ? (adjustmentValue * adjustmentApplyPercent) : 0;
|
float computedAdjustment = pet->GetLevel() > 10 ? (adjustmentValue * adjustmentApplyPercent) : 0;
|
||||||
float hpAdjustmentValue = -100.0f * (1.0f - sIndividualProgression->tbcHealthAdjustment);
|
float hpAdjustmentValue = -100.0f * (1.0f - sIndividualProgression->tbcHealthAdjustment);
|
||||||
float hpAdjustment = pet->getLevel() > 10 ? (hpAdjustmentValue * adjustmentApplyPercent) : 0;
|
float hpAdjustment = pet->GetLevel() > 10 ? (hpAdjustmentValue * adjustmentApplyPercent) : 0;
|
||||||
AdjustStats(pet, computedAdjustment, hpAdjustment);
|
AdjustStats(pet, computedAdjustment, hpAdjustment);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -600,7 +600,7 @@ public:
|
|||||||
float gearAdjustment = computeTotalGearTuning(player);
|
float gearAdjustment = computeTotalGearTuning(player);
|
||||||
if (!sIndividualProgression->hasPassedProgression(player, PROGRESSION_NAXX40))
|
if (!sIndividualProgression->hasPassedProgression(player, PROGRESSION_NAXX40))
|
||||||
{
|
{
|
||||||
heal *= (sIndividualProgression->ComputeVanillaAdjustment(player->getLevel(), sIndividualProgression->vanillaHealingAdjustment) - gearAdjustment);
|
heal *= (sIndividualProgression->ComputeVanillaAdjustment(player->GetLevel(), sIndividualProgression->vanillaHealingAdjustment) - gearAdjustment);
|
||||||
}
|
}
|
||||||
else if (!sIndividualProgression->hasPassedProgression(player, PROGRESSION_TBC_TIER_5))
|
else if (!sIndividualProgression->hasPassedProgression(player, PROGRESSION_TBC_TIER_5))
|
||||||
{
|
{
|
||||||
@@ -625,7 +625,7 @@ public:
|
|||||||
float gearAdjustment = computeTotalGearTuning(player);
|
float gearAdjustment = computeTotalGearTuning(player);
|
||||||
if (!sIndividualProgression->hasPassedProgression(player, PROGRESSION_NAXX40))
|
if (!sIndividualProgression->hasPassedProgression(player, PROGRESSION_NAXX40))
|
||||||
{
|
{
|
||||||
damage *= (sIndividualProgression->ComputeVanillaAdjustment(player->getLevel(), sIndividualProgression->vanillaPowerAdjustment) - gearAdjustment);
|
damage *= (sIndividualProgression->ComputeVanillaAdjustment(player->GetLevel(), sIndividualProgression->vanillaPowerAdjustment) - gearAdjustment);
|
||||||
}
|
}
|
||||||
else if (!sIndividualProgression->hasPassedProgression(player, PROGRESSION_TBC_TIER_5))
|
else if (!sIndividualProgression->hasPassedProgression(player, PROGRESSION_TBC_TIER_5))
|
||||||
{
|
{
|
||||||
@@ -651,7 +651,7 @@ public:
|
|||||||
float gearAdjustment = computeTotalGearTuning(player);
|
float gearAdjustment = computeTotalGearTuning(player);
|
||||||
if (!sIndividualProgression->hasPassedProgression(player, PROGRESSION_NAXX40))
|
if (!sIndividualProgression->hasPassedProgression(player, PROGRESSION_NAXX40))
|
||||||
{
|
{
|
||||||
damage *= (sIndividualProgression->ComputeVanillaAdjustment(player->getLevel(), sIndividualProgression->vanillaPowerAdjustment) - gearAdjustment);
|
damage *= (sIndividualProgression->ComputeVanillaAdjustment(player->GetLevel(), sIndividualProgression->vanillaPowerAdjustment) - gearAdjustment);
|
||||||
}
|
}
|
||||||
else if (!sIndividualProgression->hasPassedProgression(player, PROGRESSION_TBC_TIER_5))
|
else if (!sIndividualProgression->hasPassedProgression(player, PROGRESSION_TBC_TIER_5))
|
||||||
{
|
{
|
||||||
@@ -686,7 +686,7 @@ public:
|
|||||||
float gearAdjustment = computeTotalGearTuning(player);
|
float gearAdjustment = computeTotalGearTuning(player);
|
||||||
if (!sIndividualProgression->hasPassedProgression(player, PROGRESSION_NAXX40))
|
if (!sIndividualProgression->hasPassedProgression(player, PROGRESSION_NAXX40))
|
||||||
{
|
{
|
||||||
damage *= (sIndividualProgression->ComputeVanillaAdjustment(player->getLevel(), sIndividualProgression->vanillaPowerAdjustment) - gearAdjustment);
|
damage *= (sIndividualProgression->ComputeVanillaAdjustment(player->GetLevel(), sIndividualProgression->vanillaPowerAdjustment) - gearAdjustment);
|
||||||
}
|
}
|
||||||
else if (!sIndividualProgression->hasPassedProgression(player, PROGRESSION_TBC_TIER_5))
|
else if (!sIndividualProgression->hasPassedProgression(player, PROGRESSION_TBC_TIER_5))
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -134,7 +134,7 @@ public:
|
|||||||
|
|
||||||
bool OnTrigger(Player* player, AreaTrigger const* /*areaTrigger*/) override
|
bool OnTrigger(Player* player, AreaTrigger const* /*areaTrigger*/) override
|
||||||
{
|
{
|
||||||
if (player->getLevel() < 80)
|
if (player->GetLevel() < 80)
|
||||||
{
|
{
|
||||||
player->SetRaidDifficulty(RAID_DIFFICULTY_10MAN_HEROIC);
|
player->SetRaidDifficulty(RAID_DIFFICULTY_10MAN_HEROIC);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user