devilake 0 Posted March 22, 2020 Share Posted March 22, 2020 (edited) Hello guys, i have a little problem with the Meley run. Once in a while one of my cores ( the one that is used by the run ) crashes and then i get this : https://metin2.download/picture/86iEM56V9EDRmaE5Q9YEX6HoxD2T9c5a/.png MeleyLair.cpp bool CMgrMap::IsPartecipant(DWORD dwPlayerID) { bool bCheck = std::find(v_Partecipants.begin(), v_Partecipants.end(), dwPlayerID) != v_Partecipants.end(); return bCheck; } void CMgr::OnKillCommon(LPCHARACTER pkMonster, LPCHARACTER pkChar, CGuild* pkGuild) { if ((!pkMonster) || (!pkChar) || (!pkGuild)) return; CMgrMap* pMap = m_RegGuilds.find(pkGuild->GetID())->second; if (!pMap) return; else if (!pMap->IsPartecipant(pkChar->GetPlayerID())) return; else if (pMap->GetDungeonStep() < 3) return; int iChance = number(1, 100); if (iChance > 70) { LPITEM pkItem = ITEM_MANAGER::instance().CreateItem(SEAL_VNUM_KILL_STATUE); if (!pkItem) return; PIXEL_POSITION mPos; mPos.x = pkMonster->GetX(); mPos.y = pkMonster->GetY(); pkItem->AddToGround(pMap->GetMapIndex(), mPos); pkItem->StartDestroyEvent(); pkItem->SetOwnership(pkChar, 60); } } char_battle.cpp if ((IsStone()) || (IsMonster())) { if (pkKiller) { if (((GetMobTable().dwVnum == (DWORD)(MeleyLair::MOBVNUM_RESPAWN_STONE_STEP2)) || (GetMobTable().dwVnum == (DWORD)(MeleyLair::MOBVNUM_RESPAWN_BOSS_STEP3))) && (MeleyLair::CMgr::instance().IsMeleyMap(pkKiller->GetMapIndex()))) MeleyLair::CMgr::instance().OnKill(GetMobTable().dwVnum, pkKiller->GetGuild()); else if (MeleyLair::CMgr::instance().IsMeleyMap(pkKiller->GetMapIndex())) MeleyLair::CMgr::instance().OnKillCommon(this, pkKiller, pkKiller->GetGuild()); } } If any of you has any idea about what triggers that crash and/or what can i fix, i'd appreciate it. Thanks! Edited September 11, 2022 by Metin2 Dev Core X - External 2 Internal Link to comment Share on other sites More sharing options...
Honorable Member Mali 41750 Posted March 23, 2020 Honorable Member Share Posted March 23, 2020 A year ago today Link to comment Share on other sites More sharing options...
Premium Solution WeedHex 635 Posted March 23, 2020 Premium Solution Share Posted March 23, 2020 2 hours ago, Mali61 said: A year ago today I think It doesn't fix the problem. 1 Link to comment Share on other sites More sharing options...
devilake 0 Posted March 23, 2020 Author Share Posted March 23, 2020 bool CMgrMap::IsPartecipant(DWORD dwPlayerID) { if (!dwPlayerID) return false; itertype(v_Partecipants) it = std::find(v_Partecipants.begin(), v_Partecipants.end(), dwPlayerID); if (it != v_Partecipants.end()) return true; return false; } This refactor by WeedHex helped me. Seems like the problem is solved. Thanks 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