Migrate getZoneX calls and npc types calls [skip ci]

This commit is contained in:
Akkadius
2020-03-12 02:27:09 -05:00
parent b22d8f6148
commit ca49f3902f
25 changed files with 181 additions and 181 deletions
+2 -2
View File
@@ -4757,7 +4757,7 @@ Merc* Merc::LoadMerc(Client *c, MercTemplate* merc_template, uint32 merchant_id,
if(merc_template)
{
//TODO: Maybe add a way of updating client merc stats in a seperate function? like, for example, on leveling up.
const NPCType* npc_type_to_copy = database.GetMercType(merc_template->MercNPCID, merc_template->RaceID, c->GetLevel());
const NPCType* npc_type_to_copy = content_db.GetMercType(merc_template->MercNPCID, merc_template->RaceID, c->GetLevel());
if(npc_type_to_copy != nullptr)
{
//This is actually a very terrible method of assigning stats, and should be changed at some point. See the comment in merc's deconstructor.
@@ -4886,7 +4886,7 @@ void Merc::UpdateMercStats(Client *c, bool setmax)
if (c->GetMercInfo().MercTemplateID > 0) {
Log(Logs::General, Logs::Mercenaries, "Updating Mercenary Stats for %s (%s).", GetName(),
c->GetName());
const NPCType *npc_type = database.GetMercType(
const NPCType *npc_type = content_db.GetMercType(
zone->GetMercTemplate(c->GetMercInfo().MercTemplateID)->MercNPCID, GetRace(), c->GetLevel());
if (npc_type) {
max_hp = npc_type->max_hp;