mirror of
https://github.com/EQEmu/Server.git
synced 2026-05-31 09:06:46 +00:00
[Scaling] Add support for zone ID and instance version to NPC Scaling (#2968)
* [Scaling] Add support for zone ID and instance version to NPC Scaling # Notes - Adds `zone_id` and `instance_version` to `npc_scale_global_base` table to allow for zone and version-specific scaling. - Defaults back to `zone_id` of `0` and `instance_version` of `0` for global scaling. - Scaling load precedence is as follows: - `zone_id` of current zone and `instance_version` of current instance - `zone_id` of current zone and `instance_version` of `0` - `zone_id` of `0` and `instance_version` of `0` * Remove debug comment. * Use zone not NPC. * SQL
This commit is contained in:
+38
-29
@@ -22,37 +22,41 @@
|
||||
#define EQEMU_NPC_SCALE_MANAGER_H
|
||||
|
||||
#include "npc.h"
|
||||
#include "zone.h"
|
||||
extern Zone* zone;
|
||||
|
||||
class NpcScaleManager {
|
||||
public:
|
||||
struct global_npc_scale {
|
||||
int type;
|
||||
int level;
|
||||
int ac;
|
||||
int64 hp;
|
||||
int accuracy;
|
||||
int slow_mitigation;
|
||||
int attack;
|
||||
int strength;
|
||||
int stamina;
|
||||
int dexterity;
|
||||
int agility;
|
||||
int intelligence;
|
||||
int wisdom;
|
||||
int charisma;
|
||||
int magic_resist;
|
||||
int cold_resist;
|
||||
int fire_resist;
|
||||
int poison_resist;
|
||||
int disease_resist;
|
||||
int corruption_resist;
|
||||
int physical_resist;
|
||||
int min_dmg;
|
||||
int max_dmg;
|
||||
int64 hp_regen_rate;
|
||||
int attack_delay;
|
||||
int spell_scale;
|
||||
int heal_scale;
|
||||
int8 type;
|
||||
uint8 level;
|
||||
uint32 zone_id;
|
||||
uint16 instance_version;
|
||||
int ac;
|
||||
int64 hp;
|
||||
int accuracy;
|
||||
int slow_mitigation;
|
||||
int attack;
|
||||
int strength;
|
||||
int stamina;
|
||||
int dexterity;
|
||||
int agility;
|
||||
int intelligence;
|
||||
int wisdom;
|
||||
int charisma;
|
||||
int magic_resist;
|
||||
int cold_resist;
|
||||
int fire_resist;
|
||||
int poison_resist;
|
||||
int disease_resist;
|
||||
int corruption_resist;
|
||||
int physical_resist;
|
||||
int min_dmg;
|
||||
int max_dmg;
|
||||
int64 hp_regen_rate;
|
||||
int attack_delay;
|
||||
int spell_scale;
|
||||
int heal_scale;
|
||||
|
||||
std::string special_abilities;
|
||||
};
|
||||
@@ -91,9 +95,14 @@ public:
|
||||
bool IsAutoScaled(NPC* npc);
|
||||
bool LoadScaleData();
|
||||
|
||||
global_npc_scale GetGlobalScaleDataForTypeLevel(int8 npc_type, int npc_level);
|
||||
global_npc_scale GetGlobalScaleDataForTypeLevel(
|
||||
int8 npc_type,
|
||||
uint8 npc_level,
|
||||
uint32 zone_id,
|
||||
uint16 instance_version
|
||||
);
|
||||
|
||||
std::map<std::pair<int, int>, global_npc_scale> npc_global_base_scaling_data;
|
||||
std::map<std::tuple<int8, uint8, uint32, uint16>, global_npc_scale> npc_global_base_scaling_data;
|
||||
|
||||
int8 GetNPCScalingType(NPC * &npc);
|
||||
std::string GetNPCScalingTypeName(NPC * &npc);
|
||||
|
||||
Reference in New Issue
Block a user