mirror of
https://github.com/EQEmu/Server.git
synced 2025-12-12 13:41:31 +00:00
[REBASE] Barter was allowing the purchase of bags. Bags could contain anything and it would be traded.
This commit is contained in:
parent
de5b7f472d
commit
789cfb2490
@ -2648,6 +2648,11 @@ void Client::SellToBuyer(const EQApplicationPacket *app) {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(item->IsClassBag()) {
|
||||||
|
Message(Chat::Red, "That item is a Bag.");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if(!item->Stackable) {
|
if(!item->Stackable) {
|
||||||
|
|
||||||
for(uint32 i = 0; i < Quantity; i++) {
|
for(uint32 i = 0; i < Quantity; i++) {
|
||||||
@ -3001,29 +3006,27 @@ void Client::UpdateBuyLine(const EQApplicationPacket *app) {
|
|||||||
LogTrading("UpdateBuyLine: Char: [{}] BuySlot: [{}] ItemID [{}] [{}] Quantity [{}] Toggle: [{}] Price [{}] ItemCount [{}] LoreConflict [{}]",
|
LogTrading("UpdateBuyLine: Char: [{}] BuySlot: [{}] ItemID [{}] [{}] Quantity [{}] Toggle: [{}] Price [{}] ItemCount [{}] LoreConflict [{}]",
|
||||||
GetName(), BuySlot, ItemID, item->Name, Quantity, ToggleOnOff, Price, ItemCount, LoreConflict);
|
GetName(), BuySlot, ItemID, item->Name, Quantity, ToggleOnOff, Price, ItemCount, LoreConflict);
|
||||||
|
|
||||||
if((item->NoDrop != 0) && !LoreConflict && (Quantity > 0) && HasMoney(Quantity * Price) && ToggleOnOff && (ItemCount == 0)) {
|
if((item->NoDrop != 0) && (!item->IsClassBag())&& !LoreConflict && (Quantity > 0) && HasMoney(Quantity * Price) && ToggleOnOff && (ItemCount == 0)) {
|
||||||
LogTrading("Adding to database");
|
LogTrading("Adding to database");
|
||||||
database.AddBuyLine(CharacterID(), BuySlot, ItemID, ItemName, Quantity, Price);
|
database.AddBuyLine(CharacterID(), BuySlot, ItemID, ItemName, Quantity, Price);
|
||||||
QueuePacket(app);
|
QueuePacket(app);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
if(ItemCount > 0)
|
if(ItemCount > 0) {
|
||||||
Message(Chat::Red, "Buy line %s disabled as Item Compensation is not currently supported.", ItemName);
|
Message(Chat::Red, "Buy line %s disabled as Item Compensation is not currently supported.", ItemName);
|
||||||
|
} else if(Quantity <= 0) {
|
||||||
else if(Quantity <= 0)
|
|
||||||
Message(Chat::Red, "Buy line %s disabled as the quantity is invalid.", ItemName);
|
Message(Chat::Red, "Buy line %s disabled as the quantity is invalid.", ItemName);
|
||||||
|
} else if(LoreConflict) {
|
||||||
else if(LoreConflict)
|
|
||||||
Message(Chat::Red, "Buy line %s disabled as the item is LORE and you have one already.", ItemName);
|
Message(Chat::Red, "Buy line %s disabled as the item is LORE and you have one already.", ItemName);
|
||||||
|
} else if(item->NoDrop == 0) {
|
||||||
else if(item->NoDrop == 0)
|
|
||||||
Message(Chat::Red, "Buy line %s disabled as the item is NODROP.", ItemName);
|
Message(Chat::Red, "Buy line %s disabled as the item is NODROP.", ItemName);
|
||||||
|
} else if(item->IsClassBag()) {
|
||||||
else if(ToggleOnOff)
|
Message(Chat::Red, "Buy line %s disabled as the item is a Bag.", ItemName);
|
||||||
|
} else if(ToggleOnOff) {
|
||||||
Message(Chat::Red, "Buy line %s disabled due to insufficient funds.", ItemName);
|
Message(Chat::Red, "Buy line %s disabled due to insufficient funds.", ItemName);
|
||||||
|
} else {
|
||||||
else
|
|
||||||
database.RemoveBuyLine(CharacterID(), BuySlot);
|
database.RemoveBuyLine(CharacterID(), BuySlot);
|
||||||
|
}
|
||||||
|
|
||||||
auto outapp = new EQApplicationPacket(OP_Barter, 936);
|
auto outapp = new EQApplicationPacket(OP_Barter, 936);
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user