mirror of
https://github.com/mangosfour/server.git
synced 2025-12-15 10:37:02 +00:00
[11646] Implement support item converting at expire
Example: items 44623->44625->44627 convertion chain * New table `item_enchantment_template` store original->final item pairs Original item must have duration setup. * Small change in GetItemConvert for consistence (now 0 returned if no convert pair instead original entry id) Signed-off-by: VladimirMangos <vladimir@getmangos.com>
This commit is contained in:
parent
a97370a7f0
commit
2d7768a5ab
10 changed files with 117 additions and 13 deletions
|
|
@ -801,9 +801,9 @@ void WorldSession::SendListInventory(ObjectGuid vendorguid)
|
|||
// convert if can use and then buy
|
||||
if (pProto->RequiredReputationFaction && uint32(_player->GetReputationRank(pProto->RequiredReputationFaction)) >= pProto->RequiredReputationRank)
|
||||
{
|
||||
itemId = sObjectMgr.GetItemConvert(itemId, _player->getRaceMask());
|
||||
// checked at convert data loading as existed
|
||||
pProto = ObjectMgr::GetItemPrototype(itemId);
|
||||
if (uint32 newItemId = sObjectMgr.GetItemConvert(itemId, _player->getRaceMask()))
|
||||
pProto = ObjectMgr::GetItemPrototype(newItemId);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue