mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-24 02:46:33 +01:00
Core/Items: Fixed a reforge exploit
That allowed items to be reforged more than once. Thanks @Rochet2 Closes #11465
This commit is contained in:
@@ -1581,6 +1581,13 @@ void WorldSession::HandleReforgeItemOpcode(WorldPacket& recvData)
|
||||
|
||||
if (!reforgeEntry)
|
||||
{
|
||||
if (!item->GetEnchantmentId(REFORGE_ENCHANTMENT_SLOT))
|
||||
{
|
||||
TC_LOG_ERROR("network", "WORLD: HandleReforgeItemOpcode - Player (Guid: %u Name: %s) tried to remove reforge from non-reforged item (Entry: %u)", player->GetGUIDLow(), player->GetName().c_str(), item->GetEntry());
|
||||
SendReforgeResult(false);
|
||||
return;
|
||||
}
|
||||
|
||||
// Reset the item
|
||||
if (item->IsEquipped())
|
||||
player->ApplyReforgeEnchantment(item, false);
|
||||
@@ -1589,6 +1596,13 @@ void WorldSession::HandleReforgeItemOpcode(WorldPacket& recvData)
|
||||
return;
|
||||
}
|
||||
|
||||
if (item->GetEnchantmentId(REFORGE_ENCHANTMENT_SLOT))
|
||||
{
|
||||
TC_LOG_ERROR("network", "WORLD: HandleReforgeItemOpcode - Player (Guid: %u Name: %s) tried to reforge an already reforged item (Entry: %u)", player->GetGUIDLow(), player->GetName().c_str(), item->GetEntry());
|
||||
SendReforgeResult(false);
|
||||
return;
|
||||
}
|
||||
|
||||
ItemReforgeEntry const* stats = sItemReforgeStore.LookupEntry(reforgeEntry);
|
||||
if (!stats)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user