Skip to content

Commit

Permalink
[Hunter] Prepare for PTR
Browse files Browse the repository at this point in the history
  • Loading branch information
Pewtro committed Oct 11, 2024
1 parent 2089b62 commit 6969e5e
Show file tree
Hide file tree
Showing 2 changed files with 8,941 additions and 3 deletions.
20 changes: 17 additions & 3 deletions engine/class_modules/sc_hunter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8937,6 +8937,10 @@ class hunter_report_t: public player_report_extension_t
hunter_t& p;
};

namespace live_hunter {
#include "class_modules/sc_hunter_live.inc"
};

// HUNTER MODULE INTERFACE ==================================================

struct hunter_module_t: public module_t
Expand All @@ -8945,9 +8949,19 @@ struct hunter_module_t: public module_t

player_t* create_player( sim_t* sim, util::string_view name, race_e r = RACE_NONE ) const override
{
auto p = new hunter_t( sim, name, r );
p -> report_extension = std::unique_ptr<player_report_extension_t>( new hunter_report_t( *p ) );
return p;
// TODO: Remove PTR check and the live hunter file
if ( sim->dbc->ptr )
{
auto p = new hunter_t( sim, name, r );
p -> report_extension = std::unique_ptr<player_report_extension_t>( new hunter_report_t( *p ) );
return p;
}
else
{
auto p = new live_hunter::hunter_t( sim, name, r );
p -> report_extension = std::unique_ptr<player_report_extension_t>( new live_hunter::hunter_report_t( *p ) );
return p;
}
}

bool valid() const override { return true; }
Expand Down
Loading

0 comments on commit 6969e5e

Please sign in to comment.