summaryrefslogtreecommitdiff
path: root/src/being/being.h
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2014-01-11 23:00:47 +0300
committerAndrei Karas <akaras@inbox.ru>2014-01-11 23:00:47 +0300
commit0fa192854595ebe03cce54ad2b251abc4c8e8827 (patch)
treeb0129f65bc0a70926adea202756d0794db974980 /src/being/being.h
parentf9209b4a764e85a7ae0e40eee654b543d2ccf2ae (diff)
downloadmv-0fa192854595ebe03cce54ad2b251abc4c8e8827.tar.gz
mv-0fa192854595ebe03cce54ad2b251abc4c8e8827.tar.bz2
mv-0fa192854595ebe03cce54ad2b251abc4c8e8827.tar.xz
mv-0fa192854595ebe03cce54ad2b251abc4c8e8827.zip
add support for multiply pets for one player at same time.
But one item still can have only one pet.
Diffstat (limited to 'src/being/being.h')
-rw-r--r--src/being/being.h18
1 files changed, 12 insertions, 6 deletions
diff --git a/src/being/being.h b/src/being/being.h
index 634c26d23..a93d0e3db 100644
--- a/src/being/being.h
+++ b/src/being/being.h
@@ -877,21 +877,27 @@ class Being : public ActorSprite, public ConfigListener
void addPet(const int id);
- void removePet();
+ void removePet(const int id);
void updatePets();
void fixPetSpawnPos(int &dstX, int &dstY) const;
- Being *getPet()
- { return mPet; }
+ const std::vector<Being*> &getPets() const
+ { return mPets; }
- void setPet(Being *const pet)
- { mPet = pet; }
+ Being *getFirstPet()
+ { return mPets.empty() ? nullptr : mPets[0]; }
void setOwner(Being *const owner)
{ mOwner = owner; }
+ void unassignPet(Being *const pet);
+
+ void removeAllPets();
+
+ Being *findChildPet(const int id);
+
void playSfx(const SoundInfo &sound, Being *const being,
const bool main, const int x, const int y) const;
@@ -1029,7 +1035,7 @@ class Being : public ActorSprite, public ConfigListener
int *mSpriteHide;
int *mSpriteDraw;
std::string mComment;
- Being *mPet;
+ std::vector<Being*> mPets;
Being *mOwner;
Particle *mSpecialParticle;