From 49d9feae874e8eef38ee0dc44e31ea6f513297b4 Mon Sep 17 00:00:00 2001 From: Mitachi <70312009+Mitachi2611@users.noreply.github.com> Date: Mon, 5 Feb 2024 23:17:08 +0100 Subject: [PATCH] Fixed horse refresh when change seal --- Srcs-Server/game/src/char_horse.cpp | 42 +++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) diff --git a/Srcs-Server/game/src/char_horse.cpp b/Srcs-Server/game/src/char_horse.cpp index b812a76..7538def 100644 --- a/Srcs-Server/game/src/char_horse.cpp +++ b/Srcs-Server/game/src/char_horse.cpp @@ -12,6 +12,48 @@ dwMountVnum = pMountItem->GetValue(1); #endif +// then search: + + if (m_chHorse) + { + ... + } + +// and replace with this: + + if (m_chHorse) + { +#ifdef ENABLE_MOUNT_LIKE_HORSE + if (GetMountVnum() != dwVnum) { + HorseSummon(false); + HorseSummon(true); + } +#endif + return; + } + +/*Example +void CHARACTER::HorseSummon(bool bSummon, bool bFromFar, DWORD dwVnum, const char* pPetName) +{ +#ifdef ENABLE_MOUNT_LIKE_HORSE + if (const LPITEM pMountItem = GetWear(WEAR_COSTUME_MOUNT)) + dwVnum = pMountItem->GetValue(1); +#endif + if (bSummon) + { + // NOTE: If you summon and there is already a horse, it will do nothing. + if (m_chHorse) + { +#ifdef ENABLE_MOUNT_LIKE_HORSE // try fix + if (GetMountVnum() != dwVnum) { + HorseSummon(false); + HorseSummon(true); + } +#endif + return; + } +*/ + // then search: UpdatePacket();