Add SendVendorWindow
What emulators has this been tested with? Please make sure to add proper defines for what emulator it works with to prevent compile errors for others.
I've tested it on TC and AC, defines is same for both emulators @Foereaper
What does this do differently to Player:SendListInventory? From what I can tell this is what you want to achieve?
CI was added and it shows that the build fails for all other cores except AC. It seems that the code requires multivendor, which is not present on other cores. https://github.com/ElunaLuaEngine/Eluna/pull/326/checks?check_run_id=1119685708#step:6:518
Alrighty then I will edit it and this method will be only available for AC @Rochet2
The changes could probably be merged with the SendListInventory function that Foereaper mentions.
Idk what you mean
https://github.com/ElunaLuaEngine/Eluna/blob/a22fdc639a1964b39379e738e9776c33fe8b0d4e/PlayerMethods.h#L2350-L2356
int SendVendorWindow(lua_State* L, Player* player)
{
Unit* sendTo = sEluna->CHECKOBJ<Unit>(L, 2);
uint32 creatureEntry = Eluna::CHECKVAL<uint32>(L, 3);
player->GetSession()->SendListInventory(sendTo->GET_GUID(), creatureEntry);
return 0;
}
If you compare the existing code and your code, there is only one difference. Instead of making an entirely new function you can add the small change to the existing function.