Merge branch 'merchantfixes' of TesterOrg/EQ2EMuTestBranch into master
Appreciate the fix, 0xFF is ok for server side, client needs 0xFFFF for certain quantity fields to blank out the quantity I guess is the difference to note.
This commit is contained in:
commit
81491f4b33
2 changed files with 5 additions and 5 deletions
EQ2/source/WorldServer
|
@ -1225,7 +1225,7 @@ int32 World::GetInventoryID(int32 merchant_id, int32 item_id){
|
|||
|
||||
void World::DecreaseMerchantQuantity(int32 merchant_id, int32 item_id, int16 amount){
|
||||
int16 total_left = GetMerchantItemQuantity(merchant_id, item_id);
|
||||
if(total_left > 0 && total_left < 0xFFFF){
|
||||
if(total_left > 0 && total_left < 0xFF){
|
||||
int32 inventory_id = GetInventoryID(merchant_id, item_id);
|
||||
if(inventory_id > 0){
|
||||
MMerchantList.lock();
|
||||
|
@ -2478,4 +2478,4 @@ Map* World::GetMap(std::string zoneFile, int32 client_version)
|
|||
|
||||
MWorldMaps.releasereadlock();
|
||||
return nullptr;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -6621,7 +6621,7 @@ void Client::BuyItem(int32 item_id, int16 quantity) {
|
|||
Message(CHANNEL_MERCHANT_BUY_SELL, "You buy %s from %s for%s.", master_item->CreateItemLink(GetVersion()).c_str(), spawn->GetName(), GetCoinMessage(total_buy_price).c_str());
|
||||
AddItem(item);
|
||||
CheckPlayerQuestsItemUpdate(item);
|
||||
if (item && total_available < 0xFFFF) {
|
||||
if (item && total_available < 0xFF) {
|
||||
world.DecreaseMerchantQuantity(spawn->GetMerchantID(), item_id, quantity);
|
||||
SendBuyMerchantList();
|
||||
}
|
||||
|
@ -6719,7 +6719,7 @@ void Client::BuyItem(int32 item_id, int16 quantity) {
|
|||
Message(CHANNEL_MERCHANT_BUY_SELL, "You buy %s from %s for%s.", master_item->CreateItemLink(GetVersion()).c_str(), spawn->GetName(), GetCoinMessage(ItemInfo->price_coins * quantity).c_str());
|
||||
AddItem(item);
|
||||
CheckPlayerQuestsItemUpdate(item);
|
||||
if (item && total_available < 0xFFFF) {
|
||||
if (item && total_available < 0xFF) {
|
||||
world.DecreaseMerchantQuantity(spawn->GetMerchantID(), item_id, quantity);
|
||||
SendBuyMerchantList();
|
||||
}
|
||||
|
@ -10278,4 +10278,4 @@ void Client::AwardCoins(int64 total_coins, std::string reason)
|
|||
int8 type = CHANNEL_LOOT;
|
||||
SimpleMessage(type, message.c_str());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue