From 7b5ea9e99c461b8243e724906e4bb2d352288a1b Mon Sep 17 00:00:00 2001 From: Paul Coene Date: Sun, 9 Oct 2016 10:22:55 -0400 Subject: [PATCH 1/3] Fix rogue merchant usage under sneak. --- changelog.txt | 5 +++++ zone/client_process.cpp | 12 +++++++++++- 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/changelog.txt b/changelog.txt index 73be04468..a0339ee08 100644 --- a/changelog.txt +++ b/changelog.txt @@ -1,5 +1,10 @@ EQEMu Changelog (Started on Sept 24, 2003 15:50) ------------------------------------------------------- +== 10/09/2016 == +Noudess: Rogue usage of merchants while utilizing sneak was limited to +temporary items, as the code that checked faction per item sold did not +take into account that rogue was sneaking. Now sneaking rogues can see full +inventory on merchants (well, unless an item requires a + faction value). == 09/12/2016 == Akkadius: Massive overhaul of the update system and EQEmu Server management utility framework (known as eqemu_update.pl) now known as eqemu_server.pl diff --git a/zone/client_process.cpp b/zone/client_process.cpp index e1a769743..9e7b230d7 100644 --- a/zone/client_process.cpp +++ b/zone/client_process.cpp @@ -857,7 +857,17 @@ 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); From c263c4ef07d6ae1d73791c12fc272efe59e03561 Mon Sep 17 00:00:00 2001 From: Paul Coene Date: Sun, 9 Oct 2016 11:12:09 -0400 Subject: [PATCH 2/3] 2nd check for faction not needed - had to either check for sneaking again or remove un-needed 2nd check. --- zone/client_packet.cpp | 5 ----- 1 file changed, 5 deletions(-) diff --git a/zone/client_packet.cpp b/zone/client_packet.cpp index fa253664b..6fc45fee0 100644 --- a/zone/client_packet.cpp +++ b/zone/client_packet.cpp @@ -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; From 56babc18012982e6097f78d91fbedc691c80f9f6 Mon Sep 17 00:00:00 2001 From: Akkadius Date: Sat, 15 Oct 2016 14:54:57 -0500 Subject: [PATCH 3/3] Update client_process.cpp --- zone/client_process.cpp | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/zone/client_process.cpp b/zone/client_process.cpp index 9e7b230d7..407343419 100644 --- a/zone/client_process.cpp +++ b/zone/client_process.cpp @@ -858,14 +858,12 @@ void Client::BulkSendMerchantInventory(int merchant_id, int npcid) { int32 fac = merch ? merch->GetPrimaryFaction() : 0; int32 cur_fac_level; - if (fac == 0 || sneaking) - { + if (fac == 0 || sneaking) { cur_fac_level = 0; - } - else - { + } + else { cur_fac_level = GetModCharacterFactionLevel(fac); - } + } if (cur_fac_level < ml.faction_required) continue;