Jump to content

Tallywa

Inactive Member
  • Posts

    307
  • Joined

  • Last visited

  • Feedback

    0%

Everything posted by Tallywa

  1. Because i have this code : in fonction int CItem::GetAttributeSetIndex() in item_attribute.cpp if (GetType() == ITEM_RING) { return ATTRIBUTE_SET_RING; } in fonction enum EAttributeSet in length.h ATTRIBUTE_SET_RING in fonction bool CClientManager::InitializeItemAttrTable() in clientmanagerboot.cpp bool CClientManager::InitializeItemAttrTable() { 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, ring FROM item_attr%s ORDER BY apply", GetTablePostfix()); std::auto_ptr<SQLMsg> pkMsg(CDBManager::instance().DirectQuery(query)); SQLResult * pRes = pkMsg->Get(); if (!pRes->uiNumRows) { sys_err("no result from item_attr"); return false; } if (!m_vec_itemAttrTable.empty()) { sys_log(0, "RELOAD: item_attr"); m_vec_itemAttrTable.clear(); } m_vec_itemAttrTable.reserve(pRes->uiNumRows); MYSQL_ROW data; while ((data = mysql_fetch_row(pRes->pSQLResult))) { TItemAttrTable t; memset(&t, 0, sizeof(TItemAttrTable)); 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++]); str_to_number(t.bMaxLevelBySet[ATTRIBUTE_SET_RING], data[col++]); sys_log(0, "ITEM_ATTR: %-20s %4lu { %3d %3d %3d %3d %3d } { %d %d %d %d %d %d %d }", 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], t.bMaxLevelBySet[ATTRIBUTE_SET_RING]); m_vec_itemAttrTable.push_back(t); } return true; } in fonction bool CClientManager::InitializeItemRareTable() in clientmanagerboot.cpp bool CClientManager::InitializeItemRareTable() { 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, ring FROM item_attr_rare%s ORDER BY apply", GetTablePostfix()); std::auto_ptr<SQLMsg> pkMsg(CDBManager::instance().DirectQuery(query)); SQLResult * pRes = pkMsg->Get(); if (!pRes->uiNumRows) { sys_err("no result from item_attr_rare"); return false; } if (!m_vec_itemRareTable.empty()) { sys_log(0, "RELOAD: item_attr_rare"); m_vec_itemRareTable.clear(); } m_vec_itemRareTable.reserve(pRes->uiNumRows); MYSQL_ROW data; while ((data = mysql_fetch_row(pRes->pSQLResult))) { TItemAttrTable t; memset(&t, 0, sizeof(TItemAttrTable)); 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++]); str_to_number(t.bMaxLevelBySet[ATTRIBUTE_SET_RING], data[col++]); sys_log(0, "ITEM_RARE: %-20s %4lu { %3d %3d %3d %3d %3d } { %d %d %d %d %d %d %d }", 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]); m_vec_itemRareTable.push_back(t); } return true; } in item_length.h after enum ECostumeSubTypes i have add : enum ERingSubTypes { RING_PVE, RING_PVP, RING_NUM_TYPES }; in protoreader.cpp in fonction int get_Item_SubType_Value(int type_value, string inputString) i have add : static string arSub33[] = { "RING_PVE", "RING_PVP" }; and arSub33, //33 ¹ÝÁö and sizeof(arSub33)/sizeof(arSub33[0]), // 33 ¹ÝÁö in constant after this fonction const int aiArmorSocketQty[ARMOR_NUM_TYPES] = i have add : const int aiRingSocketQty[RING_NUM_TYPES] = { 0, // RING_PVE, 0 // RING_PVP }; and in constant.h after extern const int aiArmorSocketQty[ARMOR_NUM_TYPES]; i have add : extern const int aiRingSocketQty[RING_NUM_TYPES];
  2. yes but now i have this error for attr rare number_ex: number(): first argument is bigger than second argument 0 -> -1, item_attribute.cpp 418
  3. Hello i have bug with costume and ring 6/7 bonus its crash the down and my sysserr : number_ex: number(): first argument is bigger than second argument 0 -> -1, item_attribute.cpp 418 in lign 418 const TItemAttrTable& r = g_map_itemRare[avail[number(0, avail.size() - 1)]]; game.core (gdb) bt full #0 0x081731e9 in CItem::AddRareAttribute (this=0x0) at item_attribute.cpp:418 i = 679644607 count = 696344576 pos = <value optimized out> nAttrSet = 696328330 avail = {<std::_Vector_base<int,std::allocator<int> >> = { _M_impl = {<std::allocator<int>> = {<__gnu_cxx::new_allocator<int>> = {<No data fields>}, <No data fields>}, _M_start = 0x5, _M_finish = 0x28a9977c, _M_end_of_storage = 0x5}}, <No data fields>} nAttrLevel = <value optimized out> pszIP = <value optimized out> #1 0x28c5dbe6 in basename_r () from /usr/lib32/libc.so.7 No symbol table info available. #2 0x083a73ae in CSemaphore::Wait () No symbol table info available. #3 0x083a661d in CAsyncSQL::ChildLoop () No symbol table info available. #4 0x083a6e7e in AsyncSQLThread () No symbol table info available. #5 0x287a8bbc in pthread_condattr_init () from /usr/lib32/libthr.so.3 No symbol table info available. #6 0x00000000 in ?? () No symbol table info available. I need your help please
  4. I would like to implement a new item, and again bonus in the item_attr table .
  5. Hello I would like to put new bonus that we would have a switch in the ring how to do? A bit like defense has the sword on the armor
  6. Hello I have a problem with this function: if (item->GetType() & ITEM_RING && item->GetSubType()) { if ((GetWear(WEAR_RING1) && GetWear(WEAR_RING1)->IsSameSpecialGroup(item)) || (GetWear(WEAR_RING2) && GetWear(WEAR_RING2)->IsSameSpecialGroup(item))) { ChatPacket(CHAT_TYPE_INFO, LC_TEXT("You can't put two same items in the same time.")); return false; } } I wish I could block the use of two items with an identical subtype. How to do?
  7. #ifndef DEBUG_ALLOC void ITEM_MANAGER::DestroyItem(LPITEM item) #else void ITEM_MANAGER::DestroyItem(LPITEM item, const char* file, size_t line) #endif { if (item->GetSectree()) item->RemoveFromGround(); if (item->GetOwner()) { if (CHARACTER_MANAGER::instance().Find(item->GetOwner()->GetPlayerID()) != NULL) { sys_err("DestroyItem: GetOwner %s %s!!", item->GetName(), item->GetOwner()->GetName()); item->RemoveFromCharacter(); } else { sys_err ("WTH! Invalid item owner. owner pointer : %p", item->GetOwner()); } } TR1_NS::unordered_set<LPITEM>::iterator it = m_set_pkItemForDelayedSave.find(item); if (it != m_set_pkItemForDelayedSave.end()) m_set_pkItemForDelayedSave.erase(it); DWORD dwID = item->GetID(); sys_log(2, "ITEM_DESTROY %s:%u", item->GetName(), dwID); if (!item->GetSkipSave() && dwID) { DWORD dwOwnerID = item->GetLastOwnerPID(); db_clientdesc->DBPacketHeader(HEADER_GD_ITEM_DESTROY, 0, sizeof(DWORD) + sizeof(DWORD)); db_clientdesc->Packet(&dwID, sizeof(DWORD)); db_clientdesc->Packet(&dwOwnerID, sizeof(DWORD)); } else { sys_log(2, "ITEM_DESTROY_SKIP %s:%u (skip=%d)", item->GetName(), dwID, item->GetSkipSave()); } if (dwID) m_map_pkItemByID.erase(dwID); m_VIDMap.erase(item->GetVID()); #ifdef M2_USE_POOL pool_.Destroy(item); #else #ifndef DEBUG_ALLOC M2_DELETE(item); #else M2_DELETE_EX(item, file, line); #endif #endif }
  8. and adapte this code for use with transmute system?
  9. LPITEM CItem::RemoveFromCharacter() { if (!m_pOwner) { sys_err("Item::RemoveFromCharacter owner null"); return (this); } LPCHARACTER pOwner = m_pOwner; if (m_bEquipped) // ÀåÂøµÇ¾ú´Â°¡? { Unequip(); //pOwner->UpdatePacket(); SetWindow(RESERVED_WINDOW); Save(); return (this); } else { if (GetWindow() != SAFEBOX && GetWindow() != MALL) { if (IsDragonSoul()) { if (m_wCell >= DRAGON_SOUL_INVENTORY_MAX_NUM) sys_err("CItem::RemoveFromCharacter: pos >= DRAGON_SOUL_INVENTORY_MAX_NUM"); else pOwner->SetItem(TItemPos(m_bWindow, m_wCell), NULL); } else { TItemPos cell(INVENTORY, m_wCell); if (false == cell.IsDefaultInventoryPosition() && false == cell.IsBeltInventoryPosition()) // ¾Æ´Ï¸é ¼ÒÁöÇ°¿¡? sys_err("CItem::RemoveFromCharacter: Invalid Item Position"); else { pOwner->SetItem(cell, NULL); } } } m_pOwner = NULL; m_wCell = 0; SetWindow(RESERVED_WINDOW); Save(); return (this); } }
  10. Hello i have a probleme with my server Crash core channel 1 game.core #0 0x081de0bb in quest::CQuestManager::SendScript (this=0x28d62198) at questmanager.cpp:977 packet_script = {header = 63 '?', size = 36927, skin = 247 '▒', src_size = 16191} buf = {buf = 0x0, forceDelete = false} #1 0x28c5dbe6 in basename_r () from /usr/lib32/libc.so.7 No symbol table info available. #2 0x0839b7ae in CSemaphore::Wait () No symbol table info available. #3 0x0839aa1d in CAsyncSQL::ChildLoop () No symbol table info available. #4 0x0839b27e in AsyncSQLThread () No symbol table info available. #5 0x2879abbc in pthread_condattr_init () from /usr/lib32/libthr.so.3 No symbol table info available. #6 0x00000000 in ?? () No symbol table info available.
  11. I suppose minutes needs its necesary , i mean if you don`t have the minutes you can take the title but i find a problem with time at players minuts because it`s showing us it`s 0 and i have more than 1000 and something .
×
×
  • Create New...

Important Information

Terms of Use / Privacy Policy / Guidelines / We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.