housetile.h

main 53 lines · 1.6 KB Raw
Alex Alex Commit Server upload 18/10/2026 23:38
1/**
2 * The Forgotten Server - a free and open-source MMORPG server emulator
3 * Copyright (C) 2019 Mark Samman <mark.samman@gmail.com>
4 *
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation; either version 2 of the License, or
8 * (at your option) any later version.
9 *
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14 *
15 * You should have received a copy of the GNU General Public License along
16 * with this program; if not, write to the Free Software Foundation, Inc.,
17 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
18 */
19
20#ifndef FS_HOUSETILE_H_57D59BEC1CE741D9B142BFC54634505B
21#define FS_HOUSETILE_H_57D59BEC1CE741D9B142BFC54634505B
22
23#include "tile.h"
24
25class House;
26
27class HouseTile final : public DynamicTile
28{
29 public:
30 HouseTile(int32_t x, int32_t y, int32_t z, House* house);
31
32 //cylinder implementations
33 ReturnValue queryAdd(int32_t index, const Thing& thing, uint32_t count,
34 uint32_t flags, Creature* actor = nullptr) const override;
35
36 Tile* queryDestination(int32_t& index, const Thing& thing, Item** destItem,
37 uint32_t& flags) override;
38
39 void addThing(int32_t index, Thing* thing) override;
40 void internalAddThing(uint32_t index, Thing* thing) override;
41
42 House* getHouse() {
43 return house;
44 }
45
46 private:
47 void updateHouse(Item* item);
48
49 House* house;
50};
51
52#endif
53
Top