mirror of
https://github.com/EQEmu/Server.git
synced 2026-02-22 06:22:28 +00:00
Fix scaling and display for cor / phr
This commit is contained in:
parent
79d8a6329c
commit
660416065e
@ -189,11 +189,11 @@ inline std::string GetMobAttributeByString(Mob *mob, const std::string &attribut
|
||||
}
|
||||
|
||||
if (attribute == "cor") {
|
||||
return std::to_string(mob->GetCorrup());
|
||||
return commify(std::to_string(mob->GetCorrup())) + scaling_modified;
|
||||
}
|
||||
|
||||
if (attribute == "phy") {
|
||||
return std::to_string(mob->GetPhR());
|
||||
return commify(std::to_string(mob->GetPhR())) + scaling_modified;
|
||||
}
|
||||
|
||||
if (attribute == "name") {
|
||||
|
||||
@ -2215,6 +2215,14 @@ void NPC::ModifyNPCStat(const char *identifier, const char *new_value)
|
||||
CR = atoi(val.c_str());
|
||||
return;
|
||||
}
|
||||
else if (id == "cor") {
|
||||
Corrup = atoi(val.c_str());
|
||||
return;
|
||||
}
|
||||
else if (id == "phr") {
|
||||
PhR = atoi(val.c_str());
|
||||
return;
|
||||
}
|
||||
else if (id == "pr") {
|
||||
PR = atoi(val.c_str());
|
||||
return;
|
||||
|
||||
@ -98,10 +98,10 @@ void NpcScaleManager::ScaleNPC(NPC * npc)
|
||||
npc->ModifyNPCStat("dr", std::to_string(scale_data.disease_resist).c_str());
|
||||
}
|
||||
if (npc->GetCorrup() == 0) {
|
||||
npc->ModifyNPCStat("cr", std::to_string(scale_data.corruption_resist).c_str());
|
||||
npc->ModifyNPCStat("cor", std::to_string(scale_data.corruption_resist).c_str());
|
||||
}
|
||||
if (npc->GetPhR() == 0) {
|
||||
npc->ModifyNPCStat("pr", std::to_string(scale_data.physical_resist).c_str());
|
||||
npc->ModifyNPCStat("phr", std::to_string(scale_data.physical_resist).c_str());
|
||||
}
|
||||
if (npc->GetMinDMG() == 0 && npc->GetMaxDMG() == 0) {
|
||||
int min_dmg = scale_data.min_dmg;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user