celguar / mangosbot-bots

Bot AI Core from ike3 for cmangos/mangos classic/tbc/wotlk
https://github.com/cmangos/playerbots
85 stars 42 forks source link

Action creator to std function #348

Closed Vigerus closed 4 months ago

Vigerus commented 5 months ago

Allows to use lambdas in strategies and whatnot instead of stupid static functions.

Tested for three weeks with vanilla server.

mostlikely4r commented 5 months ago

Could you give an example implementation of a lambda in strategies (or whatnot)? I'm mostly curious how you use this change in functionality.

Vigerus commented 5 months ago

After making a PR and taking a dog for a walk I have some second thoughts about this, I was only testing it with 200 bots. The raw pointers to static functions have one big advantage - they are instantiated once. I'll do some tests. And ofc, I will send the idea behind having this.

davidonete commented 4 months ago

Looks like it's not gonna happen, if you come back to this please reopen