mirror of
https://github.com/EQEmu/Server.git
synced 2025-12-13 14:41:28 +00:00
Don't scale 0 values
This commit is contained in:
parent
954247956e
commit
263ed3913b
31
zone/npc.cpp
31
zone/npc.cpp
@ -2443,18 +2443,27 @@ void NPC::LevelScale() {
|
|||||||
|
|
||||||
if (RuleB(NPC, NewLevelScaling)) {
|
if (RuleB(NPC, NewLevelScaling)) {
|
||||||
if (scalerate == 0 || maxlevel <= 25) {
|
if (scalerate == 0 || maxlevel <= 25) {
|
||||||
// pre-pop seems to scale by 20 HP increments while newer by 100
|
// Don't add HP to dynamically scaled NPCs since this will be calculated later
|
||||||
// We also don't want 100 increments on newer noobie zones, check level
|
if (max_hp > 0 || skip_auto_scale)
|
||||||
if (zone->GetZoneID() < 200 || level < 48) {
|
{
|
||||||
max_hp += (random_level - level) * 20;
|
// pre-pop seems to scale by 20 HP increments while newer by 100
|
||||||
base_hp += (random_level - level) * 20;
|
// We also don't want 100 increments on newer noobie zones, check level
|
||||||
} else {
|
if (zone->GetZoneID() < 200 || level < 48) {
|
||||||
max_hp += (random_level - level) * 100;
|
max_hp += (random_level - level) * 20;
|
||||||
base_hp += (random_level - level) * 100;
|
base_hp += (random_level - level) * 20;
|
||||||
|
} else {
|
||||||
|
max_hp += (random_level - level) * 100;
|
||||||
|
base_hp += (random_level - level) * 100;
|
||||||
|
}
|
||||||
|
|
||||||
|
current_hp = max_hp;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Don't add max_dmg to dynamically scaled NPCs since this will be calculated later
|
||||||
|
if (max_dmg > 0 || skip_auto_scale)
|
||||||
|
{
|
||||||
|
max_dmg += (random_level - level) * 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
current_hp = max_hp;
|
|
||||||
max_dmg += (random_level - level) * 2;
|
|
||||||
} else {
|
} else {
|
||||||
uint8 scale_adjust = 1;
|
uint8 scale_adjust = 1;
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user