Jump to content

EnZiiK

Inactive Member
  • Posts

    10
  • Joined

  • Last visited

  • Feedback

    0%

Posts posted by EnZiiK

  1. Hi.. I searching for someone who can configurate my server from SQL to TXT.. I tried it by myslef but I have different table design and these free convertors etp.. doesnt work for me :)

    For better description: In first I need export my item/mob proto from Navicat to .txt and setup server for .txt reading..

    I will pay :)

    Contact me here in post or PM

  2. Hi.. I have a little problem with OfflineShop.. Sometimes when I create offlineshop, items which I selected to sell stays in invetory and when I teleport then its kick me out of game.. and when I login back items finally disappear from inventory...

    SYSERR:

    SYSERR: Oct  6 18:22:23.578664 :: DestroyItem: WTH! Invalid item owner. owner pointer : 0x446f2000
    SYSERR: Oct  6 18:22:23.578801 :: DestroyItem: WTH! Invalid item owner. owner pointer : 0x446f2000
    SYSERR: Oct  6 18:22:23.578921 :: DestroyItem: WTH! Invalid item owner. owner pointer : 0x446f2000
    

    https://metin2.download/picture/14nLFBzoQ1a9R7X7Tk91oki9k1TUB1Ug/.gif

    item_manager.cpp

    #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
    }
    

    char_item.cpp

    #ifdef ENABLE_DELETE_ITEMS_SYSTEM
    bool CHARACTER::DestroyItem(TItemPos Cell)
    {
        LPITEM item = NULL;
    	    if (!CanHandleItem())
            return false;
    	    if (IsDead() || IsStun())
            return false;
    	    if (!IsValidItemPosition(Cell) || !(item = GetItem(Cell)))
            return false;
    	    if (true == item->isLocked() || item->IsExchanging())
            return false;
    	    if (quest::CQuestManager::instance().GetPCForce(GetPlayerID())->IsRunning() == true)
            return false;
    	    if (item->IsBind() || item->IsUntilBind())
        {
            ChatPacket(CHAT_TYPE_INFO, LC_TEXT("RUHA_BAGLI_NESNELER_SILINEMEZ"));
            return false;
        }
    	    // EXTRA_CHECK
        int iPulse = thecore_pulse();
    	    if (iPulse        - GetSafeboxLoadTime()        < PASSES_PER_SEC(g_nPortalLimitTime)
            || iPulse    - GetRefineTime()            < PASSES_PER_SEC(g_nPortalLimitTime)
            || iPulse    - GetMyShopTime()            < PASSES_PER_SEC(g_nPortalLimitTime))
        {
            ChatPacket(CHAT_TYPE_INFO, LC_TEXT("Please wait a second."));
            return false;
        }
    	    if (GetOfflineShopOwner() || GetExchange() || GetMyShop() || GetShopOwner() || IsOpenSafebox() || IsCubeOpen() || IsAttrTransferOpen())
        {
            ChatPacket(CHAT_TYPE_INFO, LC_TEXT("거래창,창고 등을 연 상태에서는 귀환부,귀환기억부 를 사용할수 없습니다."));
            return false;
        }
        // EXTRA_CHECK
       
        #ifdef ENABLE_NEW_PET_SYSTEM
        if (GetNewPetSystem()->IsActivePet())
    	    {
            ChatPacket(CHAT_TYPE_INFO, LC_TEXT("pett-yolla"));
            return false;
        }
        #endif
    	    #ifdef ENABLE_SUPPORT_SYSTEM
        if (GetSupportSystem()->IsActiveSupport())
        {
            ChatPacket(CHAT_TYPE_INFO, LC_TEXT("saman-yolla"));
            return false;
        }
        #endif
    	    if (item->GetVnum() >= 71220 && item->GetVnum() <= 71239)
        {
            return false;
        }
    #ifdef ENABLE_NEW_PET_SYSTEM
        if (item->GetVnum() >= 55701 && item->GetVnum() <= 55710)
            DBManager::instance().DirectQuery("DELETE FROM new_petsystem WHERE id = %d", item->GetID());
    #endif
    #ifdef ENABLE_SUPPORT_SYSTEM
        if (item->GetVnum() >= 8383 && item->GetVnum() <= 8384)
            DBManager::instance().DirectQuery("DELETE FROM new_support WHERE id = %d", item->GetID());
    #endif
        ChatPacket(CHAT_TYPE_INFO, LC_TEXT("%s has been deleted successfully."), item->GetName());
        ITEM_MANAGER::instance().RemoveItem(item);
        return true;
    }
    #endif
    


    Someone know where is a problem?

    • Good 1
  3. Search in char_item.cpp

    Find this:

    Spoiler
    
    if (pPC)
    {
    	DWORD dwNowMin = get_global_time() / 60;
    
    	DWORD dwLastChangeItemAttrMin = pPC->GetFlag(msc_szLastChangeItemAttrFlag);
    
    	if (dwLastChangeItemAttrMin + dwChangeItemAttrCycle > dwNowMin)
    	{
    		ChatPacket(CHAT_TYPE_INFO, LC_TEXT("ĽÓĽşŔ» ąŮ˛ŰÁö %dşĐ ŔĚł»żˇ´Â ´Ů˝Ă şŻ°ćÇŇ Ľö ľř˝Ŕ´Ď´Ů.(%d şĐ ł˛Ŕ˝)"),
    				dwChangeItemAttrCycle, dwChangeItemAttrCycle - (dwNowMin - dwLastChangeItemAttrMin));
    	return false;
    	}
    
    	pPC->SetFlag(msc_szLastChangeItemAttrFlag, dwNowMin);
    }

    and change it to this:

    Spoiler
    
    if (pPC)
    {
    	DWORD dwNowMin = get_global_time() / 60;
    
    	//Comment for 0 switch players start
    	//DWORD dwLastChangeItemAttrMin = pPC->GetFlag(msc_szLastChangeItemAttrFlag);
    
    	//if (dwLastChangeItemAttrMin + dwChangeItemAttrCycle > dwNowMin)
    	//{
    		//ChatPacket(CHAT_TYPE_INFO, LC_TEXT("ĽÓĽşŔ» ąŮ˛ŰÁö %dşĐ ŔĚł»żˇ´Â ´Ů˝Ă şŻ°ćÇŇ Ľö ľř˝Ŕ´Ď´Ů.(%d şĐ ł˛Ŕ˝)"),
    			//dwChangeItemAttrCycle, dwChangeItemAttrCycle - (dwNowMin - dwLastChangeItemAttrMin));
    		//return false;
    		//}
    	//Comment for 0 switch players end
    
    	pPC->SetFlag(msc_szLastChangeItemAttrFlag, dwNowMin);
    	}
    }

     

  4. Hello. I have problem with my server. After last reboot is something bad. When i choose character then kick me it back to login screen :(

    Sysser:

    Spoiler

    SYSERR: Dec  9 02:14:27 :: pid_init: 
    Start of pid: 1323


    SYSERR: Dec  9 02:14:55 :: GetServerLocation: location error name Test mapindex 0 922746880 x -352319739 empire 1
    SYSERR: Dec  9 02:15:02 :: GetServerLocation: location error name Test mapindex 0 922746880 x -352319739 empire 1
    SYSERR: Dec  9 02:15:02 :: GetValidLocation: cannot find tree by 473140 900000 (map index 41)
    SYSERR: Dec  9 02:15:02 :: PlayerLoad: InputDB::PlayerLoad : cannot find valid location 473140 x 900000 (name: EnZi)
    SYSERR: Dec  9 02:16:46 :: pid_init: 

     

×
×
  • 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.