Premium filipw1 1928 Posted July 22, 2022 Premium Share Posted July 22, 2022 (edited) There is a problem, when you change position of horse riding skill in playersettingsmodule, you cannot use horse skills. For me, the way skills work on the client side of thing is really dumb, but they went even furher. I don't understand why, client checks if player has a horse riding level from the fixed skill slot, not from skill info itself. Spoiler Without my fix, it goes like this: Spoiler With fix: Spoiler Actual fix: Spoiler // PythonPlayerInput.cpp // find: bool CPythonPlayer::__CanAttack() { [...] } // Replace with: extern const DWORD c_iSkillIndex_Riding; bool CPythonPlayer::__CanAttack() { if (__IsProcessingEmotion()) { return false; } if (IsOpenPrivateShop()) return false; if (IsObserverMode()) return false; CInstanceBase* pkInstMain = NEW_GetMainActorPtr(); if (!pkInstMain) return false; DWORD dwSkillIndex = 0; GetSkillSlotIndex(c_iSkillIndex_Riding, &dwSkillIndex); if (pkInstMain->IsMountingHorse() && pkInstMain->IsNewMount() && (GetSkillGrade(dwSkillIndex) < 1 && GetSkillLevel(dwSkillIndex) < 11)) { return false; } return pkInstMain->CanAttack(); } // PythonPlayerSkill.cpp // Find: bool CPythonPlayer::__CanUseSkill() { [...] } // Replace with: extern const DWORD c_iSkillIndex_Riding; bool CPythonPlayer::__CanUseSkill() { CInstanceBase* pkInstMain=NEW_GetMainActorPtr(); if (!pkInstMain) return false; if (IsObserverMode()) return false; DWORD dwSkillIndex = 0; GetSkillSlotIndex(c_iSkillIndex_Riding, &dwSkillIndex); if (pkInstMain->IsMountingHorse() && (GetSkillGrade(dwSkillIndex) < 1 && GetSkillLevel(dwSkillIndex) < 20)) { return false; } return pkInstMain->CanUseSkill(); } Edited August 26, 2022 by Metin2 Dev Core X - External 2 Internal 4 5 1 Link to comment Share on other sites More sharing options...
Jimmermania 27 Posted July 22, 2022 Share Posted July 22, 2022 (edited) Hello,thanks for your share.While compile, i have this error: ERROR Edited September 4, 2022 by Metin2 Dev Core X - External 2 Internal Link to comment Share on other sites More sharing options...
Premium WeedHex 635 Posted July 22, 2022 Premium Share Posted July 22, 2022 (edited) 25 minutes ago, Jimmermania said: Hello,thanks for your share.While compile, i have this error: ERROR Because he doesn't know what's doing. Edited September 4, 2022 by Metin2 Dev Core X - External 2 Internal 1 Link to comment Share on other sites More sharing options...
Premium filipw1 1928 Posted July 22, 2022 Author Premium Share Posted July 22, 2022 (edited) 1 hour ago, Jimmermania said: Hello,thanks for your share.While compile, i have this error: ERROR Check code, I missed one line Edited September 4, 2022 by Metin2 Dev Core X - External 2 Internal Link to comment Share on other sites More sharing options...
Honorable Member martysama0134 7175 Posted July 22, 2022 Honorable Member Share Posted July 22, 2022 (edited) This is what I did some time ago: DWORD GetHorseSkillSlotIndex() { constexpr auto HorseSkillIndex = 130; static DWORD RequireSkillSlotIndex = 0; if (!RequireSkillSlotIndex) CPythonPlayer::Instance().FindSkillSlotIndexBySkillIndex(HorseSkillIndex, &RequireSkillSlotIndex); return RequireSkillSlotIndex; } bool CPythonPlayer::__CanUseSkill() { CInstanceBase* pkInstMain=NEW_GetMainActorPtr(); if (!pkInstMain) return false; if (IsObserverMode()) return false; // Terrible skill slot index managament if (pkInstMain->IsMountingHorse() && (GetSkillGrade(GetHorseSkillSlotIndex()) < 1 && GetSkillLevel(GetHorseSkillSlotIndex()) < 20)) return false; return pkInstMain->CanUseSkill(); } bool CPythonPlayer::__CanAttack() { if (__IsProcessingEmotion()) return false; if (IsOpenPrivateShop()) return false; if (IsObserverMode()) return false; CInstanceBase* pkInstMain=NEW_GetMainActorPtr(); if (!pkInstMain) return false; // Terrible skill slot index managament if (pkInstMain->IsMountingHorse() && pkInstMain->IsNewMount() && (GetSkillGrade(GetHorseSkillSlotIndex()) < 1 && GetSkillLevel(GetHorseSkillSlotIndex()) < 11)) return false; return pkInstMain->CanAttack(); } I haven't tested your solution, but using GetSkillSlotIndex should be better than FindSkillSlotIndexBySkillIndex. Edited July 22, 2022 by martysama0134 2 1 Check out my GitHub Link to comment Share on other sites More sharing options...
Active Member Thorek 280 Posted July 22, 2022 Active Member Share Posted July 22, 2022 (edited) 2 hours ago, WeedHex said: Because he doesn't know what's doing. No, because some people can't use brain. Edited July 22, 2022 by Thorek Link to comment Share on other sites More sharing options...
Active Member ReFresh 2340 Posted July 22, 2022 Active Member Share Posted July 22, 2022 (edited) So, if I'm not mistaken, we can do that like the @martysama0134 said and we can add the DWORD GetHorseSkillSlotIndex() to PythonPlayer.h to make the function shared in CPythonPlayer class. This is the hidden content, please Sign In or Sign Up Edited July 22, 2022 by ReFresh 31 5 7 I'll be always helpful! Link to comment Share on other sites More sharing options...
Honorable Member martysama0134 7175 Posted July 22, 2022 Honorable Member Share Posted July 22, 2022 5 minutes ago, ReFresh said: So, if I'm not mistaken, we can do that like the @martysama0134 said and we can add the DWORD GetHorseSkillSlotIndex() to PythonPlayer.h to make the function shared in CPythonPlayer class. Yes, if you want. Check out my GitHub Link to comment Share on other sites More sharing options...
Premium filipw1 1928 Posted July 22, 2022 Author Premium Share Posted July 22, 2022 Yes, write more functions to simple one line fix, gj 1 Link to comment Share on other sites More sharing options...
Tunga 10 Posted July 22, 2022 Share Posted July 22, 2022 i've noticed that bug when i changed skill order. its really pathetic to get information from the order. i was disabled that check because in these days you know people are using premium mounts and its formality to give them level 30 horse or check that info but as i said its my opinion. btw as i remember required horse level for horse skill is 20. thanks for share. Link to comment Share on other sites More sharing options...
Recommended Posts