[DiscordArchive] How would you solve it instead?
[DiscordArchive] How would you solve it instead?
Archived author: Honey • Posted: 2023-09-30T11:48:48.246000+00:00
Original source
How would you solve it instead?
Archived author: Foe • Posted: 2023-09-30T11:50:30.967000+00:00
Original source
You'd do it much higher up in the chain, you'd do an OnTrade hook instead of OnCanTrade
Archived author: Foe • Posted: 2023-09-30T11:51:12.526000+00:00
Original source
OnTrade you can then insert your logic to determine whether or not a player can trade, before it reaches CanTrade at all
Archived author: Foe • Posted: 2023-09-30T11:51:38.060000+00:00
Original source
That preserves the core functionality while still allowing you to override the outcome
Archived author: Foe • Posted: 2023-09-30T11:52:36.426000+00:00
Original source
That's in line with how the rest of eluna works