Premium serex 326 Posted January 9, 2019 Premium Share Posted January 9, 2019 M2 Download Center This is the hidden content, please Sign In or Sign Up ( Internal ) char_skill.cpp search: if (IS_SET(pkSk->dwFlag, SKILL_FLAG_SELFONLY)) ComputeSkill(dwVnum, this); add before: //Party buff system if (GetParty() && (dwVnum == 94 || dwVnum == 95 || dwVnum == 96 || dwVnum == 110 || dwVnum == 111)) { if (pkVictim->GetParty()){ if (pkVictim->GetParty() == GetParty()){ ComputeSkillParty(dwVnum, this); } } } 102 2 1 1 1 1 1 30 3 59 Link to comment Share on other sites More sharing options...
Zeph 8 Posted January 19, 2019 Share Posted January 19, 2019 Dnia 9.01.2019 o 16:54, serex napisał: char_skill.cpp search: if (IS_SET(pkSk->dwFlag, SKILL_FLAG_SELFONLY)) ComputeSkill(dwVnum, this); add before: //Party buff system if (GetParty() && (dwVnum == 94 || dwVnum == 95 || dwVnum == 96 || dwVnum == 110 || dwVnum == 111)) { if (pkVictim->GetParty()){ if (pkVictim->GetParty() == GetParty()){ ComputeSkillParty(dwVnum, this); } } } Hello bro, i don't have "ComputeSkillParty" function in my source so.. can you give me this? I changed this to "ComputeSkill" but i can buff only on 2 players on group. Link to comment Share on other sites More sharing options...
ManiacRobert 429 Posted January 20, 2019 Share Posted January 20, 2019 Acum 11 ore, Zeph a spus: Hello bro, i don't have "ComputeSkillParty" function in my source so.. can you give me this? I changed this to "ComputeSkill" but i can buff only on 2 players on group. search on wolfman branch Link to comment Share on other sites More sharing options...
Zeph 8 Posted January 20, 2019 Share Posted January 20, 2019 7 godzin temu, ManiacRobert napisał: search on wolfman branch I download source from this topic: But i can't find this there, can you help me? In "dev_wolf_branch" i can't find there too ;/ Link to comment Share on other sites More sharing options...
Premium serex 326 Posted January 21, 2019 Author Premium Share Posted January 21, 2019 En 19/1/2019 a las 17:47, Zeph dijo: Hello bro, i don't have "ComputeSkillParty" function in my source so.. can you give me this? I changed this to "ComputeSkill" but i can buff only on 2 players on group. struct FComputeSkillParty { FComputeSkillParty(DWORD dwVnum, LPCHARACTER pkAttacker, BYTE bSkillLevel = 0) : m_dwVnum(dwVnum), m_pkAttacker(pkAttacker), m_bSkillLevel(bSkillLevel) { } void operator () (LPCHARACTER ch) { m_pkAttacker->ComputeSkill(m_dwVnum, ch, m_bSkillLevel); } DWORD m_dwVnum; LPCHARACTER m_pkAttacker; BYTE m_bSkillLevel; }; int CHARACTER::ComputeSkillParty(DWORD dwVnum, LPCHARACTER pkVictim, BYTE bSkillLevel) { FComputeSkillParty f(dwVnum, pkVictim, bSkillLevel); if (GetParty() && GetParty()->GetNearMemberCount()) GetParty()->ForEachNearMember(f); else f(this); return BATTLE_NONE; } Link to comment Share on other sites More sharing options...
Zeph 8 Posted January 22, 2019 Share Posted January 22, 2019 Dnia 21.01.2019 o 11:21, serex napisał: struct FComputeSkillParty { FComputeSkillParty(DWORD dwVnum, LPCHARACTER pkAttacker, BYTE bSkillLevel = 0) : m_dwVnum(dwVnum), m_pkAttacker(pkAttacker), m_bSkillLevel(bSkillLevel) { } void operator () (LPCHARACTER ch) { m_pkAttacker->ComputeSkill(m_dwVnum, ch, m_bSkillLevel); } DWORD m_dwVnum; LPCHARACTER m_pkAttacker; BYTE m_bSkillLevel; }; int CHARACTER::ComputeSkillParty(DWORD dwVnum, LPCHARACTER pkVictim, BYTE bSkillLevel) { FComputeSkillParty f(dwVnum, pkVictim, bSkillLevel); if (GetParty() && GetParty()->GetNearMemberCount()) GetParty()->ForEachNearMember(f); else f(this); return BATTLE_NONE; } Thank you Link to comment Share on other sites More sharing options...
r00t3r 67 Posted September 25, 2019 Share Posted September 25, 2019 after tests is doing crash core, but i don`t know why Link to comment Share on other sites More sharing options...
Forum Moderator VegaS™ 10275 Posted September 25, 2019 Forum Moderator Share Posted September 25, 2019 1 hour ago, sonyc73 said: after tests is doing crash core, but i don`t know why There's no check for victim pointer. // Replace: if (pkVictim->GetParty()) // With: if (pkVictim && pkVictim->GetParty()) 2 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...
Premium Hunger 472 Posted September 26, 2019 Premium Share Posted September 26, 2019 (edited) Solved: in char.h i had the macro for wolfman: #ifdef ENABLE_WOLFMAN_CHARACTER int ComputeSkillParty(DWORD dwVnum, LPCHARACTER pkVictim, BYTE bSkillLevel = 0); #endif Edited August 21, 2022 by Metin2 Dev Core X - External 2 Internal Link to comment Share on other sites More sharing options...
r00t3r 67 Posted September 27, 2019 Share Posted September 27, 2019 La 26.09.2019 la 1:05, VegaS™ a spus: There's no check for victim pointer. // Replace: if (pkVictim->GetParty()) // With: if (pkVictim && pkVictim->GetParty()) Thx Vegas, is ok now ! Link to comment Share on other sites More sharing options...
Bot Metin2 Dev 4884 Posted September 30, 2019 Bot Share Posted September 30, 2019 (edited) On 1/19/2019 at 5:47 PM, Zeph said: //Party buff system if (GetParty() && (dwVnum == 94 || dwVnum == 95 || dwVnum == 96 || dwVnum == 110 || dwVnum == 111)) { if (pkVictim->GetParty()){ if (pkVictim->GetParty() == GetParty()){ ComputeSkillParty(dwVnum, this); } } } If you add this, you can give buffs to people who are not in your group: if (GetParty() && (dwVnum == 94 || dwVnum == 95 || dwVnum == 96 || dwVnum == 109 || dwVnum == 110 || dwVnum == 111)) { if (pkVictim && pkVictim->GetParty()) { if (pkVictim->GetParty() == GetParty()) { if (GetParty()->GetNearMemberCount()) ComputeSkillParty(dwVnum, this); else ComputeSkill(dwVnum, pkVictim); } else ComputeSkill(dwVnum, pkVictim); } else if (pkVictim && !pkVictim->GetParty()) { ComputeSkill(dwVnum, pkVictim); } } Edited June 1, 2020 by M2Dev You can give buffs yourself, if dont have near members on party 1 1 2 Link to comment Share on other sites More sharing options...
Paulo 6 Posted June 26, 2021 Share Posted June 26, 2021 I really want to use this buff function, but it doesn't work because of the error Link to comment Share on other sites More sharing options...
dawnofthedead15 7 Posted July 12, 2021 Share Posted July 12, 2021 im getting this error char_skill.cpp:2688:33: error: qualified-id in declaration before '(' token 2688 | int CHARACTER::ComputeSkillParty(DWORD dwVnum, LPCHARACTER pkVictim, BYTE bSkillLevel) Link to comment Share on other sites More sharing options...
xabugas123 1 Posted March 1, 2022 Share Posted March 1, 2022 works fine thx Link to comment Share on other sites More sharing options...
Resist0 36 Posted March 4, 2022 Share Posted March 4, 2022 Works fine thanks, how can i remove the range for buff ? Link to comment Share on other sites More sharing options...
Tuckii 10 Posted September 7, 2022 Share Posted September 7, 2022 (edited) It doens't seem to work for me, tried computeskillparty withoput party, tried with struct and everything possible I think https://metin2.download/picture/h6S17UrA171NZ8oRB4n8rSJoWVtC6Jfc/.png Edited September 11, 2022 by Metin2 Dev Core X - External 2 Internal Link to comment Share on other sites More sharing options...
marinebun 30 Posted April 22, 2023 Share Posted April 22, 2023 (edited) when i compile the game i have the following errors: Edited April 22, 2023 by marinebun Link to comment Share on other sites More sharing options...
Developer Mitachi 1455 Posted May 2, 2023 Developer Share Posted May 2, 2023 (edited) I did a small refactory, not tested yet: This is the hidden content, please Sign In or Sign Up Edited December 10, 2023 by Mitachi 43 1 10 3 16 Link to comment Share on other sites More sharing options...
Recommended Posts