Artefact 2 Posted October 4, 2019 Share Posted October 4, 2019 Hello, i recently installed special storage and fixed some problems but I still got one which is big. If I have items in the special storage and I`m rebooting the server the items are disappearing but they still appear in database. I mean in navicat the items are still there. Any tips? Thank you Link to comment Share on other sites More sharing options...
Syriza 235 Posted October 4, 2019 Share Posted October 4, 2019 Could be Python error, i mean if they still are in database ? Which one did you install ? Link to comment Share on other sites More sharing options...
Artefact 2 Posted October 4, 2019 Author Share Posted October 4, 2019 It`s from another forum, it`s called the last version and has some files with fixes in it. But i`ll recheck my python part, ty. Link to comment Share on other sites More sharing options...
Syriza 235 Posted October 4, 2019 Share Posted October 4, 2019 I prefer the k inventory one, its more secure Link to comment Share on other sites More sharing options...
ridetpro 117 Posted October 4, 2019 Share Posted October 4, 2019 Acum 39 minute, Artefact a spus: Hello, i recently installed special storage and fixed some problems but I still got one which is big. If I have items in the special storage and I`m rebooting the server the items are disappearing but they still appear in database. I mean in navicat the items are still there. Any tips? Thank you void CInputDB::ItemLoad(LPDESC d, const char * c_pData) // You missed this part switch (p->window) { case INVENTORY: case DRAGON_SOUL_INVENTORY: { item->AddToCharacter(ch, TItemPos(p->window, p->pos)); } break; case EQUIPMENT: { if (item->CheckItemUseLevel(ch->GetLevel())) { if (!item->EquipTo(ch, p->pos)) { v.push_back(item); } } else { v.push_back(item); } } break; } Link to comment Share on other sites More sharing options...
Artefact 2 Posted October 5, 2019 Author Share Posted October 5, 2019 11 hours ago, ridetpro said: void CInputDB::ItemLoad(LPDESC d, const char * c_pData) // You missed this part switch (p->window) { case INVENTORY: case DRAGON_SOUL_INVENTORY: { item->AddToCharacter(ch, TItemPos(p->window, p->pos)); } break; case EQUIPMENT: { if (item->CheckItemUseLevel(ch->GetLevel())) { if (!item->EquipTo(ch, p->pos)) { v.push_back(item); } } else { v.push_back(item); } } break; } switch (p->window) { case INVENTORY: case DRAGON_SOUL_INVENTORY: #ifdef ENABLE_SPECIAL_STORAGE case UPGRADE_INVENTORY: case BOOK_INVENTORY: case STONE_INVENTORY: { //sys_err("Load shit window = %d // pos = %d", p->window, p->pos); item->AddToCharacter(ch, TItemPos(p->window, p->pos)); } break; #endif item->AddToCharacter(ch, TItemPos(p->window, p->pos)); break; case EQUIPMENT: if (item->CheckItemUseLevel(ch->GetLevel()) == true ) { if (item->EquipTo(ch, p->pos) == false ) { v.push_back(item); } } else { v.push_back(item); } break; } } Link to comment Share on other sites More sharing options...
Contributor MrQuin 6439 Posted October 5, 2019 Contributor Share Posted October 5, 2019 48 minutes ago, Artefact said: switch (p->window) { case INVENTORY: case DRAGON_SOUL_INVENTORY: #ifdef ENABLE_SPECIAL_STORAGE case UPGRADE_INVENTORY: case BOOK_INVENTORY: case STONE_INVENTORY: { //sys_err("Load shit window = %d // pos = %d", p->window, p->pos); item->AddToCharacter(ch, TItemPos(p->window, p->pos)); } break; #endif item->AddToCharacter(ch, TItemPos(p->window, p->pos)); break; case EQUIPMENT: if (item->CheckItemUseLevel(ch->GetLevel()) == true ) { if (item->EquipTo(ch, p->pos) == false ) { v.push_back(item); } } else { v.push_back(item); } break; } } here : case STONE_INVENTORY: { //sys_err("Load shit window = %d // pos = %d", p->window, p->pos); item->AddToCharacter(ch, TItemPos(p->window, p->pos)); } break; #endif item->AddToCharacter(ch, TItemPos(p->window, p->pos)); break; try deleting : item->AddToCharacter(ch, TItemPos(p->window, p->pos)); break; 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...
Artefact 2 Posted October 5, 2019 Author Share Posted October 5, 2019 Yeah but if the system is not enabled the inventory and dragon soul cases wont work. Link to comment Share on other sites More sharing options...
Kreciok 73 Posted October 5, 2019 Share Posted October 5, 2019 19 minut temu, Artefact napisał: Yeah but if the system is not enabled the inventory and dragon soul cases wont work. Then use directive properly. case INVENTORY: case DRAGON_SOUL_INVENTORY: #ifdef ENABLE_SPECIAL_STORAGE case UPGRADE_INVENTORY: case BOOK_INVENTORY: case STONE_INVENTORY: #endif item->AddToCharacter(ch, TItemPos(p->window, p->pos)); break; Link to comment Share on other sites More sharing options...
Artefact 2 Posted October 5, 2019 Author Share Posted October 5, 2019 1 hour ago, Kreciok said: Then use directive properly. case INVENTORY: case DRAGON_SOUL_INVENTORY: #ifdef ENABLE_SPECIAL_STORAGE case UPGRADE_INVENTORY: case BOOK_INVENTORY: case STONE_INVENTORY: #endif item->AddToCharacter(ch, TItemPos(p->window, p->pos)); break; Yep but still there`s nothing wrong with my version Link to comment Share on other sites More sharing options...
Artefact 2 Posted October 5, 2019 Author Share Posted October 5, 2019 Up Link to comment Share on other sites More sharing options...
flexio 83 Posted October 6, 2019 Share Posted October 6, 2019 Can you post screen of items in database? After reboot. Primary "window" Link to comment Share on other sites More sharing options...
Artefact 2 Posted October 6, 2019 Author Share Posted October 6, 2019 11 hours ago, flexio said: Can you post screen of items in database? After reboot. Primary "window" Sure Link to comment Share on other sites More sharing options...
Kreciok 73 Posted October 7, 2019 Share Posted October 7, 2019 Make sure you load items in every windows. ClientManagerPlayer.cpp #ifdef ENABLE_SPECIAL_STORAGE snprintf(queryStr, sizeof(queryStr), "SELECT id,window+0,pos,count,vnum,socket0,socket1,socket2,attrtype0,attrvalue0,attrtype1,attrvalue1,attrtype2,attrvalue2,attrtype3,attrvalue3,attrtype4,attrvalue4,attrtype5,attrvalue5,attrtype6,attrvalue6 " "FROM item%s WHERE owner_id=%d AND (window in ('INVENTORY','EQUIPMENT','DRAGON_SOUL_INVENTORY','BELT_INVENTORY','UPGRADE_INVENTORY','BOOK_INVENTORY','STONE_INVENTORY'))", GetTablePostfix(), packet->player_id); #else snprintf(queryStr, sizeof(queryStr), "SELECT id,window+0,pos,count,vnum,socket0,socket1,socket2,attrtype0,attrvalue0,attrtype1,attrvalue1,attrtype2,attrvalue2,attrtype3,attrvalue3,attrtype4,attrvalue4,attrtype5,attrvalue5,attrtype6,attrvalue6 " "FROM item%s WHERE owner_id=%d AND (window < %d or window = %d)", GetTablePostfix(), packet->player_id, SAFEBOX, DRAGON_SOUL_INVENTORY); #endif #ifdef ENABLE_SPECIAL_STORAGE snprintf(szQuery, sizeof(szQuery), "SELECT id,window+0,pos,count,vnum,socket0,socket1,socket2,attrtype0,attrvalue0,attrtype1,attrvalue1,attrtype2,attrvalue2,attrtype3,attrvalue3,attrtype4,attrvalue4,attrtype5,attrvalue5,attrtype6,attrvalue6 " "FROM item%s WHERE owner_id=%d AND (window in ('INVENTORY','EQUIPMENT','DRAGON_SOUL_INVENTORY','BELT_INVENTORY','UPGRADE_INVENTORY','BOOK_INVENTORY','STONE_INVENTORY'))", GetTablePostfix(), pTab->id); #else snprintf(szQuery, sizeof(szQuery), "SELECT id,window+0,pos,count,vnum,socket0,socket1,socket2,attrtype0,attrvalue0,attrtype1,attrvalue1,attrtype2,attrvalue2,attrtype3,attrvalue3,attrtype4,attrvalue4,attrtype5,attrvalue5,attrtype6,attrvalue6 " "FROM item%s WHERE owner_id=%d AND (window < %d or window = %d)", GetTablePostfix(), pTab->id, SAFEBOX, DRAGON_SOUL_INVENTORY); #endif Also u should check a delete query: #ifdef ENABLE_SPECIAL_STORAGE snprintf(queryStr, sizeof(queryStr), "DELETE FROM item%s WHERE owner_id=%d AND (window in ('INVENTORY','EQUIPMENT','DRAGON_SOUL_INVENTORY','BELT_INVENTORY','UPGRADE_INVENTORY','BOOK_INVENTORY','STONE_INVENTORY'))", GetTablePostfix(), pi->player_id); #else snprintf(queryStr, sizeof(queryStr), "DELETE FROM item%s WHERE owner_id=%d AND (window < %d or window = %d)", GetTablePostfix(), pi->player_id, SAFEBOX, DRAGON_SOUL_INVENTORY); #endif You can also check it easier by changing just this lines in a query: SAFEBOX, DRAGON_SOUL_INVENTORY -> on a SAFEBOX, STONE_INVENTORY. Link to comment Share on other sites More sharing options...
Artefact 2 Posted October 7, 2019 Author Share Posted October 7, 2019 Solved, i was missing some load functions. Thank you 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