Fixed dynamic merchant list loading. Allows any merchant to be used in any zone.

This commit is contained in:
Trevius 2014-11-06 21:41:51 -06:00
parent f81f8ea5d6
commit b4e4d94061
2 changed files with 5 additions and 3 deletions

View File

@ -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)

View File

@ -445,7 +445,7 @@ void Zone::LoadNewMerchantData(uint32 merchantid) {
std::list<MerchantList> 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);
}