diff options
author | Andrei Karas <akaras@inbox.ru> | 2014-09-21 13:44:03 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2014-09-21 13:44:03 +0300 |
commit | 46d1266f00dfde5d04d7980daea4bab02e77cb69 (patch) | |
tree | adfaa8bdc5b96bf951de15119b1a0854e2eedc9f /src/being/being.cpp | |
parent | ba88670fe4b5f4606f80651f6433cc755ab6b6c1 (diff) | |
download | manaplus-46d1266f00dfde5d04d7980daea4bab02e77cb69.tar.gz manaplus-46d1266f00dfde5d04d7980daea4bab02e77cb69.tar.bz2 manaplus-46d1266f00dfde5d04d7980daea4bab02e77cb69.tar.xz manaplus-46d1266f00dfde5d04d7980daea4bab02e77cb69.zip |
Use MercenaryInfo object for storing mercenary attributes.
Diffstat (limited to 'src/being/being.cpp')
-rw-r--r-- | src/being/being.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/being/being.cpp b/src/being/being.cpp index 40d20fe98..047d351fc 100644 --- a/src/being/being.cpp +++ b/src/being/being.cpp @@ -259,7 +259,11 @@ Being::~Being() delete2(mChat); if (mOwner) - mOwner->unassignPet(this); + { + if (mType == ActorType::LocalPet) + mOwner->unassignPet(this); + mOwner = nullptr; + } FOR_EACH (std::vector<Being*>::iterator, it, mPets) { Being *pet = *it; |