solitary 2 dungeon
Similar Content
-
Activity
-
-
1
Adding 5 extra bonuses (6/7 but till 10) causing CClientManager::RESULT_ITEM_LOAD raises error: Cannot access memory at address Dump
update 999, seems like after adding 3 bonuses on an item it is succesfuly inserted into the db, but client instantly crashes with no syserr when a item with the 3rd bonus is present on the char Do you guys have any advice on where I should add them on client side to be visible? I m expecting some range on python side or something like that but not sure where Fixed the unprocessed packets too, seems like having null attrs in db is not ok fixed the client problem too, had to increase ITEM_ATTRIBUTE_SLOT_RARE_NUM on client side -
1
Adding 5 extra bonuses (6/7 but till 10) causing CClientManager::RESULT_ITEM_LOAD raises error: Cannot access memory at address Dump
So I'm trying to add 5 extra bonuses (6/7, but till 10) But with a catch too First 3 bonuses should be added from item_attr_rare table, last 2 from item_attr_rare_pvp (so i added a new table, duplicate from item attr rare) Then I proceeded to increase the item bonus count and limits: enum EItemMisc { ITEM_NAME_MAX_LEN = 24, ITEM_VALUES_MAX_NUM = 6, ITEM_SMALL_DESCR_MAX_LEN = 256, ITEM_LIMIT_MAX_NUM = 2, ITEM_APPLY_MAX_NUM = 3, ITEM_SOCKET_MAX_NUM = 3, ITEM_MAX_COUNT = 200, ITEM_ATTRIBUTE_NORM_NUM = 5, ITEM_ATTRIBUTE_RARE_NUM = 3, #ifdef BETTER_67 ITEM_ATTRIBUTE_RARE_PVP_NUM = 2, #endif ITEM_ATTRIBUTE_NORM_START = 0, ITEM_ATTRIBUTE_NORM_END = ITEM_ATTRIBUTE_NORM_START + ITEM_ATTRIBUTE_NORM_NUM, ITEM_ATTRIBUTE_RARE_START = ITEM_ATTRIBUTE_NORM_END, ITEM_ATTRIBUTE_RARE_END = ITEM_ATTRIBUTE_RARE_START + ITEM_ATTRIBUTE_RARE_NUM, #ifdef BETTER_67 ITEM_ATTRIBUTE_RARE_PVP_START = ITEM_ATTRIBUTE_RARE_END, #endif #ifdef BETTER_67 ITEM_ATTRIBUTE_RARE_PVP_END = ITEM_ATTRIBUTE_RARE_PVP_START + ITEM_ATTRIBUTE_RARE_PVP_NUM, ITEM_ATTRIBUTE_MAX_NUM = ITEM_ATTRIBUTE_RARE_PVP_END, // 7 #else ITEM_ATTRIBUTE_MAX_NUM = ITEM_ATTRIBUTE_RARE_END, // 7 #endif ITEM_ATTRIBUTE_MAX_LEVEL = 5, ITEM_AWARD_WHY_MAX_LEN = 50, REFINE_MATERIAL_MAX_NUM = 5, ITEM_ELK_VNUM = 50026, }; Created a new vector to store these new bonuses: std::vector<TItemAttrTable> m_vec_itemRarePvpTable; // New vector to store item_attr_rare_pvp data And now i read from the db, and for each row create a TItemAttrTable object, which i then add to the above vector: #ifdef BETTER_67 bool CClientManager::InitializeItemRarePvpTable() { char query[4096]; snprintf(query, sizeof(query), "SELECT apply, apply+0, prob, lv1, lv2, lv3, lv4, lv5, weapon, body, wrist, foots, neck, head, shield, ear " #ifdef ENABLE_ITEM_ATTR_COSTUME ", costume_body, costume_hair" #if defined(ENABLE_ITEM_ATTR_COSTUME) && defined(ENABLE_WEAPON_COSTUME_SYSTEM) ", costume_weapon" #endif #endif #ifdef ENABLE_PENDANT_SYSTEM ", pendant" #endif #ifdef ENABLE_GLOVE_SYSTEM ", glove" #endif " FROM item_attr_rare_pvp%s ORDER BY apply", GetTablePostfix()); auto pkMsg(CDBManager::instance().DirectQuery(query)); SQLResult *pRes = pkMsg->Get(); if (!pRes->uiNumRows) { sys_err("no result from item_attr_rare_pvp"); return false; } if (!m_vec_itemRarePvpTable.empty()) { sys_log(0, "RELOAD: item_attr_rare_pvp"); m_vec_itemRarePvpTable.clear(); } m_vec_itemRarePvpTable.reserve(pRes->uiNumRows); MYSQL_ROW data; while ((data = mysql_fetch_row(pRes->pSQLResult))) { TItemAttrTable t{}; int col = 0; strlcpy(t.szApply, data[col++], sizeof(t.szApply)); str_to_number(t.dwApplyIndex, data[col++]); str_to_number(t.dwProb, data[col++]); str_to_number(t.lValues[0], data[col++]); str_to_number(t.lValues[1], data[col++]); str_to_number(t.lValues[2], data[col++]); str_to_number(t.lValues[3], data[col++]); str_to_number(t.lValues[4], data[col++]); str_to_number(t.bMaxLevelBySet[ATTRIBUTE_SET_WEAPON], data[col++]); str_to_number(t.bMaxLevelBySet[ATTRIBUTE_SET_BODY], data[col++]); str_to_number(t.bMaxLevelBySet[ATTRIBUTE_SET_WRIST], data[col++]); str_to_number(t.bMaxLevelBySet[ATTRIBUTE_SET_FOOTS], data[col++]); str_to_number(t.bMaxLevelBySet[ATTRIBUTE_SET_NECK], data[col++]); str_to_number(t.bMaxLevelBySet[ATTRIBUTE_SET_HEAD], data[col++]); str_to_number(t.bMaxLevelBySet[ATTRIBUTE_SET_SHIELD], data[col++]); str_to_number(t.bMaxLevelBySet[ATTRIBUTE_SET_EAR], data[col++]); #ifdef ENABLE_ITEM_ATTR_COSTUME str_to_number(t.bMaxLevelBySet[ATTRIBUTE_SET_COSTUME_BODY], data[col++]); str_to_number(t.bMaxLevelBySet[ATTRIBUTE_SET_COSTUME_HAIR], data[col++]); #if defined(ENABLE_ITEM_ATTR_COSTUME) && defined(ENABLE_WEAPON_COSTUME_SYSTEM) str_to_number(t.bMaxLevelBySet[ATTRIBUTE_SET_COSTUME_WEAPON], data[col++]); #endif #endif #ifdef ENABLE_PENDANT_SYSTEM str_to_number(t.bMaxLevelBySet[ATTRIBUTE_SET_PENDANT], data[col++]); #endif #ifdef ENABLE_GLOVE_SYSTEM str_to_number(t.bMaxLevelBySet[ATTRIBUTE_SET_GLOVE], data[col++]); #endif sys_log(0, "ITEM_RARE_PVP: %-20s %4lu { %3d %3d %3d %3d %3d } { %d %d %d %d %d %d %d" #ifdef ENABLE_ITEM_ATTR_COSTUME " %d %d" #if defined(ENABLE_ITEM_ATTR_COSTUME) && defined(ENABLE_WEAPON_COSTUME_SYSTEM) " %d" #endif #endif #ifdef ENABLE_PENDANT_SYSTEM " %d" #endif #ifdef ENABLE_GLOVE_SYSTEM " %d" #endif " }", t.szApply, t.dwProb, t.lValues[0], t.lValues[1], t.lValues[2], t.lValues[3], t.lValues[4], t.bMaxLevelBySet[ATTRIBUTE_SET_WEAPON], t.bMaxLevelBySet[ATTRIBUTE_SET_BODY], t.bMaxLevelBySet[ATTRIBUTE_SET_WRIST], t.bMaxLevelBySet[ATTRIBUTE_SET_FOOTS], t.bMaxLevelBySet[ATTRIBUTE_SET_NECK], t.bMaxLevelBySet[ATTRIBUTE_SET_HEAD], t.bMaxLevelBySet[ATTRIBUTE_SET_SHIELD], t.bMaxLevelBySet[ATTRIBUTE_SET_EAR] #ifdef ENABLE_ITEM_ATTR_COSTUME , t.bMaxLevelBySet[ATTRIBUTE_SET_COSTUME_BODY], t.bMaxLevelBySet[ATTRIBUTE_SET_COSTUME_HAIR] #if defined(ENABLE_ITEM_ATTR_COSTUME) && defined(ENABLE_WEAPON_COSTUME_SYSTEM) , t.bMaxLevelBySet[ATTRIBUTE_SET_COSTUME_WEAPON] #endif #endif #ifdef ENABLE_PENDANT_SYSTEM , t.bMaxLevelBySet[ATTRIBUTE_SET_PENDANT] #endif #ifdef ENABLE_GLOVE_SYSTEM , t.bMaxLevelBySet[ATTRIBUTE_SET_GLOVE] #endif ); m_vec_itemRarePvpTable.emplace_back(t); } return true; } #endif // BETTER_67 Initialization seem to pass all ok #ifdef BETTER_67 // Initialize the new table if (!InitializeItemRarePvpTable()) { sys_err("InitializeItemRarePvpTable FAILED"); return false; } else { sys_err("Succesfully initialized ItemRarePvpTable"); } #endif The syserr log is temporary, just so I am convinced it worked, or atleast returned true, which it does But the problem is, now it seems that it fails to load items, db core dump, displayed using bt only: (gdb) #0 thr_kill () at thr_kill.S:4 #1 0x20a1fa8b in __raise (s=6) at /usr/src/lib/libc/gen/raise.c:52 #2 0x20ac9beb in abort () at /usr/src/lib/libc/stdlib/abort.c:67 #3 0x0042ab87 in emergency_sig (sig=11) at Main.cpp:53 #4 0x209760b9 in handle_signal (actp=<optimized out>, sig=<optimized out>, info=0xffffd1c0, ucp=0xffffcf00) at /usr/src/lib/libthr/thread/thr_sig.c:303 #5 0x20975660 in thr_sighandler (sig=11, info=0xffffd1c0, _ucp=0xffffcf00) at /usr/src/lib/libthr/thread/thr_sig.c:246 #6 <signal handler called> #7 0x004428c4 in str_to_number (out=@0x2299a531: 0, in=0x30323033 <error: Cannot access memory at address 0x30323033>) at ./../../common/utils.h:48 #8 CreateItemTableFromRes (res=0x22fa7240, pVec=0x4ab978 <CClientManager::RESULT_ITEM_LOAD(CPeer*, st_mysql_res*, unsigned int, unsigned int)::s_items>, dwPID=17) at ClientManagerPlayer.cpp:64 #9 0x00444177 in CClientManager::RESULT_ITEM_LOAD (this=0xffffd410, peer=0x20bef600, pRes=0x22fa7240, dwHandle=4, dwPID=17) at ClientManagerPlayer.cpp:692 #10 0x00443f4c in CClientManager::RESULT_COMPOSITE_PLAYER (this=0xffffd410, peer=0x20bef600, pMsg=0x20bc4570, dwQID=1) at ClientManagerPlayer.cpp:587 #11 0x00431e4e in CClientManager::AnalyzeQueryResult (this=0xffffd410, msg=0x20bc4570) at ClientManager.cpp:2887 #12 0x004318b0 in CClientManager::MainLoop (this=0xffffd410) at ClientManager.cpp:314 #13 0x0042ac99 in main () at Main.cpp:84 I changed nothing in `RESULT_ITEM_LOAD` or any other place, double checked in git pr view, no accidents there neither, I assume changing the bonus range has other several cascading effects and necessary changes? If so, could anybody point me in the right direction? Update, here, fixed the core crash, but I guess something didn't go as planned, altered item table, added the other columns for the new attrs, but somewhere i fucked up bcs now, inventory dosen't work, items are duplicated and alot of other things broke For cache i changed the fush method a bit void CItemCache::OnFlush() { if (m_data.vnum == 0) { char szQuery[QUERY_MAX_LEN]; snprintf(szQuery, sizeof(szQuery), "DELETE FROM item%s WHERE id=%u", GetTablePostfix(), m_data.id); CDBManager::instance().ReturnQuery(szQuery, QID_ITEM_DESTROY, 0, NULL); if (g_test_server) sys_log(0, "ItemCache::Flush : DELETE %u %s", m_data.id, szQuery); } else { TPlayerItem *p = &m_data; const auto setQuery = fmt::format(FMT_COMPILE("id={}, owner_id={}, `window`={}, pos={}, count={}, vnum={}, socket0={}, socket1={}, socket2={}, " "attrtype0={}, attrvalue0={}, " "attrtype1={}, attrvalue1={}, " "attrtype2={}, attrvalue2={}, " "attrtype3={}, attrvalue3={}, " "attrtype4={}, attrvalue4={}, " "attrtype5={}, attrvalue5={}, " "attrtype6={}, attrvalue6={} " #ifdef BETTER_67 ", attrtype7={}, attrvalue7={}, " "attrtype8={}, attrvalue8={}, " "attrtype9={}, attrvalue9={} " #endif ), p->id, p->owner, p->window, p->pos, p->count, p->vnum, p->alSockets[0], p->alSockets[1], p->alSockets[2], p->aAttr[0].bType, p->aAttr[0].sValue, p->aAttr[1].bType, p->aAttr[1].sValue, p->aAttr[2].bType, p->aAttr[2].sValue, p->aAttr[3].bType, p->aAttr[3].sValue, p->aAttr[4].bType, p->aAttr[4].sValue, p->aAttr[5].bType, p->aAttr[5].sValue, p->aAttr[6].bType, p->aAttr[6].sValue #ifdef BETTER_67 , p->aAttr[7].bType, p->aAttr[7].sValue, p->aAttr[8].bType, p->aAttr[8].sValue, p->aAttr[9].bType, p->aAttr[9].sValue #endif ); // @fixme205 const auto itemQuery = fmt::format(FMT_COMPILE("INSERT INTO item{} SET {} ON DUPLICATE KEY UPDATE {}"), GetTablePostfix(), setQuery, setQuery); if (g_test_server) sys_log(0, "ItemCache::Flush :REPLACE (%s)", itemQuery.c_str()); CDBManager::instance().ReturnQuery(itemQuery.c_str(), QID_ITEM_SAVE, 0, NULL); ++g_item_count; } m_bNeedQuery = false; } Is there any other place i gotta change caching? What basically happens now, client seems to not understand anything anymore, chat dosent work after the things start bugging out But hopefully i think i understand i m missing something on client side too bcs there are some chat packets that are being raised after moving items around in the inv 0528 13:29:18383 :: Unprocessed packet header 137, state Game 0528 13:29:19900 :: Unprocessed packet header 73, state Game 0528 13:29:24570 :: Unknown packet header: 102, last: 61 124 [Hidden Content] -
2
Where can i found the armors
Found the solution; .dds files are somewhat seems wrong in windows (got transparency in body parts) so i downloaded dds viewer from: [Hidden Content] that way i exported textures without transparency -
1
Snus2 German Server [ START 08.06.24 ]
This guy is known to be a scammer... He got banned on m2dl for scamming and now hes trying to take his serverfiles, he bought from somewhere, online the 2nd time... First time he was trying to get money out of the players as soon as they joined... He cant code and he cant edit the server at all. Dont trust him and make sure to keep your money. And dont expect any updates. He also is rude to a lot of people who exposed him or dont want to help. If its the same server like before you cant even play it till end game sooo... Just dont play it -
1
[C++] PROTECTION DMG HACK
{ MAIN_RACE_WARRIOR_M, 250 }, { MAIN_RACE_ASSASSIN_M, 200 }, Isn`t the assasin faster with dagger than the warrior ? -
2
Where can i found the armors
Guys just tried something more but thi is what i got so far; As you guys see there are black portions (arms) in monk plate armour. Am i missing something? -
2
Where can i found the armors
Hey guys hello! I'm new here and not familiar with metin2 dev. Just downloadad full client's unpacked version from here. I am trying to find warrior armors such as monk plate, iron plate, tiger plate etc.. Just found .gr2 files with .dds textures in "\Unpacked_Client_v22.5.7.0\d_\ymir work\pc\warrior". Monk plate was named in warrior_nahan. But it's kinda like missing something in it. Here is the screenshot of what i've got so far; So, what i know so far is; there are dedicated textures to each armor in this game. and there are models for each armor. But textures of the armors have transparency. It looks like image above when i assign textures from .dds files which are located in the same directory as warrior_nahan.gr2 At the end of the day i guess i am missing something. What do you guys think? -
0
I want to make Spirit Stones Enchantable
How can i make Spirit Stones or any item Enchantable?
-
-
Recently Browsing
- No registered users viewing this page.
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now