Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Nov 13, 2008, 9:55:01 PM (17 years ago)
Author:
dafrick
Message:

Changed from ControllableEntity to PlayerInfo…

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/questsystem2/src/orxonox/objects/quest/GlobalQuest.cc

    r2191 r2205  
    3636#include "GlobalQuest.h"
    3737
    38 #include "orxonox/objects/worldentities/ControllableEntity.h"
     38#include "orxonox/objects/infos/PlayerInfo.h"
    3939#include "core/CoreIncludes.h"
    4040#include "util/Exception.h"
     
    8686        Returns true if the Quest could be failed, false if not.
    8787    */
    88     bool GlobalQuest::fail(ControllableEntity* player)
     88    bool GlobalQuest::fail(PlayerInfo* player)
    8989    {
    9090        if(this->isFailable(player)) //!< Check whether the Quest can be failed.
     
    9393           
    9494            //! Iterate through all players possessing this Quest.
    95             for(std::set<ControllableEntity*>::const_iterator it = players_.begin(); it != players_.end(); it++)
     95            for(std::set<PlayerInfo*>::const_iterator it = players_.begin(); it != players_.end(); it++)
    9696            {
    9797                QuestEffect::invokeEffects(*it, this->getFailEffectList());
     
    115115        Returns true if the Quest could be completed, false if not.
    116116    */
    117     bool GlobalQuest::complete(ControllableEntity* player)
     117    bool GlobalQuest::complete(PlayerInfo* player)
    118118    {
    119119        if(this->isCompletable(player)) //!< Check whether the Quest can be completed.
     
    122122           
    123123            //! Iterate through all players possessing the Quest.
    124             for(std::set<ControllableEntity*>::const_iterator it = players_.begin(); it != players_.end(); it++)
     124            for(std::set<PlayerInfo*>::const_iterator it = players_.begin(); it != players_.end(); it++)
    125125            {
    126126                QuestEffect::invokeEffects(*it, this->getCompleteEffectList());
     
    145145        Throws an exception if either isInactive() of isActive() throws one.
    146146    */
    147     bool GlobalQuest::isStartable(const ControllableEntity* player) const
     147    bool GlobalQuest::isStartable(const PlayerInfo* player) const
    148148    {
    149149        return this->isInactive(player) ||  this->isActive(player);
     
    160160        Throws an Exception if isActive() throws one.
    161161    */
    162     bool GlobalQuest::isFailable(const ControllableEntity* player) const
     162    bool GlobalQuest::isFailable(const PlayerInfo* player) const
    163163    {
    164164        return this->isActive(player);
     
    176176        Throws an Exception if isActive() throws one.
    177177    */
    178     bool GlobalQuest::isCompletable(const ControllableEntity* player) const
     178    bool GlobalQuest::isCompletable(const PlayerInfo* player) const
    179179    {
    180180        return this->isActive(player);
     
    189189        Throws an Exception if player is NULL.
    190190    */
    191     questStatus::Enum GlobalQuest::getStatus(const ControllableEntity* player) const
     191    questStatus::Enum GlobalQuest::getStatus(const PlayerInfo* player) const
    192192    {
    193193        if(player == NULL) //!< We don't want NULL-Pointers!
    194194        {
    195             ThrowException(Argument, "The input ControllableEntity* is NULL.");
     195            ThrowException(Argument, "The input PlayerInfo* is NULL.");
    196196        }
    197197
    198198        //! Find the player.
    199         std::set<ControllableEntity*>::const_iterator it = this->players_.find((ControllableEntity*)(void*)player);
     199        std::set<PlayerInfo*>::const_iterator it = this->players_.find((PlayerInfo*)(void*)player);
    200200        if (it != this->players_.end()) //!< If the player was found.
    201201        {
     
    217217        Returns false if player is NULL.
    218218    */
    219     bool GlobalQuest::setStatus(ControllableEntity* player, const questStatus::Enum & status)
     219    bool GlobalQuest::setStatus(PlayerInfo* player, const questStatus::Enum & status)
    220220    {
    221221        if(player == NULL) //!< We don't want NULL-Pointers!
     
    225225
    226226        //! Find the player.
    227         std::set<ControllableEntity*>::const_iterator it = this->players_.find(player);
     227        std::set<PlayerInfo*>::const_iterator it = this->players_.find(player);
    228228        if (it == this->players_.end()) //!< Player is not yet in the list.
    229229        {
Note: See TracChangeset for help on using the changeset viewer.