Honorable Member xP3NG3Rx 19674 Posted July 30, 2016 Honorable Member Share Posted July 30, 2016 Hey, As I promised that I make a fix for the wolfmans pickaxe, and fishing rod holding, I'm here with it. 1.) Open GameLib\RaceData.h and find this: void RegisterAttachingBoneName(DWORD dwPartIndex, const char * c_szBoneName); Paste this below: void ChangeAttachingBoneName(DWORD dwPartIndex, const char * c_szBoneName); 2. Open GameLib\RaceData.cpp and find this function: void CRaceData::RegisterAttachingBoneName(DWORD dwPartIndex, const char * c_szBoneName) { m_AttachingBoneNameMap.insert(TAttachingBoneNameMap::value_type(dwPartIndex, c_szBoneName)); } Than paste this function below: void CRaceData::ChangeAttachingBoneName(DWORD dwPartIndex, const char * c_szBoneName) { TAttachingBoneNameMap::iterator it = m_AttachingBoneNameMap.find(dwPartIndex); if (it == m_AttachingBoneNameMap.end()) return; //m_AttachingBoneNameMap[dwPartIndex] = c_szBoneName; //bad behavior possiblity it->second = c_szBoneName; } The following modification is may different by systems like costume weapon and so on, so I give a solution for clean version, you have to make it yourself. 3.) Open GameLib\ActorInstanceAttach.cpp and find this code(or something like that with other systems): void CActorInstance::AttachWeapon(DWORD dwItemIndex,DWORD dwParentPartIndex, DWORD dwPartIndex) { //[...] __DestroyWeaponTrace(); //ľçĽŐą«±â(ŔÚ°´ Ŕ̵µ·ů) żŢĽŐ,żŔ¸ĄĽŐ ¸đµÎżˇ ŔĺÂř. if (__IsRightHandWeapon(pItemData->GetWeaponType())) AttachWeapon(dwParentPartIndex, CRaceData::PART_WEAPON, pItemData); if (__IsLeftHandWeapon(pItemData->GetWeaponType())) AttachWeapon(dwParentPartIndex, CRaceData::PART_WEAPON_LEFT, pItemData); and replace it with this: void CActorInstance::AttachWeapon(DWORD dwItemIndex,DWORD dwParentPartIndex, DWORD dwPartIndex) { //[...] DWORD dwWeaponType = pItemData->GetWeaponType(); #ifdef ENABLE_WOLFMAN_CHARACTER if (m_eRace == CRaceData::RACE_WOLFMAN_M) { char* szAttachingBoneName = "equip_right_weapon"; if (dwWeaponType != CItemData::WEAPON_CLAW) szAttachingBoneName = "equip_right"; m_pkCurRaceData->ChangeAttachingBoneName(CRaceData::PART_WEAPON, szAttachingBoneName); } #endif __DestroyWeaponTrace(); if (__IsRightHandWeapon(dwWeaponType)) AttachWeapon(dwParentPartIndex, CRaceData::PART_WEAPON, pItemData); if (__IsLeftHandWeapon(dwWeaponType)) AttachWeapon(dwParentPartIndex, CRaceData::PART_WEAPON_LEFT, pItemData); Done, build and enjoy. P3NG3R. 1 15 Link to comment Share on other sites More sharing options...
Active+ Member Abel(Tiger) 1196 Posted July 30, 2016 Active+ Member Share Posted July 30, 2016 Very good , thanks . Edit : In my source don't work with if (m_eRace == CRaceData::RACE_WOLFMAN_M) and replace with if (m_eRace == 8) because WOLFMAN is race 8 . Link to comment Share on other sites More sharing options...
Lagan 2 Posted July 30, 2016 Share Posted July 30, 2016 Only this Lines are needed. if ((GetRace() == 8) && (pItemData->GetWeaponType() == CItemData::WEAPON_SWORD) && (dwPartIndex == CRaceData::PART_WEAPON) && (pItemData->GetType()==CItemData::ITEM_TYPE_ROD || pItemData->GetType() == CItemData::ITEM_TYPE_PICK)) { szBoneName = "equip_right"; } else if (!GetAttachingBoneName(dwPartIndex, &szBoneName)) return; How to implement, try out. - i say only - look into ActorinstanceAttach and look for: "const char * szBoneName;" Best regards, Link to comment Share on other sites More sharing options...
Honorable Member xP3NG3Rx 19674 Posted July 30, 2016 Author Honorable Member Share Posted July 30, 2016 So, you are saying that: 1. If we are wolfman. &&(aaand) 2. The attaching weapon type is sword!wtf! &&(and) 3. The attaching part is weapon. &&(aaaaand!) 4. Item type is rod or pickaxe. Am I right? I reversed my code from official binary, so do not tell me how should be working, you! who selling @martysama0134's source. If anyone feel that to come and share their fix about this bug, why didn't come so far...? Shame. 5 Link to comment Share on other sites More sharing options...
Premium Crystal™ 25 Posted July 30, 2016 Premium Share Posted July 30, 2016 5 hours ago, xP3NG3Rx said: So, you are saying that: 1. If we are wolfman. &&(aaand) 2. The attaching weapon type is sword!wtf! &&(and) 3. The attaching part is weapon. &&(aaaaand!) 4. Item type is rod or pickaxe. Am I right? I reversed my code from official binary, so do not tell me how should be working, you! who selling @martysama0134's source. If anyone feel that to come and share their fix about this bug, why didn't come so far...? Shame. Can you say me please how you reversed your code from official bin? Link to comment Share on other sites More sharing options...
icewolf 27 Posted July 31, 2016 Share Posted July 31, 2016 (edited) Thanx But not working for me when i compile the source and Open the game still the same problem but when i tryied to add Spoiler #define ENABLE_WOLFMAN_CHARACTER to locale_inc and compile still the same nothing change i go back to the source and delete this line Spoiler #ifdef ENABLE_WOLFMAN_CHARACTER and Spoiler #endif when i compile it's give me Error about Wolfman Race Edited August 24, 2022 by Metin2 Dev Core X - External 2 Internal Link to comment Share on other sites More sharing options...
Active+ Member Abel(Tiger) 1196 Posted July 31, 2016 Active+ Member Share Posted July 31, 2016 (edited) 3 minutes ago, icewolf said: Thanx But not working for me when i compile the source and Open the game still the same problem but when i tryied to add Hide contents #define ENABLE_WOLFMAN_CHARACTER to locale_inc and compile still the same nothing change i go back to the source and delete this line Hide contents #ifdef ENABLE_WOLFMAN_CHARACTER and Hide contents #endif when i compile it's give me Error about Wolfman Race Replace if (m_eRace == CRaceData::RACE_WOLFMAN_M) with if (m_eRace == 8) or make a enum with all races . Edited August 24, 2022 by Metin2 Dev Core X - External 2 Internal 1 Link to comment Share on other sites More sharing options...
icewolf 27 Posted July 31, 2016 Share Posted July 31, 2016 Thanx Compile succeeded and work's Perfect but how i can make a enum with all races . !!! Link to comment Share on other sites More sharing options...
Active+ Member Abel(Tiger) 1196 Posted July 31, 2016 Active+ Member Share Posted July 31, 2016 (edited) 10 minutes ago, icewolf said: Thanx Compile succeeded and work's Perfect but how i can make a enum with all races . !!! in RaceData.h Edited August 20, 2022 by Metin2 Dev Core X - External 2 Internal 1 Link to comment Share on other sites More sharing options...
icewolf 27 Posted July 31, 2016 Share Posted July 31, 2016 Ok thanx Link to comment Share on other sites More sharing options...
stein20 15 Posted August 11, 2016 Share Posted August 11, 2016 (edited) Compile succeeded. But not working for me only it works well: (m_eRace == 8) Edited August 20, 2022 by Metin2 Dev Core X - External 2 Internal Link to comment Share on other sites More sharing options...
ds_aim 241 Posted August 11, 2016 Share Posted August 11, 2016 (edited) 2 hours ago, stein20 said: Compile succeeded. But not working for me only it works well: (m_eRace == 8) Just add enum from PythonPlayer.cpp to PythonPlayer.h as public Then include PythonPlayer.h intro StdAfx.h if not work include directly just in that file where is needed. And use CPythonPlayer:: class.. above you have an example. This is because in new binary they moved enum from PythonPlayer.cpp to RaceData.h adn they renamed inseated of example : Old : MAIN_RACE_SHAMAN_M, new RACE_SHAMAN_M, same for wolfman.. you can move entire enum intro RaceData class as public if you want to be accesed for all members and use CRaceData:: I did all those some time ago.. Intro the public source those enum is used just and just intro DWORD CPythonPlayer::GetRaceStat() FROM PythonPlayer.cpp they moved enums and renmed to give another scope .. Make it like this : RaceData.h PythonPlayer.cpp ActorInstance.cpp Edited August 20, 2022 by Metin2 Dev Core X - External 2 Internal 1 Link to comment Share on other sites More sharing options...
Honorable Member xP3NG3Rx 19674 Posted August 11, 2016 Author Honorable Member Share Posted August 11, 2016 Omg. Just add this enum into RaceData.h as public inside the CRaceData class: enum ERaces { RACE_WARRIOR_M, RACE_ASSASSIN_W, RACE_SURA_M, RACE_SHAMAN_W, RACE_WARRIOR_W, RACE_ASSASSIN_M, RACE_SURA_W, RACE_SHAMAN_M, #ifdef ENABLE_WOLFMAN_CHARACTER RACE_WOLFMAN_M, #endif RACE_MAX_NUM, }; w/ or w/o wolfman macro.. Link to comment Share on other sites More sharing options...
stein20 15 Posted August 12, 2016 Share Posted August 12, 2016 (edited) 18 hours ago, ds_aim said: Just add enum from PythonPlayer.cpp to PythonPlayer.h as public Then include PythonPlayer.h intro StdAfx.h if not work include directly just in that file where is needed. And use CPythonPlayer:: class.. above you have an example. This is because in new binary they moved enum from PythonPlayer.cpp to RaceData.h adn they renamed inseated of example : Old : MAIN_RACE_SHAMAN_M, new RACE_SHAMAN_M, same for wolfman.. you can move entire enum intro RaceData class as public if you want to be accesed for all members and use CRaceData:: I did all those some time ago.. Intro the public source those enum is used just and just intro DWORD CPythonPlayer::GetRaceStat() FROM PythonPlayer.cpp they moved enums and renmed to give another scope .. Make it like this : RaceData.h PythonPlayer.cpp ActorInstance.cpp but here there lican. xD Edited August 24, 2022 by Metin2 Dev Core X - External 2 Internal Link to comment Share on other sites More sharing options...
Active Member Mind Rapist 188 Posted August 18, 2016 Active Member Share Posted August 18, 2016 Epic! I love Wolfman character and you just helped me improve him. Thanks so much for that Link to comment Share on other sites More sharing options...
Recommended Posts