Skip to content

Commit

Permalink
Fix item slot references in VMaNGOS
Browse files Browse the repository at this point in the history
  • Loading branch information
Niam5 committed Dec 22, 2023
1 parent a9bd6da commit 71b1feb
Showing 1 changed file with 3 additions and 9 deletions.
12 changes: 3 additions & 9 deletions VMangos/CreatureMethods.h
Original file line number Diff line number Diff line change
Expand Up @@ -1022,15 +1022,9 @@ namespace LuaCreature
uint32 off_hand = Eluna::CHECKVAL<uint32>(L, 3);
uint32 ranged = Eluna::CHECKVAL<uint32>(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;
}

Expand Down

0 comments on commit 71b1feb

Please sign in to comment.