mirror of
https://github.com/EQEmu/Server.git
synced 2026-06-10 19:10:25 +00:00
[Quest API] Add Override Parameters to ScaleNPC() in Perl/Lua. (#2816)
# Perl - Add `$npc->ScaleNPC(level, always_scale_stats)`. - Add `$npc->ScaleNPC(level, always_scale_stats, always_scale_special_abilities)`. # Lua - Add `npc:ScaleNPC(level, always_scale_stats)`. - Add `npc:ScaleNPC(level, always_scale_stats, always_scale_special_abilities)`. # Notes - Allows operators to not have to set stats to 0 in order for scaling to kick in when scripting. - Special ability override is separate in case you don't want to override some inherent special abilities the NPC has from a script or otherwise.
This commit is contained in:
+2
-2
@@ -3691,7 +3691,7 @@ void NPC::ReloadSpells() {
|
||||
AI_AddNPCSpellsEffects(GetNPCSpellsEffectsID());
|
||||
}
|
||||
|
||||
void NPC::ScaleNPC(uint8 npc_level) {
|
||||
void NPC::ScaleNPC(uint8 npc_level, bool always_scale_stats, bool always_scale_special_abilities) {
|
||||
if (GetLevel() != npc_level) {
|
||||
SetLevel(npc_level);
|
||||
RecalculateSkills();
|
||||
@@ -3699,7 +3699,7 @@ void NPC::ScaleNPC(uint8 npc_level) {
|
||||
}
|
||||
|
||||
npc_scale_manager->ResetNPCScaling(this);
|
||||
npc_scale_manager->ScaleNPC(this);
|
||||
npc_scale_manager->ScaleNPC(this, always_scale_stats, always_scale_special_abilities);
|
||||
}
|
||||
|
||||
bool NPC::IsGuard()
|
||||
|
||||
Reference in New Issue
Block a user