From 61649b7e6da9a9aa993c2415b9a0c18207233eef Mon Sep 17 00:00:00 2001 From: Kitzunu <24550914+Kitzunu@users.noreply.github.com> Date: Mon, 3 Jan 2022 13:55:37 +0100 Subject: [PATCH] fix(Scripts/Spells): fix logic mistake in spell_generic (#9799) - chery-picked from commit (https://github.com/TrinityCore/TrinityCore/commit/25e01b0402b26ccefeae136e7606fc45398ae3af) Co-Authored-By: Wyrserth <43747507+Wyrserth@users.noreply.github.com> Co-authored-by: Wyrserth <43747507+Wyrserth@users.noreply.github.com> --- src/server/scripts/Spells/spell_generic.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/server/scripts/Spells/spell_generic.cpp b/src/server/scripts/Spells/spell_generic.cpp index 942bec478..13c5adc89 100644 --- a/src/server/scripts/Spells/spell_generic.cpp +++ b/src/server/scripts/Spells/spell_generic.cpp @@ -2131,7 +2131,7 @@ class spell_gen_clone_weapon_aura : public AuraScript case SPELL_COPY_OFFHAND_AURA: case SPELL_COPY_OFFHAND_2_AURA: { - prevItem = target->GetUInt32Value(UNIT_VIRTUAL_ITEM_SLOT_ID) + 1; + prevItem = target->GetUInt32Value(UNIT_VIRTUAL_ITEM_SLOT_ID + 1); if (Player* player = caster->ToPlayer()) { @@ -2144,7 +2144,7 @@ class spell_gen_clone_weapon_aura : public AuraScript } case SPELL_COPY_RANGED_AURA: { - prevItem = target->GetUInt32Value(UNIT_VIRTUAL_ITEM_SLOT_ID) + 2; + prevItem = target->GetUInt32Value(UNIT_VIRTUAL_ITEM_SLOT_ID + 2); if (Player* player = caster->ToPlayer()) {