diff --git a/zone/bot.cpp b/zone/bot.cpp index b221620e2..143520076 100644 --- a/zone/bot.cpp +++ b/zone/bot.cpp @@ -439,6 +439,7 @@ NPCType *Bot::FillNPCTypeStruct(uint32 botSpellsID, std::string botName, std::st bot_npc_type->skip_global_loot = true; //bot_npc_type->rare_spawn = false; bot_npc_type->stuck_behavior = Ground; + bot_npc_type->skip_auto_scale = true; return bot_npc_type; } diff --git a/zone/npc.cpp b/zone/npc.cpp index ac8825774..355196d2e 100644 --- a/zone/npc.cpp +++ b/zone/npc.cpp @@ -239,6 +239,7 @@ NPC::NPC(const NPCType *npc_type_data, Spawn2 *in_respawn, const glm::vec4 &posi p_depop = false; loottable_id = npc_type_data->loottable_id; skip_global_loot = npc_type_data->skip_global_loot; + skip_auto_scale = npc_type_data->skip_auto_scale; rare_spawn = npc_type_data->rare_spawn; no_target_hotkey = npc_type_data->no_target_hotkey; primary_faction = 0; diff --git a/zone/npc.h b/zone/npc.h index b9e0458e6..1957b8e63 100644 --- a/zone/npc.h +++ b/zone/npc.h @@ -468,6 +468,7 @@ public: virtual int GetStuckBehavior() const { return NPCTypedata_ours ? NPCTypedata_ours->stuck_behavior : NPCTypedata->stuck_behavior; } + inline bool IsSkipAutoScale() const { return skip_auto_scale; } protected: @@ -612,6 +613,7 @@ protected: private: uint32 loottable_id; bool skip_global_loot; + bool skip_auto_scale; bool p_depop; }; diff --git a/zone/npc_scale_manager.cpp b/zone/npc_scale_manager.cpp index dd1b9734d..c17619482 100644 --- a/zone/npc_scale_manager.cpp +++ b/zone/npc_scale_manager.cpp @@ -26,6 +26,9 @@ */ void NpcScaleManager::ScaleNPC(NPC * npc) { + if (npc->IsSkipAutoScale()) + return; + int8 npc_type = GetNPCScalingType(npc); int npc_level = npc->GetLevel(); bool is_auto_scaled = IsAutoScaled(npc); @@ -621,4 +624,4 @@ bool NpcScaleManager::ApplyGlobalBaseScalingToNPCDynamically(NPC *&npc) auto results = database.QueryDatabase(query); return results.Success(); -} \ No newline at end of file +} diff --git a/zone/zonedb.cpp b/zone/zonedb.cpp index e3adc6d13..76e3a4c5c 100755 --- a/zone/zonedb.cpp +++ b/zone/zonedb.cpp @@ -2675,6 +2675,7 @@ const NPCType* ZoneDatabase::LoadNPCTypesData(uint32 npc_type_id, bool bulk_load temp_npctype_data->rare_spawn = atoi(row[108]) != 0; temp_npctype_data->stuck_behavior = atoi(row[109]); temp_npctype_data->use_model = atoi(row[110]); + temp_npctype_data->skip_auto_scale = false; // hardcoded here for now // If NPC with duplicate NPC id already in table, // free item we attempted to add. @@ -2878,6 +2879,7 @@ const NPCType* ZoneDatabase::GetMercType(uint32 id, uint16 raceid, uint32 client tmpNPCType->spellscale = atoi(row[44]); tmpNPCType->healscale = atoi(row[45]); tmpNPCType->skip_global_loot = true; + tmpNPCType->skip_auto_scale = true; // If Merc with duplicate NPC id already in table, // free item we attempted to add. diff --git a/zone/zonedump.h b/zone/zonedump.h index be978a1be..71f530171 100644 --- a/zone/zonedump.h +++ b/zone/zonedump.h @@ -143,6 +143,7 @@ struct NPCType bool untargetable; bool skip_global_loot; bool rare_spawn; + bool skip_auto_scale; // just so it doesn't mess up bots or mercs, probably should add to DB too just in case int8 stuck_behavior; uint16 use_model; };