Merge pull request #562 from noudess/master

Fix rogue merchant usage under sneak.
This commit is contained in:
Akkadius
2016-10-15 14:55:28 -05:00
committed by GitHub
3 changed files with 14 additions and 6 deletions
-5
View File
@@ -12134,11 +12134,6 @@ void Client::Handle_OP_ShopPlayerBuy(const EQApplicationPacket *app)
continue;
}
int32 fac = tmp->GetPrimaryFaction();
if (fac != 0 && GetModCharacterFactionLevel(fac) < ml.faction_required) {
continue;
}
if (mp->itemslot == ml.slot){
item_id = ml.item;
break;
+9 -1
View File
@@ -857,7 +857,15 @@ void Client::BulkSendMerchantInventory(int merchant_id, int npcid) {
continue;
int32 fac = merch ? merch->GetPrimaryFaction() : 0;
if (fac != 0 && GetModCharacterFactionLevel(fac) < ml.faction_required)
int32 cur_fac_level;
if (fac == 0 || sneaking) {
cur_fac_level = 0;
}
else {
cur_fac_level = GetModCharacterFactionLevel(fac);
}
if (cur_fac_level < ml.faction_required)
continue;
handychance = zone->random.Int(0, merlist.size() + tmp_merlist.size() - 1);