DeYaN. 29 Posted December 13, 2015 Share Posted December 13, 2015 (edited) Hello friends , i have two problems at weapon costume with subtype .. ( SOLVE ) When i equip the weapon at costume, i lost my weapon atack value from hand .. see the picture.The problem are VISUAL ( CLIENT ) because the damage is working fine. Spoiler Spoiler Spoiler The subtype is 15 , i`m try to test with another subtype from hair and is working . I change in protoreader.cpp the value , but the problem still be there . Spoiler static string arSub28[] = { "COSTUME_BODY", "COSTUME_HAIR", "NONE", "NONE", "NONE", "NONE", "NONE", "NONE", "NONE", "COSTUME_WEAPON_SWORD", "COSTUME_WEAPON_DAGGER", "COSTUME_WEAPON_BOW", "COSTUME_WEAPON_TWO_HANDED", "COSTUME_WEAPON_BELL", "COSTUME_WEAPON_FAN", "COSTUME_WEAPON_CLAW" }; ( SOLVE ) i can`t atack with skill in mob , "i can't use this weapon" New problem ... The ninja with bow , don`t do damage .. and the arrows don`t use .. Edited August 24, 2022 by Metin2 Dev Core X - External 2 Internal Link to comment Share on other sites More sharing options...
acidutssu 0 Posted December 13, 2015 Share Posted December 13, 2015 COSTUME_WEAPON_FAN - 15 COSTUME_WEAPON_CLAW - 16 Link to comment Share on other sites More sharing options...
DeYaN. 29 Posted December 13, 2015 Author Share Posted December 13, 2015 Not really 0 - 15 , 0 - costume body , 15 weapon_claw , i try to set the subtype 0 and the weapon is set to costume body position and the atack is working. Link to comment Share on other sites More sharing options...
Shang 369 Posted December 13, 2015 Share Posted December 13, 2015 It's only visual. Link to comment Share on other sites More sharing options...
DeYaN. 29 Posted December 14, 2015 Author Share Posted December 14, 2015 Just now, Shang said: It's only visual. Yes !!! The damage are working . Can you explain where is the problem .. ? Link to comment Share on other sites More sharing options...
Shang 369 Posted December 14, 2015 Share Posted December 14, 2015 The problem is on binary, you have to search the function which sends attack value and edit it. Link to comment Share on other sites More sharing options...
DarkAng3l 25 Posted December 14, 2015 Share Posted December 14, 2015 PythonNetworkStreamPhaseGameActor.cpp Spoiler void __SetWeaponPower(IAbstractPlayer& rkPlayer, DWORD dwWeaponID) { DWORD minPower=0; DWORD maxPower=0; DWORD minMagicPower=0; DWORD maxMagicPower=0; DWORD addPower=0; #ifdef ENABLE_COSTUME_WEAPON //DMG RESET BUG FIX dwWeaponID = rkPlayer.GetItemIndex(TItemPos(INVENTORY, c_Equipment_Weapon)); #endif CItemData* pkWeapon; if (CItemManager::Instance().GetItemDataPointer(dwWeaponID, &pkWeapon)) { if (pkWeapon->GetType()==CItemData::ITEM_TYPE_WEAPON) { minPower=pkWeapon->GetValue(3); maxPower=pkWeapon->GetValue(4); minMagicPower=pkWeapon->GetValue(1); maxMagicPower=pkWeapon->GetValue(2); addPower=pkWeapon->GetValue(5); } } #ifdef ENABLE_COSTUME_WEAPON DWORD dwItemIndex = rkPlayer.GetItemIndex(TItemPos(INVENTORY, c_Costume_Slot_Weapon)); CItemData* pkCostumeWeapon; if (CItemManager::Instance().GetItemDataPointer(dwItemIndex, &pkCostumeWeapon)) { if (pkCostumeWeapon->GetType() == CItemData::ITEM_TYPE_COSTUME && pkCostumeWeapon->GetWeaponType() == CItemData::COSTUME_WEAPON_SWORD || pkCostumeWeapon->GetWeaponType() == CItemData::COSTUME_WEAPON_DAGGER || pkCostumeWeapon->GetWeaponType() == CItemData::COSTUME_WEAPON_BOW || pkCostumeWeapon->GetWeaponType() == CItemData::COSTUME_WEAPON_TWO_HANDED || pkCostumeWeapon->GetWeaponType() == CItemData::COSTUME_WEAPON_BELL || pkCostumeWeapon->GetWeaponType() == CItemData::COSTUME_WEAPON_FAN || pkCostumeWeapon->GetWeaponType() == CItemData::COSTUME_WEAPON_CLAW) { minPower += pkCostumeWeapon->GetValue(3); maxPower += pkCostumeWeapon->GetValue(4); minMagicPower += pkCostumeWeapon->GetValue(1); maxMagicPower += pkCostumeWeapon->GetValue(2); addPower += pkCostumeWeapon->GetValue(5); } } #endif rkPlayer.SetWeaponPower(minPower, maxPower, minMagicPower, maxMagicPower, addPower); } 1 Link to comment Share on other sites More sharing options...
DeYaN. 29 Posted December 14, 2015 Author Share Posted December 14, 2015 (edited) 35 minutes ago, DarkAng3l said: PythonNetworkStreamPhaseGameActor.cpp Reveal hidden contents void __SetWeaponPower(IAbstractPlayer& rkPlayer, DWORD dwWeaponID) { DWORD minPower=0; DWORD maxPower=0; DWORD minMagicPower=0; DWORD maxMagicPower=0; DWORD addPower=0; #ifdef ENABLE_COSTUME_WEAPON //DMG RESET BUG FIX dwWeaponID = rkPlayer.GetItemIndex(TItemPos(INVENTORY, c_Equipment_Weapon)); #endif CItemData* pkWeapon; if (CItemManager::Instance().GetItemDataPointer(dwWeaponID, &pkWeapon)) { if (pkWeapon->GetType()==CItemData::ITEM_TYPE_WEAPON) { minPower=pkWeapon->GetValue(3); maxPower=pkWeapon->GetValue(4); minMagicPower=pkWeapon->GetValue(1); maxMagicPower=pkWeapon->GetValue(2); addPower=pkWeapon->GetValue(5); } } #ifdef ENABLE_COSTUME_WEAPON DWORD dwItemIndex = rkPlayer.GetItemIndex(TItemPos(INVENTORY, c_Costume_Slot_Weapon)); CItemData* pkCostumeWeapon; if (CItemManager::Instance().GetItemDataPointer(dwItemIndex, &pkCostumeWeapon)) { if (pkCostumeWeapon->GetType() == CItemData::ITEM_TYPE_COSTUME && pkCostumeWeapon->GetWeaponType() == CItemData::COSTUME_WEAPON_SWORD || pkCostumeWeapon->GetWeaponType() == CItemData::COSTUME_WEAPON_DAGGER || pkCostumeWeapon->GetWeaponType() == CItemData::COSTUME_WEAPON_BOW || pkCostumeWeapon->GetWeaponType() == CItemData::COSTUME_WEAPON_TWO_HANDED || pkCostumeWeapon->GetWeaponType() == CItemData::COSTUME_WEAPON_BELL || pkCostumeWeapon->GetWeaponType() == CItemData::COSTUME_WEAPON_FAN || pkCostumeWeapon->GetWeaponType() == CItemData::COSTUME_WEAPON_CLAW) { minPower += pkCostumeWeapon->GetValue(3); maxPower += pkCostumeWeapon->GetValue(4); minMagicPower += pkCostumeWeapon->GetValue(1); maxMagicPower += pkCostumeWeapon->GetValue(2); addPower += pkCostumeWeapon->GetValue(5); } } #endif rkPlayer.SetWeaponPower(minPower, maxPower, minMagicPower, maxMagicPower, addPower); } THX MAN !! NOW THE VISUAL DAMAGE IS WORKING !! the last problem is " i can`t atack with skill in mob , "i can't use this weapon" Edited August 24, 2022 by Metin2 Dev Core X - External 2 Internal Link to comment Share on other sites More sharing options...
DarkAng3l 25 Posted December 14, 2015 Share Posted December 14, 2015 I rewrite function GetWeaponType in InstanceBase.cpp, because I had same problem. Spoiler DWORD CInstanceBase::GetWeaponType() { DWORD dwWeapon = GetPart(CRaceData::PART_WEAPON); CItemData * pItemData; if (!CItemManager::Instance().GetItemDataPointer(dwWeapon, &pItemData)) return CItemData::WEAPON_NONE; #ifdef ENABLE_COSTUME_WEAPON if (pItemData->GetType() == CItemData::ITEM_TYPE_COSTUME) { if (pItemData->GetSubType() == CItemData::COSTUME_WEAPON_SWORD) return CItemData::WEAPON_SWORD; else if (pItemData->GetSubType() == CItemData::COSTUME_WEAPON_DAGGER) return CItemData::WEAPON_DAGGER; else if (pItemData->GetSubType() == CItemData::COSTUME_WEAPON_BOW) return CItemData::WEAPON_BOW; else if (pItemData->GetSubType() == CItemData::COSTUME_WEAPON_TWO_HANDED) return CItemData::WEAPON_TWO_HANDED; else if (pItemData->GetSubType() == CItemData::COSTUME_WEAPON_BELL) return CItemData::WEAPON_BELL; else if (pItemData->GetSubType() == CItemData::COSTUME_WEAPON_FAN) return CItemData::WEAPON_FAN; else if (pItemData->GetSubType() == CItemData::COSTUME_WEAPON_CLAW) return CItemData::WEAPON_CLAW; else return pItemData->GetWeaponType(); } #endif return pItemData->GetWeaponType(); } 1 Link to comment Share on other sites More sharing options...
DeYaN. 29 Posted December 14, 2015 Author Share Posted December 14, 2015 Just now, DarkAng3l said: I rewrite function GetWeaponType in InstanceBase.cpp, because I had same problem. Hide contents DWORD CInstanceBase::GetWeaponType() { DWORD dwWeapon = GetPart(CRaceData::PART_WEAPON); CItemData * pItemData; if (!CItemManager::Instance().GetItemDataPointer(dwWeapon, &pItemData)) return CItemData::WEAPON_NONE; #ifdef ENABLE_COSTUME_WEAPON if (pItemData->GetType() == CItemData::ITEM_TYPE_COSTUME) { if (pItemData->GetSubType() == CItemData::COSTUME_WEAPON_SWORD) return CItemData::WEAPON_SWORD; else if (pItemData->GetSubType() == CItemData::COSTUME_WEAPON_DAGGER) return CItemData::WEAPON_DAGGER; else if (pItemData->GetSubType() == CItemData::COSTUME_WEAPON_BOW) return CItemData::WEAPON_BOW; else if (pItemData->GetSubType() == CItemData::COSTUME_WEAPON_TWO_HANDED) return CItemData::WEAPON_TWO_HANDED; else if (pItemData->GetSubType() == CItemData::COSTUME_WEAPON_BELL) return CItemData::WEAPON_BELL; else if (pItemData->GetSubType() == CItemData::COSTUME_WEAPON_FAN) return CItemData::WEAPON_FAN; else if (pItemData->GetSubType() == CItemData::COSTUME_WEAPON_CLAW) return CItemData::WEAPON_CLAW; else return pItemData->GetWeaponType(); } #endif return pItemData->GetWeaponType(); } MAN !!! YOU ARE THE GOD. THX !! SOLVE ALL !! DANKEEEE xD Link to comment Share on other sites More sharing options...
DeYaN. 29 Posted December 16, 2015 Author Share Posted December 16, 2015 New problem ... The ninja with bow , don`t do damage .. and the arrows don`t use .. Link to comment Share on other sites More sharing options...
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now