importing changes from callmephil repo

a special thanks to him
This commit is contained in:
Yehonal
2016-06-26 19:22:35 +02:00
parent 5bb70a86be
commit 52f305111c
49 changed files with 4333 additions and 3252 deletions

View File

@@ -260,7 +260,8 @@ public:
return false;
}
uint32 vendor_entry = vendor ? vendor->GetEntry() : 0;
char* addMulti = strtok(NULL, " ");
uint32 vendor_entry = addMulti ? handler->GetSession()->GetCurrentVendor() : vendor ? vendor->GetEntry() : 0;
if (!sObjectMgr->IsVendorItemValid(vendor_entry, itemId, maxcount, incrtime, extendedcost, handler->GetSession()->GetPlayer()))
{
@@ -483,7 +484,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);