| [2779] | 1 | /* |
|---|
| 2 | * ORXONOX - the hottest 3D action shooter ever to exist |
|---|
| 3 | * > www.orxonox.net < |
|---|
| 4 | * |
|---|
| 5 | * |
|---|
| 6 | * License notice: |
|---|
| 7 | * |
|---|
| 8 | * This program is free software; you can redistribute it and/or |
|---|
| 9 | * modify it under the terms of the GNU General Public License |
|---|
| 10 | * as published by the Free Software Foundation; either version 2 |
|---|
| 11 | * of the License, or (at your option) any later version. |
|---|
| 12 | * |
|---|
| 13 | * This program is distributed in the hope that it will be useful, |
|---|
| 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
|---|
| 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See thes |
|---|
| 16 | * GNU General Public License for more details. |
|---|
| 17 | * |
|---|
| 18 | * You should have received a copy of the GNU General Public License |
|---|
| 19 | * along with this program; if not, write to the Free Software |
|---|
| 20 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. |
|---|
| 21 | * |
|---|
| 22 | * Author: |
|---|
| 23 | * Damian 'Mozork' Frick |
|---|
| 24 | * Co-authors: |
|---|
| 25 | * ... |
|---|
| 26 | * |
|---|
| 27 | */ |
|---|
| 28 | |
|---|
| 29 | #include "QuestNotification.h" |
|---|
| 30 | #include "core/CoreIncludes.h" |
|---|
| [7403] | 31 | #include "infos/PlayerInfo.h" |
|---|
| [2779] | 32 | |
|---|
| 33 | namespace orxonox { |
|---|
| 34 | |
|---|
| [7163] | 35 | /*static*/ const std::string QuestNotification::SENDER("questsystem"); |
|---|
| [2779] | 36 | |
|---|
| [7163] | 37 | CreateUnloadableFactory(QuestNotification); |
|---|
| 38 | |
|---|
| 39 | /** |
|---|
| 40 | @brief |
|---|
| 41 | Default Constructor. Creates a useless QuestNotification. |
|---|
| 42 | */ |
|---|
| [2779] | 43 | QuestNotification::QuestNotification(BaseObject* creator) : Notification(creator) |
|---|
| 44 | { |
|---|
| [7163] | 45 | RegisterObject(QuestNotification); |
|---|
| [2779] | 46 | } |
|---|
| [6417] | 47 | |
|---|
| [7163] | 48 | /** |
|---|
| 49 | @brief |
|---|
| 50 | Creates a QuestNotification with the input message. |
|---|
| [7401] | 51 | @param creator |
|---|
| 52 | The creator of this object |
|---|
| [7163] | 53 | @param message |
|---|
| 54 | The message to be sent. |
|---|
| 55 | */ |
|---|
| 56 | QuestNotification::QuestNotification(BaseObject* creator, const std::string & message) : Notification(creator, message) |
|---|
| [2779] | 57 | { |
|---|
| [7163] | 58 | RegisterObject(QuestNotification); |
|---|
| [2779] | 59 | } |
|---|
| [6417] | 60 | |
|---|
| [7163] | 61 | /** |
|---|
| 62 | @brief |
|---|
| 63 | Destructor. |
|---|
| 64 | */ |
|---|
| [2779] | 65 | QuestNotification::~QuestNotification() |
|---|
| 66 | { |
|---|
| [6417] | 67 | |
|---|
| [2779] | 68 | } |
|---|
| 69 | |
|---|
| [7163] | 70 | /** |
|---|
| 71 | @brief |
|---|
| 72 | Send the QuestNotification. |
|---|
| [7403] | 73 | @param player |
|---|
| 74 | The player the Notification is sent to. |
|---|
| [7163] | 75 | @return |
|---|
| 76 | Returns true if successful. |
|---|
| 77 | */ |
|---|
| [7403] | 78 | bool QuestNotification::send(PlayerInfo* player) |
|---|
| [2779] | 79 | { |
|---|
| [7403] | 80 | return this->Notification::send(player->getClientID(), QuestNotification::SENDER); |
|---|
| [2779] | 81 | } |
|---|
| 82 | |
|---|
| 83 | |
|---|
| 84 | } |
|---|