mirror of
https://github.com/EQEmu/Server.git
synced 2025-12-11 16:51:29 +00:00
Add a hard off for NPC scaling for Merc/Bot
They don't need it. We may want to add this to actually be in the DB for normal NPCs in the future.
This commit is contained in:
parent
4627bfe271
commit
290133803e
@ -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;
|
||||
}
|
||||
|
||||
@ -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;
|
||||
|
||||
@ -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;
|
||||
};
|
||||
|
||||
|
||||
@ -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();
|
||||
}
|
||||
}
|
||||
|
||||
@ -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.
|
||||
|
||||
@ -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;
|
||||
};
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user