Jump to content

Finnael

Inactive Member
  • Posts

    51
  • Joined

  • Last visited

  • Days Won

    3
  • Feedback

    0%

Posts posted by Finnael

  1. M2 Download Center

    This is the hidden content, please
    ( Internal )

     

     

     

     

    As you might know I was working on a Reworked version of the character window for a long time. I shared some of my progress on Discord and today I am relasing it to public. I am not gonna write any detailed guide here on how to implement it as there is enough information written in the file itself both on how to install and how to configure it. All you need to know is there are two different versions: base version is the first video I shared and the equipment set version is the second video. To implement equipment set version you need to make some changes in the server source. Base version can be implemented without doing any changes in the server source. Hope you all like it!

     

    This is the hidden content, please

    • Metin2 Dev 64
    • Dislove 1
    • Sad 1
    • Good 28
    • Love 4
    • Love 62
  2. 1 hour ago, ProjectOW2 said:

    the fucntion is no work for me. without any syserr.

    Try again with updated files, you probably needed this

     

    open input_main.cpp:

    #1.) Find:
        case HEADER_CG_FAST_STACK:
            if (!ch->IsObserverMode())
                FastStack(ch, c_pData);
                break;
                
    #2.) Add after:
    void CInputMain::FastStack(LPCHARACTER ch, const char* c_pData)
    {
        TPacketCGFastStack* p = (TPacketCGFastStack*)c_pData;
        
    
        if (ch)
            ch->FastStack(p->pos);
    }

     

    • Not Good 1
  3. M2 Download Center

    This is the hidden content, please
    ( Internal )

    https://metin2.download/picture/aHTGO25e99i2dPK6H8c8Qxm5Kv2tth4R/.gif

     

    The system allows you to combine the same items in one click. Might create some lag if you are trying to combine lots of item. Made by me. I hope to see a similar system in big servers. Stay safe.

    (Would be cool if someone can implement the system and share the results here. Might have forgot few things 😬)

    This is the hidden content, please

    • Metin2 Dev 71
    • Dislove 1
    • Angry 1
    • Not Good 1
    • Think 2
    • Confused 1
    • Scream 1
    • Good 19
    • Love 3
    • Love 22
  4. On 11/1/2020 at 7:15 PM, HITRON said:
    
    		if (iSlot >= 0 && iSlot <= INVENTORY_MAX_NUM && bCount >= 0 && bCount <= g_bItemCountLimit)
    		{
    			LPITEM item = ch->GetInventoryItem(iSlot);
    
    			if (item)
    			{
    				BYTE bItemCount = item->GetCount();
    
    				TItemPos ItemCell;
    
    				ItemCell.window_type = INVENTORY;
    				ItemCell.cell = item->GetCell();
    
    				for (int i = 0; i < (bItemCount / bCount) - 1; ++i)
    				{
    					int iEmptySlot = ch->GetEmptyInventory(item->GetSize());
    
    					TItemPos DestItemCell;
    
    					DestItemCell.window_type = INVENTORY;
    					DestItemCell.cell = iEmptySlot;
    
    					ch->MoveItem(ItemCell, DestItemCell, bCount);
    				}
    			}
    		}

     

    With command that using args - (Item Slot & Split Count)

     

    I don't know why you copy the Item, but items that can be Split have no Sockets & Bonus random so the copy seems useless (Is just a move from the count of the item).

    Is this your split function? If it is I'd like to see a video of you trying to split all the items by 1 in a completly empty inventory. And yours doesn't do backward searching. Yeah maybe you can further optimize it without copying the socket and attributes, I haven't tried it tbh.

  5. M2 Download Center

    This is the hidden content, please
    ( Internal )

     

     

    A very fast item split system written by me. A very optimized one. Instead of sending hundered of packets it only sends maybe a dozen max. It is searching algorithm is also better than most split systems. It can do

    backward searching.

     

    This is the hidden content, please

    • Metin2 Dev 89
    • Angry 1
    • Not Good 1
    • Think 1
    • Good 17
    • Love 1
    • Love 29
  6. wtfisthis.JPG

     

    If you have this problem like me where RenderTarget renders the lod versions of the models you can do the the following thing to fix it. (You can also simply delete the lod files from your pack but you are gonna have to do it for every class and every armor that class wears. Besides that you can also have huge performance problems. There is a reason why LOD exists.)

     

    Open EterGrnLib/ThingInstance.h

    //1.)Find
        void        SetMotionAtEnd();
    
    //2.) Add after:
        void        SetSkipLod(bool value) { m_bSkipLod = value; }
        bool        GetSkipLod() { return m_bSkipLod; }
    
    //3.) Find:
    std::map<DWORD, CGraphicThing::TRef*>    m_roMotionThingMap;
    //4.) Add after:
    bool                                    m_bSkipLod;

     

    Open EterGrnLib/ThingInstance.cpp

    //1.) Find:
    	m_v3Center = D3DXVECTOR3(0.0f, 0.0f, 0.0f);
    //2.) Add after:
    	m_bSkipLod = false;
    
    //3.) Find:
    	CCamera* pcurCamera = CCameraManager::Instance().GetCurrentCamera();
    //4.) Add before:
    	if (m_bSkipLod)
    		return;

     

    Open EterLib/CRenderTarget.cpp

    //1.) Find:
    	m_pModel->GetGraphicThingInstancePtr()->ClearAttachingEffect();
    //2.) Add before:
    	m_pModel->GetGraphicThingInstancePtr()->SetSkipLod(true);
    

     

    This should be enough to fix the issue. Note that this bug does not happen on every versions of granny. Just try to render a player model with render target and if your character looks like mine then you can apply this to fix it.

    • Good 1
  7. Hmm, these look fine. From what I can see packet with header 43 is only being send to the client when player sitdowns or stand ups. So the problem should not be related with that if you are not doing anything. Can you show us your UserInterface/PythonNetworkStreamPhaseGame.cpp and UserInterface/PythonNetworkStream.cpp too? And btw which files are you using? Are you sure the client and the server you are using are meant to be used together? If you take your client from one files and your server from another that will cause such issues.

  8. If you wanna initialize some class members with default values I think the best way is to use constructors.

     

    So for the SShopItemTable you can do something like this:

     

        SShopItemTable()
        {
            vnum = 0;
            count = 0;
            pos = TItemPos();
            price = 0;
        }

     

    What this will do is when a new SShopItemTable object is created it will initialize it with these values.

     

     

    • Love 1
  9. I don't know how but we should be able to fix these bugs without touching the C++ code. Character window system I am working on doesn't have these bugs even though I didn't apply the fixes here. I am just updating the skill slots differently in python than the default character window and I think that fixes the bugs somehow.

     

     

    Okay, this should be enough to fix the bugs shown in the topic (hopefully)

     

    uicharacter.py

    Find:

    	            for j in xrange(skill.SKILL_GRADE_COUNT):
    	                skillPage.ClearSlot(self.__GetRealSkillSlot(j, i))
    	

    Replace with:

    	            for j in xrange(skill.SKILL_GRADE_COUNT):
    	                if j != player.GetSkillGrade(slotIndex):
    	                    skillPage.ClearSlot(self.__GetRealSkillSlot(j, i))
    	
×
×
  • 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.