mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-16 02:20:27 +00:00
feat(Core/SendListInventory): Add multivendor function (#3172)
This commit is contained in:
committed by
GitHub
parent
07c9debb0d
commit
5d284f02a7
@@ -295,7 +295,8 @@ public:
|
||||
return false;
|
||||
}
|
||||
|
||||
uint32 vendor_entry = vendor->GetEntry();
|
||||
char* addMulti = strtok(nullptr, " ");
|
||||
uint32 vendor_entry = addMulti ? handler->GetSession()->GetCurrentVendor() : vendor->GetEntry();
|
||||
|
||||
if (!sObjectMgr->IsVendorItemValid(vendor_entry, itemId, maxcount, incrtime, extendedcost, handler->GetSession()->GetPlayer()))
|
||||
{
|
||||
@@ -518,7 +519,8 @@ public:
|
||||
}
|
||||
uint32 itemId = atol(pitem);
|
||||
|
||||
if (!sObjectMgr->RemoveVendorItem(vendor->GetEntry(), itemId))
|
||||
char* addMulti = strtok(NULL, " ");
|
||||
if (!sObjectMgr->RemoveVendorItem(addMulti ? handler->GetSession()->GetCurrentVendor() : vendor->GetEntry(), itemId))
|
||||
{
|
||||
handler->PSendSysMessage(LANG_ITEM_NOT_IN_LIST, itemId);
|
||||
handler->SetSentErrorMessage(true);
|
||||
|
||||
Reference in New Issue
Block a user