mirror of
https://github.com/EQEmu/Server.git
synced 2026-11-23 08:47:16 +00:00
Adds new column to 'merchantlist' table.
Adds 'probability' after 'classes_required', valid values are 0 to 100.
This commit is contained in:
1 parent
5946af88a6
commit
8b19c76e89
10 files changed
+80
-7
No files matched your search
@@ -983,17 +983,18 @@ void Client::BulkSendMerchantInventory(int merchant_id, int npcid) {
|
||||
uint8 handychance = 0;
|
||||
for (itr = merlist.begin(); itr != merlist.end() && i < numItemSlots; ++itr) {
|
||||
MerchantList ml = *itr;
|
||||
if(GetLevel() < ml.level_required) {
|
||||
if (merch->CastToNPC()->GetMerchantProbability() > ml.probability)
|
||||
continue;
|
||||
|
||||
if(GetLevel() < ml.level_required)
|
||||
continue;
|
||||
}
|
||||
|
||||
if (!(ml.classes_required & (1 << (GetClass() - 1))))
|
||||
continue;
|
||||
|
||||
int32 fac = merch ? merch->GetPrimaryFaction() : 0;
|
||||
if(fac != 0 && GetModCharacterFactionLevel(fac) < ml.faction_required) {
|
||||
if(fac != 0 && GetModCharacterFactionLevel(fac) < ml.faction_required)
|
||||
continue;
|
||||
}
|
||||
|
||||
handychance = MakeRandomInt(0, merlist.size() + tmp_merlist.size() - 1 );
|
||||
|
||||
|
||||
Reference in new issue
Block a user