zMyth 597 Posted April 24, 2021 Share Posted April 24, 2021 (edited) M2 Download Center This is the hidden content, please Sign In or Sign Up ( Internal ) Hello since i was looking for this system and it was "hard" to find it because Sanii's page is gone, i had to put it together taking bits of code from here and there. It is full with all the fixes and working with armor and weapon costumes. With this system you can assign an .mse file to a Vnum via 1 single .txt file It is a nice system so everyone should be able to use it. Only thing left is to adapt it for Sash's/Wing's if someone want's to do that i can post it here. Have fun. Edited August 18, 2022 by Metin2 Dev Core X - External 2 Internal 282 7 5 3 3 1 3 4 2 5 118 20 177 Link to comment Share on other sites More sharing options...
Contributor MrQuin 6402 Posted April 24, 2021 Contributor Share Posted April 24, 2021 His original one had no problem, TF are you talking about xD 1 My only accounts are here and on M2D, Don't trust anyone else from other shitty sites. Link to comment Share on other sites More sharing options...
zMyth 597 Posted April 24, 2021 Author Share Posted April 24, 2021 (edited) 48 minutes ago, MrQuin said: His original one had no problem, TF are you talking about xD Read the post again i never said the original one had a problem it was just hard to find the system and the one i found was incomplete so i had do sanii's fixes and decided to post all together for ease of acess for everyone and i've heard of people trying to sell this so now it should not be a problem xd Edited April 24, 2021 by zMyth Link to comment Share on other sites More sharing options...
Pachii 19 Posted April 24, 2021 Share Posted April 24, 2021 (edited) 8 hours ago, zMyth said: M2 Download Center This is the hidden content, please Sign In or Sign Up ( Internal ) Hello since i was looking for this system and it was "hard" to find it because Sanii's page is gone, i had to put it together taking bits of code from here and there. It is full with all the fixes and working with armor and weapon costumes. With this system you can assign an .mse file to a Vnum via 1 single .txt file It is a nice system so everyone should be able to use it. Only thing left is to adapt it for Sash's/Wing's if someone want's to do that i can post it here. Have fun. Reveal hidden contents Dl - This is the hidden content, please Sign In or Sign Up VT - This is the hidden content, please Sign In or Sign Up I have the original system. And he had a very serious problem that was ... if you have to use the hide costume the effects would not hide. In this you have the correction of that? Edited August 18, 2022 by Metin2 Dev Core X - External 2 Internal 8 3 2 1 4 7 Link to comment Share on other sites More sharing options...
Nolan 0 Posted April 25, 2021 Share Posted April 25, 2021 How can I adapt it to the hands, jersey, chopper, and dagger? It works without problems with Saifi But the rest of the characters appear in a sapphire and not in the correct form. Is there a solution for this? Link to comment Share on other sites More sharing options...
Creo 26 Posted April 25, 2021 Share Posted April 25, 2021 i was looking for solution for original code i have problem with dagger/fan weapons, when i go on mount it only shows one weapons, and second problem is when i wear animation weapon and unwear it shows weapon animation and original weapon.. someone? Link to comment Share on other sites More sharing options...
zMyth 597 Posted April 26, 2021 Author Share Posted April 26, 2021 On 4/25/2021 at 8:29 PM, Creo said: i was looking for solution for original code i have problem with dagger/fan weapons, when i go on mount it only shows one weapons, and second problem is when i wear animation weapon and unwear it shows weapon animation and original weapon.. someone? With this that problem is not hapenning only if u did something wrong Link to comment Share on other sites More sharing options...
eeevil123 1 Posted April 26, 2021 Share Posted April 26, 2021 (edited) the effects on the weapons are not seen 6 minutes ago, zMyth said: With this that problem is not hapenning only if u did something wrong I have a problem the effects on the weapons are not seen and the effects on the armor yes Edited August 18, 2022 by Metin2 Dev Core X - External 2 Internal 1 1 Link to comment Share on other sites More sharing options...
Artvr3 19 Posted May 4, 2021 Share Posted May 4, 2021 (edited) If your weapon ShiningEffect dont work just check bracket (red color on screenshot) Edited August 18, 2022 by Metin2 Dev Core X - External 2 Internal Link to comment Share on other sites More sharing options...
Creo 26 Posted May 12, 2021 Share Posted May 12, 2021 (edited) On 5/4/2021 at 7:07 PM, Artvr3 said: If your weapon ShiningEffect dont work just check bracket (red color on screenshot) On 4/26/2021 at 11:44 PM, zMyth said: With this that problem is not hapenning only if u did something wrong it looks like that https://metin2.download/picture/r8YLJr92yRRkobgMnFhriIY8x698cxga/.png Edited September 4, 2022 by Metin2 Dev Core X - External 2 Internal 6 2 1 1 4 3 2 Link to comment Share on other sites More sharing options...
Artvr3 19 Posted May 13, 2021 Share Posted May 13, 2021 (edited) @Creo my previous message was for the user @eeevil123 bcs I have some problem with that bracket. You should check the files InstanceBase.h and just double check all. #ifdef ENABLE_SHINING_SYSTEM //2-Dimensions for Left & Right sided effects DWORD m_weaponShiningEffects[2][CItemData::ITEM_SHINING_MAX_COUNT]; DWORD m_armorShiningEffects[CItemData::ITEM_SHINING_MAX_COUNT]; #endif Also core function is in instanceBase.cpp you should focus on this file to find the problem //Check for double sided weapons or fan which is attached on both sides when mounted. #ifdef ENABLE_WOLFMAN bool twoSidedWeapon = bSubType == CItemData::WEAPON_DAGGER || (IsMountingHorse() && bSubType == CItemData::WEAPON_FAN) || bSubType == CItemData::WEAPON_CLAW; #else bool twoSidedWeapon = bSubType == CItemData::WEAPON_DAGGER || (IsMountingHorse() && bSubType == CItemData::WEAPON_FAN); #endif if (twoSidedWeapon) { __AttachWeaponShiningEffect(i, shiningTable.szShinings[i], "PART_WEAPON_LEFT"); } __AttachWeaponShiningEffect(i, shiningTable.szShinings[i], "PART_WEAPON"); I use the same system and works perfectly fine after a few changes because I had to adjust it to my files https://metin2.download/picture/3MY406p4yQ8bdK65bxFO0LDM3F41dE7H/.gifv Edited August 18, 2022 by Metin2 Dev Core X - External 2 Internal 7 1 1 4 4 1 Link to comment Share on other sites More sharing options...
danhakhavro 42 Posted May 13, 2021 Share Posted May 13, 2021 (edited) On 4/26/2021 at 10:44 PM, eeevil123 said: the effects on the weapons are not seen I have a problem the effects on the weapons are not seen and the effects on the armor yes Same problem. The effect doesnt show and the sysser are empty. Maybe the configuration is wrong. If / When i discover what happen i will update the topic. FIX: The system is incomplete and there are bugs made on purpose, here I leave the resolution: Locale_inc.h ADD: #define ENABLE_SHINING_SYSTEM PythonApplication.cpp Find: if (!rkItemMgr.Loa******ngTable(szShiningTable)) and replace with: if (!rkItemMgr.LoadShiningTable(szShiningTable)) And at InstanceBase.cpp Add the bracket (red color on screenshot) Edited August 18, 2022 by Metin2 Dev Core X - External 2 Internal 1 1 1 Link to comment Share on other sites More sharing options...
Active+ Member blaxis 274 Posted June 16, 2021 Active+ Member Share Posted June 16, 2021 It worked flawlessly. Thank you. Note: If the effects appear to be corrupt, it is because the .dds files are not in the correct directory. It has nothing to do with the system. Link to comment Share on other sites More sharing options...
Cunoo 210 Posted June 23, 2021 Share Posted June 23, 2021 Would it be possible to adapt this system for use with an item? For example, create a new item with type 35+ and subtype 1 (armor) 2 (weapon)? I was thinking of not writing the item ID to the file, but the ID of the item that equips you with the effect with the subtype. For an example, take a look at Tamashii's effect system. Link to comment Share on other sites More sharing options...
qUakke 1 Posted July 12, 2021 Share Posted July 12, 2021 Hi, the system isn't working on COSTUME_WEAPON, only on armor, weapons, costumes, but on COSTUME_WEAPON there are no effects Can someone help me ? Link to comment Share on other sites More sharing options...
Cunoo 210 Posted July 13, 2021 Share Posted July 13, 2021 (edited) I found another bug, but I think last.. (deep tested) InstanceBase.cpp bool removeRefineEffect = true; This doesn't work on armor.. Any solution? Trying solved this, but I failed in it.. I think problem is SetArmor.. Here if anyone want check it // + for others, everything here is fixed except this little thing. Spoiler void CInstanceBase::__GetShiningEffect(CItemData* pItem) { bool removeRefineEffect = true; CItemData::TItemShiningTable shiningTable = pItem->GetItemShiningTable(); if (pItem->GetType() == CItemData::ITEM_TYPE_WEAPON || (pItem->GetType() == CItemData::ITEM_TYPE_COSTUME && pItem->GetSubType() == CItemData::COSTUME_WEAPON)) { BYTE bSubType = pItem->GetType() == CItemData::ITEM_TYPE_COSTUME && pItem->GetSubType() == CItemData::COSTUME_WEAPON ? pItem->GetValue(3) : pItem->GetSubType(); __ClearWeaponShiningEffect(); if (shiningTable.Any() && removeRefineEffect) { __ClearWeaponRefineEffect(); } for (int i = 0; i < CItemData::ITEM_SHINING_MAX_COUNT; i++) { if (strcmp(shiningTable.szShinings[i], "")) { if (bSubType == CItemData::WEAPON_BOW) { __AttachWeaponShiningEffect(i, shiningTable.szShinings[i], "PART_WEAPON_LEFT"); } else { bool twoSidedWeapon = bSubType == CItemData::WEAPON_DAGGER || (IsMountingHorse() && bSubType == CItemData::WEAPON_FAN); if (twoSidedWeapon) { __AttachWeaponShiningEffect(i, shiningTable.szShinings[i], "PART_WEAPON_LEFT"); } __AttachWeaponShiningEffect(i, shiningTable.szShinings[i], "PART_WEAPON"); } } } } if ((pItem->GetType() == CItemData::ITEM_TYPE_ARMOR && pItem->GetSubType() == CItemData::ARMOR_BODY) || (pItem->GetType() == CItemData::ITEM_TYPE_COSTUME && pItem->GetSubType() == CItemData::COSTUME_BODY)) { __ClearArmorShiningEffect(); if (shiningTable.Any() && removeRefineEffect) { __ClearArmorRefineEffect(); } for (int i = 0; i < CItemData::ITEM_SHINING_MAX_COUNT; i++) { if (strcmp(shiningTable.szShinings[i], "")) { __AttachArmorShiningEffect(i, shiningTable.szShinings[i]); } } } } void CInstanceBase::__AttachWeaponShiningEffect(int effectIndex, const char* effectFileName, const char* boneName) { if (IsAffect(AFFECT_INVISIBILITY)) { return; } if (effectIndex >= CItemData::ITEM_SHINING_MAX_COUNT) { return; } CEffectManager::Instance().RegisterEffect(effectFileName, false, false); if (!strcmp(boneName, "PART_WEAPON")) { const char* c_szRightBoneName; m_GraphicThingInstance.GetAttachingBoneName(CRaceData::PART_WEAPON, &c_szRightBoneName); if (strcmp(c_szRightBoneName, "")) { m_weaponShiningEffects[0][effectIndex] = m_GraphicThingInstance.AttachEffectByName(0, c_szRightBoneName, effectFileName); } } else if (!strcmp(boneName, "PART_WEAPON_LEFT")) { const char* c_szLeftBoneName; m_GraphicThingInstance.GetAttachingBoneName(CRaceData::PART_WEAPON_LEFT, &c_szLeftBoneName); if (strcmp(c_szLeftBoneName, "")) { m_weaponShiningEffects[1][effectIndex] = m_GraphicThingInstance.AttachEffectByName(0, c_szLeftBoneName, effectFileName); } } else { Tracef("Invalid partname for getting attaching bone name. %s - %s", effectFileName, boneName); } } void CInstanceBase::__AttachArmorShiningEffect(int effectIndex, const char* effectFileName, const char* boneName) { if (IsAffect(AFFECT_INVISIBILITY)) { return; } if (effectIndex >= CItemData::ITEM_SHINING_MAX_COUNT) { return; } if (!strcmp(boneName, "")) { Tracef("Empty bone name for attaching armor shining. Effect Index: %i, EffectFileName: %s", effectIndex, effectFileName); return; } CEffectManager::Instance().RegisterEffect(effectFileName, false, false); m_armorShiningEffects[effectIndex] = m_GraphicThingInstance.AttachEffectByName(0, boneName, effectFileName); } void CInstanceBase::__ClearWeaponShiningEffect(bool detaching) { if (detaching) { for (int i = 0; i < CItemData::ITEM_SHINING_MAX_COUNT; i++) { if (m_weaponShiningEffects[0][i]) { __DetachEffect(m_weaponShiningEffects[0][i]); } if (m_weaponShiningEffects[1][i]) { __DetachEffect(m_weaponShiningEffects[1][i]); } } } memset(&m_weaponShiningEffects, 0, sizeof(m_weaponShiningEffects)); } void CInstanceBase::__ClearArmorShiningEffect(bool detaching) { if (detaching) { for (int i = 0; i < CItemData::ITEM_SHINING_MAX_COUNT; i++) { if (m_armorShiningEffects[i]) { __DetachEffect(m_armorShiningEffects[i]); } } } memset(&m_armorShiningEffects, 0, sizeof(m_armorShiningEffects)); } Spoiler bool CInstanceBase::SetWeapon(DWORD eWeapon) { if (IsPoly()) return false; if (__IsShapeAnimalWear()) return false; if (__IsChangableWeapon(eWeapon) == false) eWeapon = 0; m_GraphicThingInstance.AttachWeapon(eWeapon); m_awPart[CRaceData::PART_WEAPON] = eWeapon; //Weapon Effect CItemData * pItemData; if (CItemManager::Instance().GetItemDataPointer(eWeapon, &pItemData)) { if (pItemData->GetType() == CItemData::ITEM_TYPE_COSTUME) { __ClearWeaponRefineEffect(); __ClearWeaponShiningEffect(); } __GetRefinedEffect(pItemData); __GetShiningEffect(pItemData); } else { __ClearWeaponRefineEffect(); __ClearWeaponShiningEffect(); } return true; } void CInstanceBase::SetArmor(DWORD dwArmor) { DWORD dwShape; if (__ArmorVnumToShape(dwArmor, &dwShape)) { CItemData * pItemData; if (CItemManager::Instance().GetItemDataPointer(dwArmor, &pItemData)) { float fSpecularPower=pItemData->GetSpecularPowerf(); SetShape(dwShape, fSpecularPower); __GetRefinedEffect(pItemData); __GetShiningEffect(pItemData); return; } else { __ClearArmorRefineEffect(); __ClearArmorShiningEffect(); } } SetShape(dwArmor); } Edited July 14, 2021 by Cunoo 1 Link to comment Share on other sites More sharing options...
Active+ Member Doose 1602 Posted August 8, 2021 Active+ Member Share Posted August 8, 2021 On 7/12/2021 at 7:47 PM, qUakke said: Hi, the system isn't working on COSTUME_WEAPON, only on armor, weapons, costumes, but on COSTUME_WEAPON there are no effects Can someone help me ? You need to change the type etc of an item to the costume item. Link to comment Share on other sites More sharing options...
Active+ Member Doose 1602 Posted September 2, 2021 Active+ Member Share Posted September 2, 2021 Hi, can you make this workable on sash? Please. Link to comment Share on other sites More sharing options...
arlinamid 1130 Posted October 5, 2021 Share Posted October 5, 2021 For acce: You have to do Instancebase.h Add this two line: Search this : void __ClearArmorShiningEffect(bool detaching = true); Add after: void __ClearAcceShiningEffect(bool detaching = true); void __AttachAcceShiningEffect(int effectIndex, const char* effectFileName, const char* boneName = "Bip01"); after that search this one : DWORD m_armorShiningEffects[CItemData::ITEM_SHINING_MAX_COUNT]; add after this: DWORD m_acceShiningEffects[CItemData::ITEM_SHINING_MAX_COUNT]; In InstanceBase.cpp Search this in ClearAcceEffect(); in void SetAcce add after this #ifdef ENABLE_SHINING_SYSTEM __ClearAcceShiningEffect(); #endif search this CItemData * pItemData = NULL; CItemManager::Instance().GetItemDataPointer(dwAcce, &pItemData); in void SetAcce #ifdef ENABLE_SHINING_SYSTEM if (pItemData) __GetShiningEffect(pItemData); #endif Replace the whole void __GetShiningEffect with this it will fix costume weapon effect too. void CInstanceBase::__GetShiningEffect(CItemData* pItem) { bool removeRefineEffect = true; CItemData::TItemShiningTable shiningTable = pItem->GetItemShiningTable(); if (pItem->GetType() == CItemData::ITEM_TYPE_WEAPON) { __ClearWeaponShiningEffect(); if (removeRefineEffect) { __ClearWeaponRefineEffect(); } for (int i = 0; i < CItemData::ITEM_SHINING_MAX_COUNT; i++) { if (strcmp(shiningTable.szShinings[i], "")) { bool twoSidedWeapon = pItem->GetSubType() == CItemData::WEAPON_DAGGER || (IsMountingHorse() && pItem->GetSubType() == CItemData::WEAPON_FAN); if (twoSidedWeapon) { __AttachWeaponShiningEffect(i, shiningTable.szShinings[i], "PART_WEAPON_LEFT"); } if (pItem->GetSubType() == CItemData::WEAPON_BOW) __AttachWeaponShiningEffect(i, shiningTable.szShinings[i], "PART_WEAPON_LEFT"); else __AttachWeaponShiningEffect(i, shiningTable.szShinings[i], "PART_WEAPON"); } } } #ifdef ENABLE_COSTUME_SYSTEM else if (pItem->GetType() == CItemData::ITEM_TYPE_COSTUME) { #ifdef ENABLE_ACCE_COSTUME_SYSTEM if (pItem->GetSubType() == CItemData::COSTUME_ACCE) { for (int i = 0; i < CItemData::ITEM_SHINING_MAX_COUNT; i++) { if (strcmp(shiningTable.szShinings[i], "")) { __AttachAcceShiningEffect(i, shiningTable.szShinings[i], "Bip01"); } } } #endif else if (pItem->GetSubType() == CItemData::COSTUME_BODY) { if (removeRefineEffect) { __ClearArmorRefineEffect(); } for (int i = 0; i < CItemData::ITEM_SHINING_MAX_COUNT; i++) { if (strcmp(shiningTable.szShinings[i], "")) { __AttachArmorShiningEffect(i, shiningTable.szShinings[i]); } } } #ifdef ENABLE_WEAPON_COSTUME_SYSTEM else if (pItem->GetSubType() == CItemData::COSTUME_WEAPON) { __ClearWeaponShiningEffect(); if (removeRefineEffect) { __ClearWeaponRefineEffect(); } for (int i = 0; i < CItemData::ITEM_SHINING_MAX_COUNT; i++) { if (strcmp(shiningTable.szShinings[i], "")) { bool twoSidedWeapon = pItem->GetValue(3) == CItemData::WEAPON_DAGGER || (IsMountingHorse() && pItem->GetValue(3) == CItemData::WEAPON_FAN); if (twoSidedWeapon) { __AttachWeaponShiningEffect(i, shiningTable.szShinings[i], "PART_WEAPON_LEFT"); } if (pItem->GetValue(3) == CItemData::WEAPON_BOW) __AttachWeaponShiningEffect(i, shiningTable.szShinings[i], "PART_WEAPON_LEFT"); else __AttachWeaponShiningEffect(i, shiningTable.szShinings[i], "PART_WEAPON"); } } } #endif } #endif else { if (removeRefineEffect) { __ClearArmorRefineEffect(); } for (int i = 0; i < CItemData::ITEM_SHINING_MAX_COUNT; i++) { if (strcmp(shiningTable.szShinings[i], "")) { __AttachArmorShiningEffect(i, shiningTable.szShinings[i]); } } } } paste this to end of the file: #ifdef ENABLE_SHINING_SYSTEM #ifdef ENABLE_ACCE_COSTUME_SYSTEM void CInstanceBase::__AttachAcceShiningEffect(int effectIndex, const char* effectFileName, const char* boneName) { if (IsAffect(AFFECT_INVISIBILITY)) { return; } if (effectIndex >= CItemData::ITEM_SHINING_MAX_COUNT) { return; } if (!strcmp(boneName, "")) { Tracef("Empty bone name for attaching armor shining. Effect Index: %i, EffectFileName: %s", effectIndex, effectFileName); return; } CEffectManager::Instance().RegisterEffect(effectFileName, false, false); m_acceShiningEffects[effectIndex] = m_GraphicThingInstance.AttachEffectByName(0, boneName, effectFileName); } #ifdef ENABLE_ACCE_COSTUME_SYSTEM void CInstanceBase::__ClearAcceShiningEffect(bool detaching) { for (int i = 0; i < CItemData::ITEM_SHINING_MAX_COUNT; i++) { if (detaching) { __DetachEffect(m_acceShiningEffects[i]); } m_acceShiningEffects[i] = 0; } } #endif #endif Take care about #defines may I use different. Enjoy it. Cheers. 1 Best regards, Arlinamid Link to comment Share on other sites More sharing options...
forum80 18 Posted October 7, 2021 Share Posted October 7, 2021 (edited) costume weapon system does not work https://metin2.download/picture/Qp37pr645dVZ03wa0svi3yh6hU3tW32M/.gif Edited September 4, 2022 by Metin2 Dev Core X - External 2 Internal Link to comment Share on other sites More sharing options...
rares2017 31 Posted October 9, 2021 Share Posted October 9, 2021 (edited) On 10/8/2021 at 12:22 AM, forum80 said: costume weapon system does not work https://metin2.download/picture/Qp37pr645dVZ03wa0svi3yh6hU3tW32M/.gif https://metin2.download/video/0cGdnnFzp38qLY62f55c3PM1mdsc4r31/.mp4 Edited September 4, 2022 by Metin2 Dev Core X - External 2 Internal Link to comment Share on other sites More sharing options...
forum80 18 Posted October 9, 2021 Share Posted October 9, 2021 (edited) 14 hours ago, rares2017 said: https://metin2.download/video/0cGdnnFzp38qLY62f55c3PM1mdsc4r31/.mp4 can u help me ? Edited September 4, 2022 by Metin2 Dev Core X - External 2 Internal Link to comment Share on other sites More sharing options...
PandiCore 9 Posted October 16, 2021 Share Posted October 16, 2021 Work on costume , but on costume weapon dont work , any solution? Link to comment Share on other sites More sharing options...
ARiniii 5 Posted March 21, 2022 Share Posted March 21, 2022 How to ad mde animated weapon? I'm added one set, but not working. Link to comment Share on other sites More sharing options...
bancsiandris1 0 Posted April 25, 2022 Share Posted April 25, 2022 (edited) For item scale sash System: Instancebase.h Quote Search: void __AttachWeaponShiningEffect(int effectIndex, const char* effectFileName, const char* boneName = "Bip01"); void __AttachArmorShiningEffect(int effectIndex, const char* effectFileName, const char* boneName = "Bip01"); Add after: void __ClearSashShiningEffect(bool detaching = true); void __AttachSashShiningEffect(int effectIndex, const char* effectFileName, const char* boneName = "Bip01"); Search: m_armorShiningEffects[CItemData::ITEM_SHINING_MAX_COUNT]; Add after: DWORD m_sashShiningEffects[CItemData::ITEM_SHINING_MAX_COUNT]; Instancebase.cpp Quote Search: void CInstanceBase::SetSash(DWORD dwSash) In this: ClearSashEffect(); Add after: #ifdef ENABLE_SHINING_SYSTEM __ClearSashShiningEffect(); #endif Search: CItemData* pItemData; if (!CItemManager::Instance().GetItemDataPointer(dwSash, &pItemData)) Add after: (BEFORE RETURN!) #ifdef ENABLE_SHINING_SYSTEM if (pItemData) __GetShiningEffect(pItemData); #endif Search: void CInstanceBase::__GetShiningEffect(CItemData* pItem) In this: } } } #endif Add before: #ifdef ENABLE_SASH_SYSTEM if (pItem->GetSubType() == CItemData::COSTUME_SASH) { for (int i = 0; i < CItemData::ITEM_SHINING_MAX_COUNT; i++) { if (strcmp(shiningTable.szShinings[i], "")) { __AttachSashShiningEffect(i, shiningTable.szShinings[i], "Bip01"); } } } #endif Search: void CInstanceBase::__ClearArmorShiningEffect(bool detaching) Add the last endif before: #ifdef ENABLE_SHINING_SYSTEM #ifdef ENABLE_SASH_SYSTEM void CInstanceBase::__AttachSashShiningEffect(int effectIndex, const char* effectFileName, const char* boneName) { if (IsAffect(AFFECT_INVISIBILITY)) { return; } if (effectIndex >= CItemData::ITEM_SHINING_MAX_COUNT) { return; } if (!strcmp(boneName, "")) { Tracef("Empty bone name for attaching armor shining. Effect Index: %i, EffectFileName: %s", effectIndex, effectFileName); return; } CEffectManager::Instance().RegisterEffect(effectFileName, false, false); m_sashShiningEffects[effectIndex] = m_GraphicThingInstance.AttachEffectByName(0, boneName, effectFileName); } #ifdef ENABLE_SASH_SYSTEM void CInstanceBase::__ClearSashShiningEffect(bool detaching) { for (int i = 0; i < CItemData::ITEM_SHINING_MAX_COUNT; i++) { if (detaching) { __DetachEffect(m_sashShiningEffects[i]); } m_sashShiningEffects[i] = 0; } } #endif #endif Edited April 25, 2022 by bancsiandris1 Link to comment Share on other sites More sharing options...
Recommended Posts