From b4e4d94061f051ded35a19649daaca12d06b8523 Mon Sep 17 00:00:00 2001 From: Trevius Date: Thu, 6 Nov 2014 21:41:51 -0600 Subject: [PATCH] Fixed dynamic merchant list loading. Allows any merchant to be used in any zone. --- changelog.txt | 1 + zone/zone.cpp | 7 ++++--- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/changelog.txt b/changelog.txt index 8d2670b3c..f5b75ff98 100644 --- a/changelog.txt +++ b/changelog.txt @@ -2,6 +2,7 @@ EQEMu Changelog (Started on Sept 24, 2003 15:50) ------------------------------------------------------- == 11/06/2014 == demonstar55: Tracking default sort will now be correct order +Trevius: Fixed dynamic merchant list loading. Allows any merchant to be used in any zone. == 11/03/2014 == Secrets: Fixed an overflow in melee lifetap calculations (int16 vs int32) diff --git a/zone/zone.cpp b/zone/zone.cpp index 476a61f2a..add9e7c6e 100644 --- a/zone/zone.cpp +++ b/zone/zone.cpp @@ -445,7 +445,7 @@ void Zone::LoadNewMerchantData(uint32 merchantid) { std::list merlist; std::string query = StringFormat("SELECT item, slot, faction_required, level_required, alt_currency_cost, " - "classes_required FROM merchantlist WHERE merchantid=%d ORDER BY slot", merchantid); + "classes_required, probability FROM merchantlist WHERE merchantid=%d ORDER BY slot", merchantid); auto results = database.QueryDatabase(query); if (!results.Success()) { LogFile->write(EQEMuLog::Error, "Error in LoadNewMerchantData query '%s' %s", query.c_str(), results.ErrorMessage().c_str()); @@ -459,8 +459,9 @@ void Zone::LoadNewMerchantData(uint32 merchantid) { ml.slot = atoul(row[1]); ml.faction_required = atoul(row[2]); ml.level_required = atoul(row[3]); - ml.alt_currency_cost = atoul(row[3]); - ml.classes_required = atoul(row[4]); + ml.alt_currency_cost = atoul(row[4]); + ml.classes_required = atoul(row[5]); + ml.probability = atoul(row[6]); merlist.push_back(ml); }