Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- struct travel_t: public action_t
- {
- travel_t( player_t* player ): action_t( ACTION_OTHER, "travel", player ) {}
- void execute() override { player -> current.distance = 1; }
- timespan_t execute_time() const override { return timespan_t::from_seconds( player->current.distance / 33.0 ); }
- bool ready() override { return ( player -> current.distance > 1 ); }
- bool usable_moving() const override { return true; }
- };
- action_t* create_action( const std::string& name,
- const std::string& options_str ) override
- {
- if ( name == "travel" ) return new travel_t( this );
- return pet_t::create_action( name, options_str );
- }
Advertisement
Add Comment
Please, Sign In to add comment