aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorShauren <shauren.trinity@gmail.com>2014-12-20 23:15:40 +0100
committerShauren <shauren.trinity@gmail.com>2014-12-20 23:15:40 +0100
commit17124c69bb4d555654f83bbae168fa5963bf9161 (patch)
tree8bd6c5106170f13977b2d511c6589c76be43e6ce /src
parent6f8903ebf54d86348bcf4c0fedd08aa3c0ec1c21 (diff)
Core/Items: Removed reforging
Diffstat (limited to 'src')
-rw-r--r--src/server/game/DataStores/DBCStores.cpp5
-rw-r--r--src/server/game/DataStores/DBCStores.h1
-rw-r--r--src/server/game/DataStores/DBCStructure.h10
-rw-r--r--src/server/game/DataStores/DBCfmt.h1
-rw-r--r--src/server/game/Entities/Item/Item.h1
-rw-r--r--src/server/game/Entities/Player/Player.cpp261
-rw-r--r--src/server/game/Entities/Player/Player.h1
-rw-r--r--src/server/game/Handlers/ItemHandler.cpp105
-rw-r--r--src/server/game/Handlers/TradeHandler.cpp1
-rw-r--r--src/server/game/Server/Protocol/Opcodes.cpp2
-rw-r--r--src/server/game/Server/Protocol/Opcodes.h2
-rw-r--r--src/server/game/Server/WorldSession.h4
12 files changed, 5 insertions, 389 deletions
diff --git a/src/server/game/DataStores/DBCStores.cpp b/src/server/game/DataStores/DBCStores.cpp
index 2af63e0b6bf..0b9c7423690 100644
--- a/src/server/game/DataStores/DBCStores.cpp
+++ b/src/server/game/DataStores/DBCStores.cpp
@@ -128,7 +128,6 @@ DBCStorage <ImportPriceQualityEntry> sImportPriceQualityStore(ImportPriceQu
DBCStorage <ImportPriceShieldEntry> sImportPriceShieldStore(ImportPriceShieldfmt);
DBCStorage <ImportPriceWeaponEntry> sImportPriceWeaponStore(ImportPriceWeaponfmt);
DBCStorage <ItemPriceBaseEntry> sItemPriceBaseStore(ItemPriceBasefmt);
-DBCStorage <ItemReforgeEntry> sItemReforgeStore(ItemReforgefmt);
DBCStorage <ItemArmorQualityEntry> sItemArmorQualityStore(ItemArmorQualityfmt);
DBCStorage <ItemArmorShieldEntry> sItemArmorShieldStore(ItemArmorShieldfmt);
DBCStorage <ItemArmorTotalEntry> sItemArmorTotalStore(ItemArmorTotalfmt);
@@ -460,8 +459,6 @@ void LoadDBCStores(const std::string& dataPath)
LoadDBC(availableDbcLocales, bad_dbc_files, sImportPriceShieldStore, dbcPath, "ImportPriceShield.dbc"); // 19116
LoadDBC(availableDbcLocales, bad_dbc_files, sImportPriceWeaponStore, dbcPath, "ImportPriceWeapon.dbc"); // 19116
LoadDBC(availableDbcLocales, bad_dbc_files, sItemPriceBaseStore, dbcPath, "ItemPriceBase.dbc"); // 15595
- // TODO: 6.x remove all reforging stuff
- //LoadDBC(availableDbcLocales, bad_dbc_files, sItemReforgeStore, dbcPath, "ItemReforge.dbc"); // 19116
LoadDBC(availableDbcLocales, bad_dbc_files, sItemBagFamilyStore, dbcPath, "ItemBagFamily.dbc");//19116
LoadDBC(availableDbcLocales, bad_dbc_files, sItemClassStore, dbcPath, "ItemClass.dbc"); // 19116
//LoadDBC(dbcCount, availableDbcLocales, bad_dbc_files, sItemDisplayInfoStore, dbcPath, "ItemDisplayInfo.dbc"); -- not used currently
@@ -1318,7 +1315,7 @@ std::list<uint32> GetSpellsForLevels(uint32 classId, uint32 raceMask, uint32 spe
}
if (spellInfo->SpellLevel <= minLevel || spellInfo->SpellLevel > maxLevel)
continue;
-
+
spellList.push_back(spellInfo->Id);
}
}
diff --git a/src/server/game/DataStores/DBCStores.h b/src/server/game/DataStores/DBCStores.h
index 20e8e1fc423..249f2495df0 100644
--- a/src/server/game/DataStores/DBCStores.h
+++ b/src/server/game/DataStores/DBCStores.h
@@ -189,7 +189,6 @@ extern DBCStorage <ImportPriceQualityEntry> sImportPriceQualityStore;
extern DBCStorage <ImportPriceShieldEntry> sImportPriceShieldStore;
extern DBCStorage <ImportPriceWeaponEntry> sImportPriceWeaponStore;
extern DBCStorage <ItemPriceBaseEntry> sItemPriceBaseStore;
-extern DBCStorage <ItemReforgeEntry> sItemReforgeStore;
extern DBCStorage <ItemArmorQualityEntry> sItemArmorQualityStore;
extern DBCStorage <ItemArmorShieldEntry> sItemArmorShieldStore;
extern DBCStorage <ItemArmorTotalEntry> sItemArmorTotalStore;
diff --git a/src/server/game/DataStores/DBCStructure.h b/src/server/game/DataStores/DBCStructure.h
index 2f16ce9a0e5..f67dfaa3b00 100644
--- a/src/server/game/DataStores/DBCStructure.h
+++ b/src/server/game/DataStores/DBCStructure.h
@@ -1266,16 +1266,6 @@ struct ItemPriceBaseEntry
float WeaponFactor; // 4 Price factor for weapons
};
-// 6.x - removeme
-struct ItemReforgeEntry
-{
- uint32 Id;
- uint32 SourceStat;
- float SourceMultiplier;
- uint32 FinalStat;
- float FinalMultiplier;
-};
-
// common struct for:
// ItemDamageAmmo.dbc
// ItemDamageOneHand.dbc
diff --git a/src/server/game/DataStores/DBCfmt.h b/src/server/game/DataStores/DBCfmt.h
index c92d3babb25..ce82494d408 100644
--- a/src/server/game/DataStores/DBCfmt.h
+++ b/src/server/game/DataStores/DBCfmt.h
@@ -84,7 +84,6 @@ char const ImportPriceQualityfmt[] = "nf";
char const ImportPriceShieldfmt[] = "nf";
char const ImportPriceWeaponfmt[] = "nf";
char const ItemPriceBasefmt[] = "diff";
-char const ItemReforgefmt[] = "nifif";
char const ItemBagFamilyfmt[] = "nx";
char const ItemArmorQualityfmt[] = "nfffffffi";
char const ItemArmorShieldfmt[] = "nifffffff";
diff --git a/src/server/game/Entities/Item/Item.h b/src/server/game/Entities/Item/Item.h
index c4fca9cc4ba..cff557cedcb 100644
--- a/src/server/game/Entities/Item/Item.h
+++ b/src/server/game/Entities/Item/Item.h
@@ -167,7 +167,6 @@ enum EnchantmentSlot
BONUS_ENCHANTMENT_SLOT = 5,
PRISMATIC_ENCHANTMENT_SLOT = 6, // added at apply special permanent enchantment
//TODO: 7,
- REFORGE_ENCHANTMENT_SLOT = 8,
TRANSMOGRIFY_ENCHANTMENT_SLOT = 9,
MAX_INSPECTED_ENCHANTMENT_SLOT = 10,
diff --git a/src/server/game/Entities/Player/Player.cpp b/src/server/game/Entities/Player/Player.cpp
index ccc926adb09..04cbe8085ba 100644
--- a/src/server/game/Entities/Player/Player.cpp
+++ b/src/server/game/Entities/Player/Player.cpp
@@ -13341,257 +13341,10 @@ void Player::AddEnchantmentDuration(Item* item, EnchantmentSlot slot, uint32 dur
}
}
-void Player::ApplyReforgeEnchantment(Item* item, bool apply)
-{
- if (!item)
- return;
-
- ItemReforgeEntry const* reforge = sItemReforgeStore.LookupEntry(item->GetEnchantmentId(REFORGE_ENCHANTMENT_SLOT));
- if (!reforge)
- return;
-
- float removeValue = item->GetReforgableStat(ItemModType(reforge->SourceStat)) * reforge->SourceMultiplier;
- float addValue = removeValue * reforge->FinalMultiplier;
-
- switch (reforge->SourceStat)
- {
- case ITEM_MOD_MANA:
- HandleStatModifier(UNIT_MOD_MANA, BASE_VALUE, -removeValue, apply);
- break;
- case ITEM_MOD_HEALTH:
- HandleStatModifier(UNIT_MOD_HEALTH, BASE_VALUE, -removeValue, apply);
- break;
- case ITEM_MOD_AGILITY:
- HandleStatModifier(UNIT_MOD_STAT_AGILITY, TOTAL_VALUE, -removeValue, apply);
- ApplyStatBuffMod(STAT_AGILITY, -removeValue, apply);
- break;
- case ITEM_MOD_STRENGTH:
- HandleStatModifier(UNIT_MOD_STAT_STRENGTH, TOTAL_VALUE, -removeValue, apply);
- ApplyStatBuffMod(STAT_STRENGTH, -removeValue, apply);
- break;
- case ITEM_MOD_INTELLECT:
- HandleStatModifier(UNIT_MOD_STAT_INTELLECT, TOTAL_VALUE, -removeValue, apply);
- ApplyStatBuffMod(STAT_INTELLECT, -removeValue, apply);
- break;
- case ITEM_MOD_SPIRIT:
- HandleStatModifier(UNIT_MOD_STAT_SPIRIT, TOTAL_VALUE, -removeValue, apply);
- ApplyStatBuffMod(STAT_SPIRIT, -removeValue, apply);
- break;
- case ITEM_MOD_STAMINA:
- HandleStatModifier(UNIT_MOD_STAT_STAMINA, TOTAL_VALUE, -removeValue, apply);
- ApplyStatBuffMod(STAT_STAMINA, -removeValue, apply);
- break;
- case ITEM_MOD_DEFENSE_SKILL_RATING:
- ApplyRatingMod(CR_DEFENSE_SKILL, -int32(removeValue), apply);
- break;
- case ITEM_MOD_DODGE_RATING:
- ApplyRatingMod(CR_DODGE, -int32(removeValue), apply);
- break;
- case ITEM_MOD_PARRY_RATING:
- ApplyRatingMod(CR_PARRY, -int32(removeValue), apply);
- break;
- case ITEM_MOD_BLOCK_RATING:
- ApplyRatingMod(CR_BLOCK, -int32(removeValue), apply);
- break;
- case ITEM_MOD_HIT_MELEE_RATING:
- ApplyRatingMod(CR_HIT_MELEE, -int32(removeValue), apply);
- break;
- case ITEM_MOD_HIT_RANGED_RATING:
- ApplyRatingMod(CR_HIT_RANGED, -int32(removeValue), apply);
- break;
- case ITEM_MOD_HIT_SPELL_RATING:
- ApplyRatingMod(CR_HIT_SPELL, -int32(removeValue), apply);
- break;
- case ITEM_MOD_CRIT_MELEE_RATING:
- ApplyRatingMod(CR_CRIT_MELEE, -int32(removeValue), apply);
- break;
- case ITEM_MOD_CRIT_RANGED_RATING:
- ApplyRatingMod(CR_CRIT_RANGED, -int32(removeValue), apply);
- break;
- case ITEM_MOD_CRIT_SPELL_RATING:
- ApplyRatingMod(CR_CRIT_SPELL, -int32(removeValue), apply);
- break;
- case ITEM_MOD_HASTE_SPELL_RATING:
- ApplyRatingMod(CR_HASTE_SPELL, -int32(removeValue), apply);
- break;
- case ITEM_MOD_HIT_RATING:
- ApplyRatingMod(CR_HIT_MELEE, -int32(removeValue), apply);
- ApplyRatingMod(CR_HIT_RANGED, -int32(removeValue), apply);
- ApplyRatingMod(CR_HIT_SPELL, -int32(removeValue), apply);
- break;
- case ITEM_MOD_CRIT_RATING:
- ApplyRatingMod(CR_CRIT_MELEE, -int32(removeValue), apply);
- ApplyRatingMod(CR_CRIT_RANGED, -int32(removeValue), apply);
- ApplyRatingMod(CR_CRIT_SPELL, -int32(removeValue), apply);
- break;
- case ITEM_MOD_RESILIENCE_RATING:
- ApplyRatingMod(CR_RESILIENCE_PLAYER_DAMAGE_TAKEN, -int32(removeValue), apply);
- break;
- case ITEM_MOD_HASTE_RATING:
- ApplyRatingMod(CR_HASTE_MELEE, -int32(removeValue), apply);
- ApplyRatingMod(CR_HASTE_RANGED, -int32(removeValue), apply);
- ApplyRatingMod(CR_HASTE_SPELL, -int32(removeValue), apply);
- break;
- case ITEM_MOD_EXPERTISE_RATING:
- ApplyRatingMod(CR_EXPERTISE, -int32(removeValue), apply);
- break;
- case ITEM_MOD_ATTACK_POWER:
- HandleStatModifier(UNIT_MOD_ATTACK_POWER, TOTAL_VALUE, -removeValue, apply);
- HandleStatModifier(UNIT_MOD_ATTACK_POWER_RANGED, TOTAL_VALUE, -removeValue, apply);
- break;
- case ITEM_MOD_RANGED_ATTACK_POWER:
- HandleStatModifier(UNIT_MOD_ATTACK_POWER_RANGED, TOTAL_VALUE, -removeValue, apply);
- break;
- case ITEM_MOD_MANA_REGENERATION:
- ApplyManaRegenBonus(-int32(removeValue), apply);
- break;
- case ITEM_MOD_ARMOR_PENETRATION_RATING:
- ApplyRatingMod(CR_ARMOR_PENETRATION, -int32(removeValue), apply);
- break;
- case ITEM_MOD_SPELL_POWER:
- ApplySpellPowerBonus(-int32(removeValue), apply);
- break;
- case ITEM_MOD_HEALTH_REGEN:
- ApplyHealthRegenBonus(-int32(removeValue), apply);
- break;
- case ITEM_MOD_SPELL_PENETRATION:
- ApplyModInt32Value(PLAYER_FIELD_MOD_TARGET_RESISTANCE, -int32(removeValue), apply);
- m_spellPenetrationItemMod += apply ? -int32(removeValue) : int32(removeValue);
- break;
- case ITEM_MOD_BLOCK_VALUE:
- HandleBaseModValue(SHIELD_BLOCK_VALUE, FLAT_MOD, -removeValue, apply);
- break;
- case ITEM_MOD_MASTERY_RATING:
- ApplyRatingMod(CR_MASTERY, -int32(removeValue), apply);
- break;
- }
-
- switch (reforge->FinalStat)
- {
- case ITEM_MOD_MANA:
- HandleStatModifier(UNIT_MOD_MANA, BASE_VALUE, addValue, apply);
- break;
- case ITEM_MOD_HEALTH:
- HandleStatModifier(UNIT_MOD_HEALTH, BASE_VALUE, addValue, apply);
- break;
- case ITEM_MOD_AGILITY:
- HandleStatModifier(UNIT_MOD_STAT_AGILITY, TOTAL_VALUE, addValue, apply);
- ApplyStatBuffMod(STAT_AGILITY, addValue, apply);
- break;
- case ITEM_MOD_STRENGTH:
- HandleStatModifier(UNIT_MOD_STAT_STRENGTH, TOTAL_VALUE, addValue, apply);
- ApplyStatBuffMod(STAT_STRENGTH, addValue, apply);
- break;
- case ITEM_MOD_INTELLECT:
- HandleStatModifier(UNIT_MOD_STAT_INTELLECT, TOTAL_VALUE, addValue, apply);
- ApplyStatBuffMod(STAT_INTELLECT, addValue, apply);
- break;
- case ITEM_MOD_SPIRIT:
- HandleStatModifier(UNIT_MOD_STAT_SPIRIT, TOTAL_VALUE, addValue, apply);
- ApplyStatBuffMod(STAT_SPIRIT, addValue, apply);
- break;
- case ITEM_MOD_STAMINA:
- HandleStatModifier(UNIT_MOD_STAT_STAMINA, TOTAL_VALUE, addValue, apply);
- ApplyStatBuffMod(STAT_STAMINA, addValue, apply);
- break;
- case ITEM_MOD_DEFENSE_SKILL_RATING:
- ApplyRatingMod(CR_DEFENSE_SKILL, int32(addValue), apply);
- break;
- case ITEM_MOD_DODGE_RATING:
- ApplyRatingMod(CR_DODGE, int32(addValue), apply);
- break;
- case ITEM_MOD_PARRY_RATING:
- ApplyRatingMod(CR_PARRY, int32(addValue), apply);
- break;
- case ITEM_MOD_BLOCK_RATING:
- ApplyRatingMod(CR_BLOCK, int32(addValue), apply);
- break;
- case ITEM_MOD_HIT_MELEE_RATING:
- ApplyRatingMod(CR_HIT_MELEE, int32(addValue), apply);
- break;
- case ITEM_MOD_HIT_RANGED_RATING:
- ApplyRatingMod(CR_HIT_RANGED, int32(addValue), apply);
- break;
- case ITEM_MOD_HIT_SPELL_RATING:
- ApplyRatingMod(CR_HIT_SPELL, int32(addValue), apply);
- break;
- case ITEM_MOD_CRIT_MELEE_RATING:
- ApplyRatingMod(CR_CRIT_MELEE, int32(addValue), apply);
- break;
- case ITEM_MOD_CRIT_RANGED_RATING:
- ApplyRatingMod(CR_CRIT_RANGED, int32(addValue), apply);
- break;
- case ITEM_MOD_CRIT_SPELL_RATING:
- ApplyRatingMod(CR_CRIT_SPELL, int32(addValue), apply);
- break;
- case ITEM_MOD_HASTE_SPELL_RATING:
- ApplyRatingMod(CR_HASTE_SPELL, int32(addValue), apply);
- break;
- case ITEM_MOD_HIT_RATING:
- ApplyRatingMod(CR_HIT_MELEE, int32(addValue), apply);
- ApplyRatingMod(CR_HIT_RANGED, int32(addValue), apply);
- ApplyRatingMod(CR_HIT_SPELL, int32(addValue), apply);
- break;
- case ITEM_MOD_CRIT_RATING:
- ApplyRatingMod(CR_CRIT_MELEE, int32(addValue), apply);
- ApplyRatingMod(CR_CRIT_RANGED, int32(addValue), apply);
- ApplyRatingMod(CR_CRIT_SPELL, int32(addValue), apply);
- break;
- case ITEM_MOD_RESILIENCE_RATING:
- ApplyRatingMod(CR_RESILIENCE_PLAYER_DAMAGE_TAKEN, int32(addValue), apply);
- break;
- case ITEM_MOD_HASTE_RATING:
- ApplyRatingMod(CR_HASTE_MELEE, int32(addValue), apply);
- ApplyRatingMod(CR_HASTE_RANGED, int32(addValue), apply);
- ApplyRatingMod(CR_HASTE_SPELL, int32(addValue), apply);
- break;
- case ITEM_MOD_EXPERTISE_RATING:
- ApplyRatingMod(CR_EXPERTISE, int32(addValue), apply);
- break;
- case ITEM_MOD_ATTACK_POWER:
- HandleStatModifier(UNIT_MOD_ATTACK_POWER, TOTAL_VALUE, addValue, apply);
- HandleStatModifier(UNIT_MOD_ATTACK_POWER_RANGED, TOTAL_VALUE, addValue, apply);
- break;
- case ITEM_MOD_RANGED_ATTACK_POWER:
- HandleStatModifier(UNIT_MOD_ATTACK_POWER_RANGED, TOTAL_VALUE, addValue, apply);
- break;
- case ITEM_MOD_MANA_REGENERATION:
- ApplyManaRegenBonus(int32(addValue), apply);
- break;
- case ITEM_MOD_ARMOR_PENETRATION_RATING:
- ApplyRatingMod(CR_ARMOR_PENETRATION, int32(addValue), apply);
- break;
- case ITEM_MOD_SPELL_POWER:
- ApplySpellPowerBonus(int32(addValue), apply);
- break;
- case ITEM_MOD_HEALTH_REGEN:
- ApplyHealthRegenBonus(int32(addValue), apply);
- break;
- case ITEM_MOD_SPELL_PENETRATION:
- ApplyModInt32Value(PLAYER_FIELD_MOD_TARGET_RESISTANCE, int32(addValue), apply);
- m_spellPenetrationItemMod += apply ? int32(addValue) : -int32(addValue);
- break;
- case ITEM_MOD_BLOCK_VALUE:
- HandleBaseModValue(SHIELD_BLOCK_VALUE, FLAT_MOD, addValue, apply);
- break;
- case ITEM_MOD_MASTERY_RATING:
- ApplyRatingMod(CR_MASTERY, int32(addValue), apply);
- break;
- }
-}
-
void Player::ApplyEnchantment(Item* item, bool apply)
{
for (uint32 slot = 0; slot < MAX_ENCHANTMENT_SLOT; ++slot)
- {
- // Apply reforge as last enchant
- if (slot == REFORGE_ENCHANTMENT_SLOT)
- continue;
-
ApplyEnchantment(item, EnchantmentSlot(slot), apply);
- }
-
- ApplyEnchantment(item, REFORGE_ENCHANTMENT_SLOT, apply);
}
void Player::ApplyEnchantment(Item* item, EnchantmentSlot slot, bool apply, bool apply_dur, bool ignore_condition)
@@ -13605,12 +13358,6 @@ void Player::ApplyEnchantment(Item* item, EnchantmentSlot slot, bool apply, bool
if (slot == TRANSMOGRIFY_ENCHANTMENT_SLOT)
return;
- if (slot == REFORGE_ENCHANTMENT_SLOT)
- {
- ApplyReforgeEnchantment(item, apply);
- return;
- }
-
uint32 enchant_id = item->GetEnchantmentId(slot);
if (!enchant_id)
return;
@@ -13954,7 +13701,7 @@ void Player::ApplyEnchantment(Item* item, EnchantmentSlot slot, bool apply, bool
// visualize enchantment at player and equipped items
if (slot == PERM_ENCHANTMENT_SLOT)
SetUInt16Value(PLAYER_VISIBLE_ITEM + VISIBLE_ITEM_ENCHANTMENT_OFFSET + (item->GetSlot() * 3), 0, apply ? item->GetEnchantmentId(slot) : 0);
-
+
if (slot == TEMP_ENCHANTMENT_SLOT)
SetUInt16Value(PLAYER_VISIBLE_ITEM + VISIBLE_ITEM_ENCHANTMENT_OFFSET + (item->GetSlot() * 3), 1, apply ? item->GetEnchantmentId(slot) : 0);
@@ -19183,12 +18930,12 @@ void Player::SaveToDB(bool create /*=false*/)
ss << item->GetEntry();
else
ss << '0';
- ss << " 0 ";
+ ss << " 0 0 ";
}
stmt->setString(index++, ss.str());
ss.str("");
- for (uint32 i = 0; i < KNOWN_TITLES_SIZE*2; ++i)
+ for (uint32 i = 0; i < KNOWN_TITLES_SIZE * 2; ++i)
ss << GetUInt32Value(PLAYER__FIELD_KNOWN_TITLES + i) << ' ';
stmt->setString(index++, ss.str());
@@ -19312,7 +19059,7 @@ void Player::SaveToDB(bool create /*=false*/)
ss << item->GetEntry();
else
ss << '0';
- ss << " 0 ";
+ ss << " 0 0 ";
}
stmt->setString(index++, ss.str());
diff --git a/src/server/game/Entities/Player/Player.h b/src/server/game/Entities/Player/Player.h
index 6b9e925e28d..814c4af9781 100644
--- a/src/server/game/Entities/Player/Player.h
+++ b/src/server/game/Entities/Player/Player.h
@@ -1545,7 +1545,6 @@ class Player : public Unit, public GridObject<Player>
void AddEnchantmentDuration(Item* item, EnchantmentSlot slot, uint32 duration);
void ApplyEnchantment(Item* item, EnchantmentSlot slot, bool apply, bool apply_dur = true, bool ignore_condition = false);
void ApplyEnchantment(Item* item, bool apply);
- void ApplyReforgeEnchantment(Item* item, bool apply);
void UpdateSkillEnchantments(uint16 skill_id, uint16 curr_value, uint16 new_value);
void SendEnchantmentDurations();
void BuildEnchantmentsInfoData(WorldPacket* data);
diff --git a/src/server/game/Handlers/ItemHandler.cpp b/src/server/game/Handlers/ItemHandler.cpp
index 976a3d4bd55..482661e35f5 100644
--- a/src/server/game/Handlers/ItemHandler.cpp
+++ b/src/server/game/Handlers/ItemHandler.cpp
@@ -1534,111 +1534,6 @@ void WorldSession::HandleTransmogrifyItems(WorldPacket& recvData)
}
}
-void WorldSession::SendReforgeResult(bool success)
-{
- WorldPacket data(SMSG_REFORGE_RESULT, 1);
- data.WriteBit(success);
- data.FlushBits();
- SendPacket(&data);
-}
-
-void WorldSession::HandleReforgeItemOpcode(WorldPacket& recvData)
-{
- uint32 slot, reforgeEntry;
- ObjectGuid guid;
- uint32 bag;
- Player* player = GetPlayer();
-
- recvData >> reforgeEntry >> slot >> bag;
-
- guid[2] = recvData.ReadBit();
- guid[6] = recvData.ReadBit();
- guid[3] = recvData.ReadBit();
- guid[4] = recvData.ReadBit();
- guid[1] = recvData.ReadBit();
- guid[0] = recvData.ReadBit();
- guid[7] = recvData.ReadBit();
- guid[5] = recvData.ReadBit();
-
- recvData.ReadByteSeq(guid[2]);
- recvData.ReadByteSeq(guid[3]);
- recvData.ReadByteSeq(guid[6]);
- recvData.ReadByteSeq(guid[4]);
- recvData.ReadByteSeq(guid[1]);
- recvData.ReadByteSeq(guid[0]);
- recvData.ReadByteSeq(guid[7]);
- recvData.ReadByteSeq(guid[5]);
-
- if (!player->GetNPCIfCanInteractWith(guid, UNIT_NPC_FLAG_REFORGER))
- {
- TC_LOG_DEBUG("network", "WORLD: HandleReforgeItemOpcode - %s not found or player can't interact with it.", guid.ToString().c_str());
- SendReforgeResult(false);
- return;
- }
-
- Item* item = player->GetItemByPos(bag, slot);
-
- if (!item)
- {
- TC_LOG_DEBUG("network", "WORLD: HandleReforgeItemOpcode - Player (%s Name: %s) tried to reforge an invalid/non-existant item.", player->GetGUID().ToString().c_str(), player->GetName().c_str());
- SendReforgeResult(false);
- return;
- }
-
- if (!reforgeEntry)
- {
- if (!item->GetEnchantmentId(REFORGE_ENCHANTMENT_SLOT))
- {
- TC_LOG_ERROR("network", "WORLD: HandleReforgeItemOpcode - Player (%s Name: %s) tried to remove reforge from non-reforged item (Entry: %u)", player->GetGUID().ToString().c_str(), player->GetName().c_str(), item->GetEntry());
- SendReforgeResult(false);
- return;
- }
-
- // Reset the item
- if (item->IsEquipped())
- player->ApplyReforgeEnchantment(item, false);
- item->ClearEnchantment(REFORGE_ENCHANTMENT_SLOT);
- SendReforgeResult(true);
- return;
- }
-
- if (item->GetEnchantmentId(REFORGE_ENCHANTMENT_SLOT))
- {
- TC_LOG_ERROR("network", "WORLD: HandleReforgeItemOpcode - Player (%s Name: %s) tried to reforge an already reforged item (Entry: %u)", player->GetGUID().ToString().c_str(), player->GetName().c_str(), item->GetEntry());
- SendReforgeResult(false);
- return;
- }
-
- ItemReforgeEntry const* stats = sItemReforgeStore.LookupEntry(reforgeEntry);
- if (!stats)
- {
- TC_LOG_DEBUG("network", "WORLD: HandleReforgeItemOpcode - Player (%s Name: %s) tried to reforge an item with invalid reforge entry (%u).", player->GetGUID().ToString().c_str(), player->GetName().c_str(), reforgeEntry);
- SendReforgeResult(false);
- return;
- }
-
- if (!item->GetReforgableStat(ItemModType(stats->SourceStat)) || item->GetReforgableStat(ItemModType(stats->FinalStat))) // Cheating, you cant reforge to a stat that the item already has, nor reforge from a stat that the item does not have
- {
- SendReforgeResult(false);
- return;
- }
-
- if (!player->HasEnoughMoney(uint64(item->GetSpecialPrice()))) // cheating
- {
- SendReforgeResult(false);
- return;
- }
-
- player->ModifyMoney(-int64(item->GetSpecialPrice()));
-
- item->SetEnchantment(REFORGE_ENCHANTMENT_SLOT, reforgeEntry, 0, 0);
-
- SendReforgeResult(true);
-
- if (item->IsEquipped())
- player->ApplyReforgeEnchantment(item, true);
-}
-
bool WorldSession::CanUseBank(ObjectGuid bankerGUID) const
{
// bankerGUID parameter is optional, set to 0 by default.
diff --git a/src/server/game/Handlers/TradeHandler.cpp b/src/server/game/Handlers/TradeHandler.cpp
index 07c6264c808..8a4a70ec0fb 100644
--- a/src/server/game/Handlers/TradeHandler.cpp
+++ b/src/server/game/Handlers/TradeHandler.cpp
@@ -153,7 +153,6 @@ void WorldSession::SendUpdateTrade(bool trader_data /*= true*/)
itemData.WriteByteSeq(creatorGuid[7]);
itemData.WriteByteSeq(creatorGuid[4]);
- itemData << uint32(item->GetEnchantmentId(REFORGE_ENCHANTMENT_SLOT));
itemData << uint32(item->GetUInt32Value(ITEM_FIELD_DURABILITY));
itemData << uint32(item->GetItemRandomPropertyId());
diff --git a/src/server/game/Server/Protocol/Opcodes.cpp b/src/server/game/Server/Protocol/Opcodes.cpp
index 54e8291ec9d..818911d3827 100644
--- a/src/server/game/Server/Protocol/Opcodes.cpp
+++ b/src/server/game/Server/Protocol/Opcodes.cpp
@@ -554,7 +554,6 @@ void OpcodeTable::Initialize()
DEFINE_OPCODE_HANDLER_OLD(CMSG_REALM_SPLIT, STATUS_UNHANDLED, PROCESS_THREADUNSAFE, &WorldSession::HandleRealmSplitOpcode );
DEFINE_OPCODE_HANDLER_OLD(CMSG_RECLAIM_CORPSE, STATUS_UNHANDLED, PROCESS_THREADUNSAFE, &WorldSession::HandleReclaimCorpseOpcode );
DEFINE_OPCODE_HANDLER_OLD(CMSG_RECRUIT_A_FRIEND, STATUS_UNHANDLED, PROCESS_INPLACE, &WorldSession::Handle_NULL );
- DEFINE_OPCODE_HANDLER_OLD(CMSG_REFORGE_ITEM, STATUS_UNHANDLED, PROCESS_INPLACE, &WorldSession::HandleReforgeItemOpcode );
DEFINE_HANDLER(CMSG_REORDER_CHARACTERS, STATUS_AUTHED, PROCESS_THREADUNSAFE, WorldPackets::Character::ReorderCharacters, &WorldSession::HandleReorderCharacters);
DEFINE_OPCODE_HANDLER_OLD(CMSG_REPAIR_ITEM, STATUS_UNHANDLED, PROCESS_THREADUNSAFE, &WorldSession::HandleRepairItemOpcode );
DEFINE_OPCODE_HANDLER_OLD(CMSG_REPOP_REQUEST, STATUS_UNHANDLED, PROCESS_THREADUNSAFE, &WorldSession::HandleRepopRequestOpcode );
@@ -1257,7 +1256,6 @@ void OpcodeTable::Initialize()
DEFINE_SERVER_OPCODE_HANDLER(SMSG_REDIRECT_CLIENT, STATUS_NEVER, CONNECTION_TYPE_REALM);
DEFINE_SERVER_OPCODE_HANDLER(SMSG_REFER_A_FRIEND_EXPIRED, STATUS_UNHANDLED, CONNECTION_TYPE_REALM);
DEFINE_SERVER_OPCODE_HANDLER(SMSG_REFER_A_FRIEND_FAILURE, STATUS_UNHANDLED, CONNECTION_TYPE_REALM);
- DEFINE_SERVER_OPCODE_HANDLER(SMSG_REFORGE_RESULT, STATUS_UNHANDLED, CONNECTION_TYPE_REALM);
DEFINE_SERVER_OPCODE_HANDLER(SMSG_REFRESH_SPELL_HISTORY, STATUS_UNHANDLED, CONNECTION_TYPE_REALM);
DEFINE_SERVER_OPCODE_HANDLER(SMSG_REMOVED_SPELL, STATUS_NEVER, CONNECTION_TYPE_INSTANCE);
DEFINE_SERVER_OPCODE_HANDLER(SMSG_REPORT_PVP_AFK_RESULT, STATUS_UNHANDLED, CONNECTION_TYPE_REALM);
diff --git a/src/server/game/Server/Protocol/Opcodes.h b/src/server/game/Server/Protocol/Opcodes.h
index 7e11d8f3427..74bcde55503 100644
--- a/src/server/game/Server/Protocol/Opcodes.h
+++ b/src/server/game/Server/Protocol/Opcodes.h
@@ -503,7 +503,6 @@ enum OpcodeClient : uint32
CMSG_REALM_SPLIT = 0xBADD,
CMSG_RECLAIM_CORPSE = 0xBADD,
CMSG_RECRUIT_A_FRIEND = 0x07BA,
- CMSG_REFORGE_ITEM = 0xBADD,
CMSG_REORDER_CHARACTERS = 0x0DAA,
CMSG_REPAIR_ITEM = 0x0B54,
CMSG_REPLACE_ACCOUNT_DATA = 0xBADD,
@@ -1269,7 +1268,6 @@ enum OpcodeServer : uint32
SMSG_REDIRECT_CLIENT = 0x175A,
SMSG_REFER_A_FRIEND_EXPIRED = 0xBADD,
SMSG_REFER_A_FRIEND_FAILURE = 0xBADD,
- SMSG_REFORGE_RESULT = 0xBADD,
SMSG_REFRESH_SPELL_HISTORY = 0x0A2A,
SMSG_REMOVED_SPELL = 0x0B3B,
SMSG_REPORT_PVP_AFK_RESULT = 0xBADD,
diff --git a/src/server/game/Server/WorldSession.h b/src/server/game/Server/WorldSession.h
index b95b3ce4330..8153eea7f82 100644
--- a/src/server/game/Server/WorldSession.h
+++ b/src/server/game/Server/WorldSession.h
@@ -1126,10 +1126,6 @@ class WorldSession
// Transmogrification
void HandleTransmogrifyItems(WorldPacket& recvData);
- // Reforge
- void HandleReforgeItemOpcode(WorldPacket& recvData);
- void SendReforgeResult(bool success);
-
// Miscellaneous
void HandleSpellClick(WorldPacket& recvData);
void HandleMirrorImageDataRequest(WorldPacket& recvData);