Added support for merchant item filtering by class

Added column classes_required to merchantlist to allow
the merchant to only sell items to specified classes

Ex. (only example I know from live) To only allow poison supplies
to be sell able to only rogues, you would set classes_required
to 256.
classes_required defaults to 65535 (all/any class)

Remember to run the new SQL!
This commit is contained in:
Michael Cook (mackal)
2013-12-26 16:29:09 -05:00
parent 30e8eac46e
commit 13fcccefd5
5 changed files with 17 additions and 4 deletions
+3
View File
@@ -984,6 +984,9 @@ void Client::BulkSendMerchantInventory(int merchant_id, int npcid) {
continue;
}
if (!(ml.classes_required & (1 << (GetClass() - 1))))
continue;
int32 fac = merch ? merch->GetPrimaryFaction() : 0;
if(fac != 0 && GetModCharacterFactionLevel(fac) < ml.faction_required) {
continue;