ScummVM API documentation
open_unlock.h
1 /* ScummVM - Graphic Adventure Engine
2  *
3  * ScummVM is the legal property of its developers, whose names
4  * are too numerous to list here. Please refer to the COPYRIGHT
5  * file distributed with this source distribution.
6  *
7  * This program is free software: you can redistribute it and/or modify
8  * it under the terms of the GNU General Public License as published by
9  * the Free Software Foundation, either version 3 of the License, or
10  * (at your option) any later version.
11  *
12  * This program is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15  * GNU General Public License for more details.
16  *
17  * You should have received a copy of the GNU General Public License
18  * along with this program. If not, see <http://www.gnu.org/licenses/>.
19  *
20  */
21 
22 #ifndef ULTIMA_ULTIMA1_U1DIALOGS_OPEN_UNLOCK_H
23 #define ULTIMA_ULTIMA1_U1DIALOGS_OPEN_UNLOCK_H
24 
25 #include "ultima/ultima1/spells/spell.h"
26 #include "ultima/ultima1/widgets/dungeon_item.h"
27 
28 namespace Ultima {
29 namespace Ultima1 {
30 namespace Spells {
31 
35 class OpenUnlock : public Spell {
36 private:
40  void openItem(Maps::MapDungeon *map, Widgets::DungeonItem *item);
41 public:
45  OpenUnlock(Ultima1Game *game, Character *c, SpellId spellId) : Spell(game, c, spellId) {}
46 
50  void dungeonCast(Maps::MapDungeon *map) override;
51 };
52 
56 class Open : public OpenUnlock {
57 public:
61  Open(Ultima1Game *game, Character *c) : OpenUnlock(game, c, SPELL_OPEN) {}
62 };
63 
67 class Unlock : public OpenUnlock {
68 public:
72  Unlock(Ultima1Game *game, Character *c) : OpenUnlock(game, c, SPELL_UNLOCK) {}
73 };
74 
75 } // End of namespace U1Dialogs
76 } // End of namespace Ultima1
77 } // End of namespace Ultima
78 
79 #endif
Definition: dungeon_item.h:35
Definition: map_dungeon.h:48
OpenUnlock(Ultima1Game *game, Character *c, SpellId spellId)
Definition: open_unlock.h:45
Open(Ultima1Game *game, Character *c)
Definition: open_unlock.h:61
Definition: open_unlock.h:67
Definition: detection.h:27
Definition: party.h:129
Definition: game.h:42
Definition: open_unlock.h:35
void dungeonCast(Maps::MapDungeon *map) override
Definition: spell.h:46
Unlock(Ultima1Game *game, Character *c)
Definition: open_unlock.h:72
Definition: open_unlock.h:56