diff options
author | Andrei Karas <akaras@inbox.ru> | 2016-08-24 01:53:38 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2016-08-24 01:53:38 +0300 |
commit | 2aa9b09d4dfa139941c5a0e1e72acd11f9f4fca2 (patch) | |
tree | 383e56eb9194661c86aa6b220d069f1afacf0c79 /src | |
parent | 6a67f52f6b82bb8c6259eb0b9282ab543347b9ee (diff) | |
download | manaverse-2aa9b09d4dfa139941c5a0e1e72acd11f9f4fca2.tar.gz manaverse-2aa9b09d4dfa139941c5a0e1e72acd11f9f4fca2.tar.bz2 manaverse-2aa9b09d4dfa139941c5a0e1e72acd11f9f4fca2.tar.xz manaverse-2aa9b09d4dfa139941c5a0e1e72acd11f9f4fca2.zip |
Remove some more local pet related code.
Diffstat (limited to 'src')
-rw-r--r-- | src/actions/pets.cpp | 12 | ||||
-rw-r--r-- | src/being/being.cpp | 31 | ||||
-rw-r--r-- | src/being/being.h | 9 |
3 files changed, 0 insertions, 52 deletions
diff --git a/src/actions/pets.cpp b/src/actions/pets.cpp index b978b26b5..35efe0ea0 100644 --- a/src/actions/pets.cpp +++ b/src/actions/pets.cpp @@ -56,18 +56,6 @@ namespace Actions static const Being *getPet() { -#ifdef TMWA_SUPPORT - if (!localPlayer) - return nullptr; - - if (Net::getNetworkType() == ServerType::TMWATHENA) - { - const std::vector<Being*> &pets = localPlayer->getPets(); - if (pets.empty()) - return nullptr; - return *pets.begin(); - } -#endif const BeingId id = PlayerInfo::getPetBeingId(); if (id == BeingId_zero) return nullptr; diff --git a/src/being/being.cpp b/src/being/being.cpp index f82fc4dfe..6cb9f8366 100644 --- a/src/being/being.cpp +++ b/src/being/being.cpp @@ -207,7 +207,6 @@ Being::Being(const BeingId id, mComment(), mBuyBoard(), mSellBoard(), - mPets(), mOwner(nullptr), mSpecialParticle(nullptr), mChat(nullptr), @@ -339,18 +338,6 @@ Being::~Being() delete2(mChat); removeHorse(); - FOR_EACH (std::vector<Being*>::iterator, it, mPets) - { - Being *pet = *it; - if (pet) - { - pet->setOwner(nullptr); - actorManager->erase(pet); - delete pet; - } - } - mPets.clear(); - removeAllItemsParticles(); mSpiritParticles.clear(); } @@ -1904,13 +1891,6 @@ void Being::logic() restrict2 actorManager->destroy(this); } - FOR_EACH (std::vector<Being*>::iterator, it, mPets) - { - Being *const pet = *it; - if (pet) - pet->petLogic(); - } - const SoundInfo *restrict const sound = mNextSound.sound; if (sound) { @@ -4643,17 +4623,6 @@ void Being::addEffect(const std::string &restrict name) restrict2 paths.getStringValue("sprites") + name); } -Being *Being::findChildPet(const BeingId id) restrict2 -{ - FOR_EACH (std::vector<Being*>::iterator, it, mPets) - { - Being *restrict const pet = *it; - if (pet && pet->mId == id) - return pet; - } - return nullptr; -} - void Being::fixPetSpawnPos(int &restrict dstX, int &restrict dstY) const { diff --git a/src/being/being.h b/src/being/being.h index 7a52df675..1f34d6f9b 100644 --- a/src/being/being.h +++ b/src/being/being.h @@ -895,20 +895,12 @@ class Being notfinal : public ActorSprite, void fixPetSpawnPos(int &restrict dstX, int &restrict dstY) const restrict2; - const std::vector<Being*> &getPets() const restrict2 noexcept2 - { return mPets; } - - Being *getFirstPet() restrict2 - { return mPets.empty() ? nullptr : mPets[0]; } - void setOwner(Being *restrict const owner) restrict2 noexcept2 { mOwner = owner; } Being *getOwner() const restrict2 noexcept2 { return mOwner; } - Being *findChildPet(const BeingId id) restrict2; - void playSfx(const SoundInfo &sound, Being *restrict const being, const bool main, @@ -1231,7 +1223,6 @@ class Being notfinal : public ActorSprite, std::string mComment; std::string mBuyBoard; std::string mSellBoard; - std::vector<Being*> mPets; Being *restrict mOwner; Particle *restrict mSpecialParticle; ChatObject *restrict mChat; |