Sevenfoldia 28 Posted September 6, 2022 Share Posted September 6, 2022 Hello everyone, In PythonItem.cpp, there is function for original effect for items on the ground. void CPythonItem::Create() { CEffectManager::Instance().RegisterEffect2("d:/ymir work/effect/etc/dropitem/dropitem.mse", &m_dwDropItemEffectID); } I want to add effects for different item IDs separately. For example: for item ID 71084, 71085 I want to use effect dropitem_rare.mse and for all other items I want to use original dropitem.mse, Can somebody help me with this please? Thank you for all your advices. Link to comment Share on other sites More sharing options...
Forum Moderator VegaS™ 10275 Posted September 6, 2022 Forum Moderator Share Posted September 6, 2022 (edited) PythonItem.cpp This is the hidden content, please Sign In or Sign Up PythonItem.h This is the hidden content, please Sign In or Sign Up Edited September 6, 2022 by VegaS™ 41 1 1 7 1 12 Check my GitHub Profile Click to find all the threads started by me [TOOL] Text file loader + JSON Link to comment Share on other sites More sharing options...
Sevenfoldia 28 Posted September 6, 2022 Author Share Posted September 6, 2022 (edited) 17 minutes ago, VegaS™ said: PythonItem.cpp Hidden Content // Search for: CEffectManager::Instance().RegisterEffect2("d:/ymir work/effect/etc/dropitem/dropitem.mse", &m_dwDropItemEffectID); // Add after: CEffectManager::Instance().RegisterEffect2("d:/ymir work/effect/etc/dropitem/dropitem_rare.mse", &m_dwDropItemRareEffectID); // Search for: CEffectManager & rem =CEffectManager::Instance(); pGroundItemInstance->dwEffectInstanceIndex = rem.CreateEffect(m_dwDropItemEffectID, D3DXVECTOR3(x, -y, z), D3DXVECTOR3(0,0,0)); // Replace with: static const auto s_rare_items = { 71084, 71085 }; auto effectID = m_dwDropItemEffectID; if (std::find(s_rare_items.begin(), s_rare_items.end(), dwVirtualNumber) != s_rare_items.end()) effectID = m_dwDropItemRareEffectID; pGroundItemInstance->dwEffectInstanceIndex = CEffectManager::Instance().CreateEffect(effectID, D3DXVECTOR3(x, -y, z), D3DXVECTOR3(0, 0, 0)); PythonItem.h Hidden Content // Search for: DWORD m_dwDropItemEffectID; // Add after: DWORD m_dwDropItemRareEffectID; Thank you very much! It is awesome. Here is image Edited September 11, 2022 by Metin2 Dev Core X - External 2 Internal 1 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