Horizon Official Technical Documentation
Mob.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 *
11 * Copyright (c) 2019 Sagun K. (sagunxp@gmail.com).
12 * Copyright (c) 2019 Horizon Dev Team.
13 *
14 * Base Author - Sagun K. (sagunxp@gmail.com)
15 *
16 * This library is free software; you can redistribute it and/or modify
17 * it under the terms of the GNU General Public License as published by
18 * the Free Software Foundation, either version 3 of the License, or
19 * (at your option) any later version.
20 *
21 * This library is distributed in the hope that it will be useful,
22 * but WITHOUT ANY WARRANTY; without even the implied warranty of
23 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
24 * GNU General Public License for more details.
25 *
26 * You should have received a copy of the GNU General Public License
27 * along with this library. If not, see <http://www.gnu.org/licenses/>.
28 **************************************************/
29
30#ifndef HORIZON_ZONE_GAME_ENTITIES_MOB_HPP
31#define HORIZON_ZONE_GAME_ENTITIES_MOB_HPP
32
34
36
37namespace Horizon
38{
39namespace Zone
40{
41class Map;
42namespace Units
43{
44class Mob : public Unit
45{
46public:
47 Mob(uint64_t uuid, unit_type type, unit_type_mask type_mask, std::shared_ptr<Map> map, MapCoords mcoords);
48 ~Mob() override;
49
50 bool initialize(std::shared_ptr<const monster_config_data> md);
51 virtual bool finalize() override;
52
53 virtual void on_damage_received(std::shared_ptr<Unit> damage_dealer, int damage) override;
54 virtual void on_killed(std::shared_ptr<Unit> killer, bool with_drops = false, bool with_exp = false) override;
55};
56}
57}
58}
59
60#endif /* HORIZON_ZONE_GAME_ENTITIES_MOB_HPP */
unit_type
Definition: UnitDefinitions.hpp:44
unit_type_mask
Definition: UnitDefinitions.hpp:59
Definition: Unit.hpp:102
std::shared_ptr< Map > map()
Map & Map Container.
Definition: Unit.hpp:165
uint64_t uuid() const
Unit Data.
Definition: Unit.hpp:140
unit_type_mask type_mask() const
Definition: Unit.hpp:174
unit_type type() const
Unit applications.
Definition: Unit.hpp:173
bool initialize()
Definition: Unit.cpp:72
Definition: Mob.hpp:45
virtual bool finalize() override
Definition: Mob.cpp:63
virtual void on_damage_received(std::shared_ptr< Unit > damage_dealer, int damage) override
Definition: Mob.cpp:71
Mob(uint64_t uuid, unit_type type, unit_type_mask type_mask, std::shared_ptr< Map > map, MapCoords mcoords)
Definition: Mob.cpp:40
virtual void on_killed(std::shared_ptr< Unit > killer, bool with_drops=false, bool with_exp=false) override
Definition: Mob.cpp:76
~Mob() override
Definition: Mob.cpp:46
Definition: Element.hpp:7
Definition: MonsterDefinitions.hpp:203