From 71b1feb0671280495dbda0b29f48b4394a7a36dc Mon Sep 17 00:00:00 2001 From: Niam5 Date: Thu, 21 Dec 2023 20:14:02 -0600 Subject: [PATCH] Fix item slot references in VMaNGOS Fixes #453 --- VMangos/CreatureMethods.h | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/VMangos/CreatureMethods.h b/VMangos/CreatureMethods.h index 3334fad928..2784329d76 100644 --- a/VMangos/CreatureMethods.h +++ b/VMangos/CreatureMethods.h @@ -1022,15 +1022,9 @@ namespace LuaCreature uint32 off_hand = Eluna::CHECKVAL(L, 3); uint32 ranged = Eluna::CHECKVAL(L, 4); -#if defined(TRINITY) || defined(AZEROTHCORE) - creature->SetUInt32Value(UNIT_VIRTUAL_ITEM_SLOT_ID + 0, main_hand); - creature->SetUInt32Value(UNIT_VIRTUAL_ITEM_SLOT_ID + 1, off_hand); - creature->SetUInt32Value(UNIT_VIRTUAL_ITEM_SLOT_ID + 2, ranged); -#else - creature->SetVirtualItem(VIRTUAL_ITEM_SLOT_0, main_hand); - creature->SetVirtualItem(VIRTUAL_ITEM_SLOT_1, off_hand); - creature->SetVirtualItem(VIRTUAL_ITEM_SLOT_2, ranged); -#endif + creature->SetVirtualItem(BASE_ATTACK, main_hand); + creature->SetVirtualItem(OFF_ATTACK, off_hand); + creature->SetVirtualItem(RANGED_ATTACK, ranged); return 0; }