diff options
author | Andrei Karas <akaras@inbox.ru> | 2015-02-22 18:27:16 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2015-02-22 18:27:16 +0300 |
commit | 6394aa39611ce2730f4030a8ac45088ae6f20460 (patch) | |
tree | 8a5c426047960a89991e1a09ac676303c51c520f /src/being | |
parent | b6f49d9db7221c762652e94e6a52b50d4b4bc913 (diff) | |
download | ManaVerse-6394aa39611ce2730f4030a8ac45088ae6f20460.tar.gz ManaVerse-6394aa39611ce2730f4030a8ac45088ae6f20460.tar.bz2 ManaVerse-6394aa39611ce2730f4030a8ac45088ae6f20460.tar.xz ManaVerse-6394aa39611ce2730f4030a8ac45088ae6f20460.zip |
eathena: allow move pet by left shift + cursor keys.
Diffstat (limited to 'src/being')
-rw-r--r-- | src/being/playerinfo.cpp | 9 | ||||
-rw-r--r-- | src/being/playerinfo.h | 2 |
2 files changed, 11 insertions, 0 deletions
diff --git a/src/being/playerinfo.cpp b/src/being/playerinfo.cpp index 892c5bba9..23a55f6fe 100644 --- a/src/being/playerinfo.cpp +++ b/src/being/playerinfo.cpp @@ -64,6 +64,7 @@ Equipment *mEquipment = nullptr; MercenaryInfo *mMercenary = nullptr; HomunculusInfo *mHomunculus = nullptr; PetInfo *mPet = nullptr; +Being *mPetBeing = nullptr; GuildPositionFlags::Type mGuildPositionFlags = GuildPositionFlags::None; bool mTrading = false; @@ -394,6 +395,7 @@ void deinit() { clearInventory(); delete2(mMercenary); + mPetBeing = nullptr; } void loadData() @@ -406,6 +408,7 @@ void loadData() void clear() { mData.mSkills.clear(); + mPetBeing = nullptr; } bool isTalking() @@ -505,6 +508,7 @@ void setPet(PetInfo *const info) void setPetBeing(Being *const being) { + mPetBeing = being; if (!being || !mPet) return; being->setName(mPet->name); @@ -517,6 +521,11 @@ PetInfo *getPet() return mPet; } +Being *getPetBeing() +{ + return mPetBeing; +} + void setHomunculus(HomunculusInfo *const info) { if (mHomunculus) diff --git a/src/being/playerinfo.h b/src/being/playerinfo.h index 1f91f6e3d..d8272dca4 100644 --- a/src/being/playerinfo.h +++ b/src/being/playerinfo.h @@ -251,6 +251,8 @@ namespace PlayerInfo void setPetBeing(Being *const being); + Being *getPetBeing(); + HomunculusInfo *getHomunculus(); void setHomunculus(HomunculusInfo *const info); |