Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Sep 5, 2010, 1:29:07 PM (14 years ago)
Author:
dafrick
Message:

Re-enabling Notifications for Quests.
Notifications still only work in standalone, though.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/notifications/src/modules/questsystem/QuestDescription.h

    r7163 r7355  
    9595            /**
    9696            @brief Sends a Notification displaying that a QuestHint was added.
     97            @param player The player the Notification is sent to.
    9798            @return Returns true if successful.
    9899            */
    99             inline bool sendAddHintNotification(void)
    100                 { return notificationHelper("hint", ""); }
     100            inline bool sendAddHintNotification(PlayerInfo* player)
     101                { return notificationHelper("hint", "", player); }
    101102
    102103            /**
    103104            @brief Sends a Notification displaying that a Quest was added.
     105            @param player The player the Notification is sent to.
    104106            @return Returns true if successful.
    105107            */
    106             inline bool sendAddQuestNotification(void)
    107                 { return notificationHelper("quest", "start"); }
     108            inline bool sendAddQuestNotification(PlayerInfo* player)
     109                { return notificationHelper("quest", "start", player); }
    108110
    109111            /**
    110112            @brief Sends a Notification displaying that a Quest was failed.
     113            @param player The player the Notification is sent to.
    111114            @return Returns true if successful.
    112115            */
    113             inline bool sendFailQuestNotification(void)
    114                 { return notificationHelper("quest", "fail"); }
     116            inline bool sendFailQuestNotification(PlayerInfo* player)
     117                { return notificationHelper("quest", "fail", player); }
    115118
    116119            /**
    117120            @brief Sends a Notification displaying that a Quest was completed.
     121            @param player The player the Notification is sent to.
    118122            @return Returns true if successful.
    119123            */
    120             inline bool sendCompleteQuestNotification(void)
    121                 { return notificationHelper("quest", "complete"); }
     124            inline bool sendCompleteQuestNotification(PlayerInfo* player)
     125                { return notificationHelper("quest", "complete", player); }
    122126
    123127        private:
     
    127131            std::string completeMessage_; //!< The message displayed when the Quest is completed.
    128132
    129             bool notificationHelper(const std::string & item, const std::string & status); //!< Helper for sending QuestDescriptions as Notifications.
     133            bool notificationHelper(const std::string & item, const std::string & status, PlayerInfo* player); //!< Helper for sending QuestDescriptions as Notifications.
    130134
    131135            /**
Note: See TracChangeset for help on using the changeset viewer.