From a6b57a3423d81a840dafff6077d142792b6f9cbc Mon Sep 17 00:00:00 2001 From: Arthur Ice Date: Thu, 4 Sep 2014 15:32:41 -0700 Subject: [PATCH] Moved updating npc type appearance command case (2) from NPCSpawnDB into method UpdateNPCTypeAppearance --- zone/npc.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/zone/npc.cpp b/zone/npc.cpp index 98fac2948..f4dfe072d 100644 --- a/zone/npc.cpp +++ b/zone/npc.cpp @@ -1127,9 +1127,10 @@ uint32 ZoneDatabase::UpdateNPCTypeAppearance(uint8 command, const char* zone, ui uint32 tmp = 0; uint32 tmp2 = 0; uint32 last_insert_id = 0; + if (!RunQuery(query, MakeAnyLenString(&query, "UPDATE npc_types SET name=\"%s\", level=%i, race=%i, class=%i, hp=%i, gender=%i, texture=%i, helmtexture=%i, size=%i, loottable_id=%i, merchant_id=%i, face=%i, WHERE id=%i", spawn->GetName(), spawn->GetLevel(), spawn->GetRace(), spawn->GetClass(), spawn->GetMaxHP(), spawn->GetGender(), spawn->GetTexture(), spawn->GetHelmTexture(), spawn->GetSize(), spawn->GetLoottableID(), spawn->MerchantType, spawn->GetNPCTypeID()), errbuf, 0)) { - if(c) - c->LogSQL(query); + if(client) + client->LogSQL(query); safe_delete_array(query); return true; }