liyunfan1223 / mod-playerbots

AzerothCore Playerbots Module
https://discord.gg/NQm5QShwf9
GNU Affero General Public License v3.0
279 stars 149 forks source link

(Naxxramas 40) compatibility, crash on some bosses #530

Open sogladev opened 1 month ago

sogladev commented 1 month ago

Describe the bug When using mod-individual-progression that includes custom Naxxramas 40, the player-bots strategy causes a crash on some Naxx40 bosses like Heigan

crashlog https://gist.github.com/sogladev/a1629b53898ebe63ceb5936d148a1895

crash happens here due to auto* boss_ai = dynamic_cast<Heigan::boss_heigan::boss_heiganAI*>(boss->GetAI());

Most bosses in naxx40 use a custom scripts (e.g. boss_heigan_40) causing this to be null.

Commit hash Playerbot af776520dbd5 mod-playerbots bfbc451bfb97

To Reproduce with mod-individual-progression installed Steps to reproduce the behavior:

  1. Heigan_40 .go c 351005
  2. add a bot
  3. engage boss
  4. crash

Expected behavior no crash

Screenshots

Desktop (please complete the following information):

Additional context

liyunfan1223 commented 1 month ago

While compatibility with other mods would be nice, it's not a priority. You can set ApplyInstanceStrategies = 0 to disable naxx strategy to temporarily avoid this crash.

acore-crap commented 1 day ago

It's possible that nothing needs to be done to mod-playerbots directly if azerothcore-wotlk modifies the boss classes to expose more values in the constructors and set some functions as virtual so that mod-individual-progression can simply inherit those classes and override appropriately instead of creating new classes for the modified bosses. Doing this seems to work just fine, tested Heigan and Loatheb so far.