Core/Items: Implemented ITEM_BONUS_DISENCHANT_LOOT_ID

Port From (https://github.com/TrinityCore/TrinityCore/commit/3238175a62750ea5127feb69ce86d0c3c05dfc52)
This commit is contained in:
Hondacrx
2024-11-10 16:56:17 -05:00
parent 77ea0dd186
commit 2e2c87090d
5 changed files with 93 additions and 20 deletions
+4 -4
View File
@@ -7036,10 +7036,10 @@ namespace Game.Spells
if (itemProto == null)
return SpellCastResult.CantBeSalvaged;
ItemDisenchantLootRecord itemDisenchantLoot = item.GetDisenchantLoot(m_caster.ToPlayer());
if (itemDisenchantLoot == null)
ushort? disenchantSkillRequired = item.GetDisenchantSkillRequired();
if (!disenchantSkillRequired.HasValue)
return SpellCastResult.CantBeSalvaged;
if (itemDisenchantLoot.SkillRequired > player.GetSkillValue(SkillType.Enchanting))
if (disenchantSkillRequired > player.GetSkillValue(SkillType.Enchanting))
return SpellCastResult.CantBeSalvagedSkill;
break;
}
@@ -9816,11 +9816,11 @@ namespace Game.Spells
public class CastSpellExtraArgsInit
{
public TriggerCastFlags TriggerFlags;
public Difficulty CastDifficulty;
public Item CastItem;
public Spell TriggeringSpell;
public AuraEffect TriggeringAura;
public ObjectGuid OriginalCaster;
public Difficulty CastDifficulty;
public ObjectGuid OriginalCastId;
public int? OriginalCastItemLevel;
public SpellValueOverride Value;