[DiscordArchive] Hi there, I have an eluna question PLAYER_...
[DiscordArchive] Hi there, I have an eluna question PLAYER_...
Archived author: Needle • Posted: 2025-03-29T13:13:44.617000+00:00
Original source
Archived author: Needle • Posted: 2025-03-29T13:13:47.225000+00:00
Original source
Thread automatically created by Thiesant in <#415944535718494208>
Archived author: stoneharry • Posted: 2025-03-29T14:12:24.192000+00:00
Original source
```
void Eluna::OnItemUnEquip(Player* pPlayer, Item* pItem, uint8 slot)
{
START_HOOK(ITEM_EVENT_ON_UNEQUIP, pItem->GetEntry());
HookPush(pPlayer);
HookPush(pItem);
HookPush(slot);
CallAllFunctions(ItemEventBindings, key);
}
```
Archived author: stoneharry • Posted: 2025-03-29T14:12:46.849000+00:00
Original source
https://elunaluaengine.github.io/Global/...Event.html
[Embed: Global:RegisterItemEvent - Eluna]
API documentation for the Global:RegisterItemEvent method in the Eluna engine.
https://elunaluaengine.github.io/Global/...Event.html
Archived author: stoneharry • Posted: 2025-03-29T14:13:00.559000+00:00
Original source
It looks like the player equip event is deprecated, and the item events are preferred
Archived author: Thiesant • Posted: 2025-03-29T14:23:17.647000+00:00
Original source
Thanks I will look further with this event, I was looking on ac and did not see it there, will have to check if they've updated the module though.
https://www.azerothcore.org/eluna/Global...Event.html
[Embed: Global:RegisterItemEvent - Eluna]
API documentation for the Global:RegisterItemEvent method in the Eluna engine.
https://www.azerothcore.org/eluna/Global...Event.html
Archived author: Thiesant • Posted: 2025-03-29T14:23:33.229000+00:00
Original source
7 and 8 IDs were not on the AC page
Archived author: stoneharry • Posted: 2025-03-29T14:24:04.685000+00:00
Original source
In on equip both hooks are called:
```c++
#ifdef ELUNA
if (Eluna* e = GetEluna())
{
e->OnEquip(this, pItem2, bag, slot); // This should be removed in the future
e->OnItemEquip(this, pItem2, slot);
}
#endif
```
On unequip:
```c++
#ifdef ELUNA
if (Eluna* e = GetEluna())
e->OnItemUnEquip(this, pItem, slot);
#endif
```
So the same unequip event doesn't exist for players but could be implemented with a bit of copy + paste
Archived author: stoneharry • Posted: 2025-03-29T14:24:31.644000+00:00
Original source
AC's Eluna implementation is a bit outdated and poor quality, so unsure there ♂️
Archived author: Thiesant • Posted: 2025-03-29T14:26:21.077000+00:00
Original source
well, I'll try anyway, thanks