mirror of
https://github.com/EQEmu/Server.git
synced 2026-06-10 15:00:25 +00:00
[Merchants] Add New Classic Greed/Faction/Charisma Prices Rule (#4301)
* [Merchants] Add New Classic Greed/Faction/Charisma Prices Rule
* Fix size of greed field.
* Fix { formatting and add {} to one liners
* Fix return type of GetGreedPercent
* Remove code that slipped in from another patch
* Fix greed to be unsigned
* Update client.cpp
* Update client_packet.cpp
* Update client.cpp
Fix bad name in extra log message added manually from merge.
* Update client_packet.cpp
Spacing.
* Update client.cpp
---------
Co-authored-by: Kinglykrab <kinglykrab@gmail.com>
This commit is contained in:
+12
-2
@@ -902,9 +902,14 @@ void Client::BulkSendMerchantInventory(int merchant_id, int npcid) {
|
||||
|
||||
auto inst = database.CreateItem(item, charges);
|
||||
if (inst) {
|
||||
auto item_price = static_cast<uint32>(item->Price * RuleR(Merchant, SellCostMod) * item->SellRate);
|
||||
auto item_price = static_cast<uint32>(item->Price * item->SellRate);
|
||||
auto item_charges = charges ? charges : 1;
|
||||
|
||||
// Don't use SellCostMod if using UseClassicPriceMod
|
||||
if (!RuleB(Merchant, UseClassicPriceMod)) {
|
||||
item_price *= RuleR(Merchant, SellCostMod);
|
||||
}
|
||||
|
||||
if (RuleB(Merchant, UsePriceMod)) {
|
||||
item_price *= Client::CalcPriceMod(npc);
|
||||
}
|
||||
@@ -948,9 +953,14 @@ void Client::BulkSendMerchantInventory(int merchant_id, int npcid) {
|
||||
auto charges = item->MaxCharges;
|
||||
auto inst = database.CreateItem(item, charges);
|
||||
if (inst) {
|
||||
auto item_price = static_cast<uint32>(item->Price * RuleR(Merchant, SellCostMod) * item->SellRate);
|
||||
auto item_price = static_cast<uint32>(item->Price * item->SellRate);
|
||||
auto item_charges = charges ? charges : 1;
|
||||
|
||||
// Don't use SellCostMod if using UseClassicPriceMod
|
||||
if (!RuleB(Merchant, UseClassicPriceMod)) {
|
||||
item_price *= RuleR(Merchant, SellCostMod);
|
||||
}
|
||||
|
||||
if (RuleB(Merchant, UsePriceMod)) {
|
||||
item_price *= Client::CalcPriceMod(npc);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user