Horizon Official Technical Documentation
Horizon.hpp
Go to the documentation of this file.
1/***************************************************
2 * _ _ _ *
3 * | | | | (_) *
4 * | |_| | ___ _ __ _ _______ _ __ *
5 * | _ |/ _ \| '__| |_ / _ \| '_ \ *
6 * | | | | (_) | | | |/ / (_) | | | | *
7 * \_| |_/\___/|_| |_/___\___/|_| |_| *
8 ***************************************************
9 * This file is part of Horizon (c).
10 * Copyright (c) 2019 Sagun K. (sagunxp@gmail.com).
11 * Copyright (c) 2019 Horizon Dev Team.
12 *
13 * Base Author - Sagun K. (sagunxp@gmail.com)
14 *
15 * This library is free software; you can redistribute it and/or modify
16 * it under the terms of the GNU General Public License as published by
17 * the Free Software Foundation, either version 3 of the License, or
18 * (at your option) any later version.
19 *
20 * This library is distributed in the hope that it will be useful,
21 * but WITHOUT ANY WARRANTY; without even the implied warranty of
22 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
23 * GNU General Public License for more details.
24 *
25 * You should have received a copy of the GNU General Public License
26 * along with this library. If not, see <http://www.gnu.org/licenses/>.
27 **************************************************/
28
29#ifndef HORIZON_HORIZON_HPP
30#define HORIZON_HORIZON_HPP
31
33
34#define RENEWAL
35
36/* Client Type
37 * Renewal = 'R'
38 * AD = 'A'
39 * Ragexe = 'M'
40 * Zero = 'Z'
41 * Sakray = 'S'
42 */
43#define CLIENT_TYPE 'M'
44
45/* Packet Version */
46#define PACKET_VERSION 20190530
47
48#define MAX_LEVEL 175
49#define MAX_STATUS_POINTS 400
50#define MAX_ATTACK_SPEED 199
51
52#define MAX_STATUS_EFFECT_BONUSES 10
53#define MAX_PC_BONUSES_PER_GROUP 10
54#define MAX_AUTOSPELL 16
55
56/* Maximum Character Slots (in multiples of 3) */
57#define MAX_CHARACTER_SLOTS 9
58#define DEFAULT_MOVEMENT_SPEED 150
59#define MAX_VIEW_RANGE 14
60#define MAX_NPC_TRIGGER_RANGE 5
61
62// Time in Microseconds (µs)
63#define MAX_CORE_UPDATE_INTERVAL 500
64
65// Mob searches active path when selecting target.
66#define ACTIVE_PATH_SEARCH 1
67
68static_assert(MAX_LEVEL > 0,
69 "MAX_LEVEL should be greater than 0.");
70static_assert(MAX_CHARACTER_SLOTS % 3 == 0,
71 "MAX_CHARACTER_SLOTS must be in multiples of 3!");
72static_assert(DEFAULT_MOVEMENT_SPEED > 0 && DEFAULT_MOVEMENT_SPEED < 1000,
73 "DEFAULT_MOVEMENT_SPEED must be greater than 0 and less than 1000.");
74static_assert(MAX_VIEW_RANGE > 0,
75 "View range affects visibility range for players and should not be 0.");
77 "MAX_NPC_TRIGGER_RANGE must be less than MAX_VIEW_RANGE and greater than 0.");
78static_assert(MAX_CORE_UPDATE_INTERVAL >= 1,
79 "MAX_CORE_UPDATE_INTERVAL should be greater than or equal to 500 microseconds (µs).");
80
81#include "Client.hpp"
82
84{
85 s_min_max(int min, int max) : min(min), max(max) {}
86
87 void set_min(int min) { this->min = min; }
88 void set_max(int max) { this->max = max; }
89
90 int get_min() { return min; }
91 int get_max() { return max; }
92
93 int min;
94 int max;
95};
96
97#endif //HORIZON_HORIZON_HPP
#define MAX_CHARACTER_SLOTS
Definition: Horizon.hpp:57
#define MAX_LEVEL
Definition: Horizon.hpp:48
#define MAX_NPC_TRIGGER_RANGE
Definition: Horizon.hpp:60
#define MAX_CORE_UPDATE_INTERVAL
Definition: Horizon.hpp:63
#define DEFAULT_MOVEMENT_SPEED
Definition: Horizon.hpp:58
#define MAX_VIEW_RANGE
Definition: Horizon.hpp:59
Definition: Horizon.hpp:84
s_min_max(int min, int max)
Definition: Horizon.hpp:85
int max
Definition: Horizon.hpp:94
void set_min(int min)
Definition: Horizon.hpp:87
int min
Definition: Horizon.hpp:93
int get_max()
Definition: Horizon.hpp:91
int get_min()
Definition: Horizon.hpp:90
void set_max(int max)
Definition: Horizon.hpp:88