Dota2Patcher
 
Loading...
Searching...
No Matches
CDOTAGamerules.h
Go to the documentation of this file.
1#pragma once
2#include "../Utils/Memory.h"
3
5public:
6 bool paused() const {
7 const auto paused = Memory::read_memory<bool>(this + 0x38);
8 return paused.value_or(0) != 0;
9 }
10
12 const auto game_state = Memory::read_memory<int>(this + 0x74);
13 return game_state.has_value() ? static_cast<DOTA_GAME_STATE>(game_state.value()) : DOTA_GAME_STATE::INVALID;
14 }
15
20
21 void set_river_vial(const DOTA_RIVER river) {
22 Memory::write_memory<DOTA_RIVER>(this + 0x6E8, river);
23 }
24};
25
27public:
29 return Memory::read_memory<CDOTAGamerules*>(this + 0x510).value_or(nullptr);
30 }
31};
DOTA_RIVER
Definition Enums.h:54
DOTA_GAME_STATE
Definition Enums.h:3
Definition CDOTAGamerules.h:4
void set_river_vial(const DOTA_RIVER river)
Definition CDOTAGamerules.h:21
bool in_game() const
Definition CDOTAGamerules.h:16
bool paused() const
Definition CDOTAGamerules.h:6
DOTA_GAME_STATE game_state() const
Definition CDOTAGamerules.h:11
Definition CDOTAGamerules.h:26
CDOTAGamerules * gamerules() const
Definition CDOTAGamerules.h:28
static optional< T > read_memory(const N &address)
Definition Memory.h:78