mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-03-02 23:37:47 +00:00
fix(Core/ObjectMgr): update npc_vendor.maxcount to u32 from u8 (#24685)
This commit is contained in:
@@ -0,0 +1,8 @@
|
|||||||
|
--
|
||||||
|
-- uint8 to uint32 conversion for maxcount in npc_vendor
|
||||||
|
-- game_event_npc_vendor does not need to be updated
|
||||||
|
ALTER TABLE `npc_vendor` MODIFY COLUMN `maxcount` int unsigned DEFAULT 0 NOT NULL;
|
||||||
|
|
||||||
|
DELETE FROM `npc_vendor` WHERE (`entry` = 29561) AND (`item` IN (21177));
|
||||||
|
INSERT INTO `npc_vendor` (`entry`, `slot`, `item`, `maxcount`, `incrtime`, `ExtendedCost`, `VerifiedBuild`) VALUES
|
||||||
|
(29561, 0, 21177, 300, 600, 0, 0);
|
||||||
@@ -9799,7 +9799,7 @@ int ObjectMgr::LoadReferenceVendor(int32 vendor, int32 item, std::set<uint32>* s
|
|||||||
count += LoadReferenceVendor(vendor, -item_id, skip_vendors);
|
count += LoadReferenceVendor(vendor, -item_id, skip_vendors);
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
int32 maxcount = fields[1].Get<uint8>();
|
uint32 maxcount = fields[1].Get<uint32>();
|
||||||
uint32 incrtime = fields[2].Get<uint32>();
|
uint32 incrtime = fields[2].Get<uint32>();
|
||||||
uint32 ExtendedCost = fields[3].Get<uint32>();
|
uint32 ExtendedCost = fields[3].Get<uint32>();
|
||||||
|
|
||||||
@@ -9849,7 +9849,7 @@ void ObjectMgr::LoadVendors()
|
|||||||
count += LoadReferenceVendor(entry, -item_id, &skip_vendors);
|
count += LoadReferenceVendor(entry, -item_id, &skip_vendors);
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
uint32 maxcount = fields[2].Get<uint8>();
|
uint32 maxcount = fields[2].Get<uint32>();
|
||||||
uint32 incrtime = fields[3].Get<uint32>();
|
uint32 incrtime = fields[3].Get<uint32>();
|
||||||
uint32 ExtendedCost = fields[4].Get<uint32>();
|
uint32 ExtendedCost = fields[4].Get<uint32>();
|
||||||
|
|
||||||
@@ -9998,7 +9998,7 @@ void ObjectMgr::LoadGossipMenuItems()
|
|||||||
LOG_INFO("server.loading", " ");
|
LOG_INFO("server.loading", " ");
|
||||||
}
|
}
|
||||||
|
|
||||||
void ObjectMgr::AddVendorItem(uint32 entry, uint32 item, int32 maxcount, uint32 incrtime, uint32 extendedCost, bool persist /*= true*/)
|
void ObjectMgr::AddVendorItem(uint32 entry, uint32 item, uint32 maxcount, uint32 incrtime, uint32 extendedCost, bool persist /*= true*/)
|
||||||
{
|
{
|
||||||
VendorItemData& vList = _cacheVendorItemStore[entry];
|
VendorItemData& vList = _cacheVendorItemStore[entry];
|
||||||
vList.AddItem(item, maxcount, incrtime, extendedCost);
|
vList.AddItem(item, maxcount, incrtime, extendedCost);
|
||||||
@@ -10039,7 +10039,7 @@ bool ObjectMgr::RemoveVendorItem(uint32 entry, uint32 item, bool persist /*= tru
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool ObjectMgr::IsVendorItemValid(uint32 vendor_entry, uint32 item_id, int32 maxcount, uint32 incrtime, uint32 ExtendedCost, Player* player, std::set<uint32>* /*skip_vendors*/, uint32 /*ORnpcflag*/) const
|
bool ObjectMgr::IsVendorItemValid(uint32 vendor_entry, uint32 item_id, uint32 maxcount, uint32 incrtime, uint32 ExtendedCost, Player* player, std::set<uint32>* /*skip_vendors*/, uint32 /*ORnpcflag*/) const
|
||||||
{
|
{
|
||||||
/*
|
/*
|
||||||
CreatureTemplate const* cInfo = GetCreatureTemplate(vendor_entry);
|
CreatureTemplate const* cInfo = GetCreatureTemplate(vendor_entry);
|
||||||
|
|||||||
@@ -1417,9 +1417,9 @@ public:
|
|||||||
return &iter->second;
|
return &iter->second;
|
||||||
}
|
}
|
||||||
|
|
||||||
void AddVendorItem(uint32 entry, uint32 item, int32 maxcount, uint32 incrtime, uint32 extendedCost, bool persist = true); // for event
|
void AddVendorItem(uint32 entry, uint32 item, uint32 maxcount, uint32 incrtime, uint32 extendedCost, bool persist = true); // for event
|
||||||
bool RemoveVendorItem(uint32 entry, uint32 item, bool persist = true); // for event
|
bool RemoveVendorItem(uint32 entry, uint32 item, bool persist = true); // for event
|
||||||
bool IsVendorItemValid(uint32 vendor_entry, uint32 item, int32 maxcount, uint32 ptime, uint32 ExtendedCost, Player* player = nullptr, std::set<uint32>* skip_vendors = nullptr, uint32 ORnpcflag = 0) const;
|
bool IsVendorItemValid(uint32 vendor_entry, uint32 item, uint32 maxcount, uint32 ptime, uint32 ExtendedCost, Player* player = nullptr, std::set<uint32>* skip_vendors = nullptr, uint32 ORnpcflag = 0) const;
|
||||||
|
|
||||||
void LoadScriptNames();
|
void LoadScriptNames();
|
||||||
ScriptNameContainer& GetScriptNames() { return _scriptNamesStore; }
|
ScriptNameContainer& GetScriptNames() { return _scriptNamesStore; }
|
||||||
|
|||||||
Reference in New Issue
Block a user