~ubuntu-branches/ubuntu/trusty/manaplus/trusty

« back to all changes in this revision

Viewing changes to src/being/playerrelations.h

  • Committer: Package Import Robot
  • Author(s): Patrick Matthäi
  • Date: 2013-10-07 10:26:14 UTC
  • mfrom: (1.1.11)
  • Revision ID: package-import@ubuntu.com-20131007102614-tg2zjdz8vmtl6n7i
Tags: 1.3.9.29-1
New upstream release.

Show diffs side-by-side

added added

removed removed

Lines of Context:
79
79
        std::string mDescription;
80
80
        std::string mShortName;
81
81
 
 
82
        A_DELETE_COPY(PlayerIgnoreStrategy)
 
83
 
 
84
        virtual ~PlayerIgnoreStrategy()
 
85
        { }
 
86
 
 
87
        /**
 
88
         * Handle the ignoring of the indicated action by the indicated player.
 
89
         */
 
90
        virtual void ignore(Being *const being,
 
91
                            const unsigned int flags) const = 0;
 
92
    protected:
82
93
        PlayerIgnoreStrategy() :
83
94
            mDescription(),
84
95
            mShortName()
85
96
        {
86
97
        }
87
 
 
88
 
        A_DELETE_COPY(PlayerIgnoreStrategy)
89
 
 
90
 
        virtual ~PlayerIgnoreStrategy()
91
 
        { }
92
 
 
93
 
        /**
94
 
         * Handle the ignoring of the indicated action by the indicated player.
95
 
         */
96
 
        virtual void ignore(Being *const being,
97
 
                            const unsigned int flags) const = 0;
98
98
};
99
99
 
100
100
class PlayerRelationsListener
101
101
{
102
102
    public:
103
 
        PlayerRelationsListener()
104
 
        { }
105
 
 
106
103
        virtual ~PlayerRelationsListener()
107
104
        { }
108
105
 
109
106
        virtual void updatedPlayer(const std::string &name) = 0;
110
107
 
111
108
        virtual void updateAll() = 0;
 
109
 
 
110
    protected:
 
111
        PlayerRelationsListener()
 
112
        { }
112
113
};
113
114
 
114
115
/**
240
241
        bool getPersistIgnores() const
241
242
        { return mPersistIgnores; }
242
243
 
243
 
        void ignoreTrade(const std::string &name);
 
244
        void ignoreTrade(const std::string &name) const;
244
245
 
245
246
        bool isGoodName(Being *const being) const A_WARN_UNUSED;
246
247