Jump to content

Recommended Posts

  • Active+ Member
On 2/20/2025 at 8:26 PM, emrullah67 said:

why one color ?? only purple ? what's the problem ?


PythonSlotWindow.cpp

void CSlotWindow::AppendSlot(DWORD dwIndex, int ixPosition, int iyPosition, int ixCellSize, int iyCellSize)
{
	TSlot Slot;
	[...]
#ifdef ENABLE_LEGENDARY_SLOT_EFFECT
	Slot.pLDiffuseColor = D3DXCOLOR(1.0f, 1.0f, 1.0f, 1.0f); // Add this line
#endif
	[...]
	ClearSlot(&Slot);
}


#ifdef ENABLE_LEGENDARY_SLOT_EFFECT
		if (rSlot.bLegendaryActive)
		{
			if (pActiveLegendarySlotEffect[0] || pActiveLegendarySlotEffect[1] || pActiveLegendarySlotEffect[2])
			{
				int ix = m_rect.left + rSlot.ixPosition;
				int iy = m_rect.top + rSlot.iyPosition;
				int highlight = rSlot.byyPlacedItemSize - 1;
				pActiveLegendarySlotEffect[highlight]->SetColor(&rSlot.pLDiffuseColor); // Add this line
				pActiveLegendarySlotEffect[highlight]->Show();
				pActiveLegendarySlotEffect[highlight]->SetPosition(ix, iy);
				pActiveLegendarySlotEffect[highlight]->Render();
			}
		}
#endif

void CSlotWindow::ActivateLegendaryEffect(DWORD dwSlotIndex, float r, float g, float b, float a)
{
	TSlot * pSlot;
	if (!GetSlotPointer(dwSlotIndex, &pSlot))
		return;

	pSlot->bLegendaryActive = true;
	pSlot->pLDiffuseColor = D3DXCOLOR(r, g, b, a); // Add this line
	
	for (uint8_t i = 0; i < 3; i++) 
	{
		if (!pActiveLegendarySlotEffect[i])
			__CreateSlotLegendaryEffect(r, g, b, a);
	}
}



PythonSlotWindow.h

#ifdef ENABLE_LEGENDARY_SLOT_EFFECT
				bool	bLegendaryActive;
				D3DXCOLOR pLDiffuseColor; // Add this line
#endif



PythonWindow.cpp

	void CAniImageBox::SetDelay(int iDelay)
	{
		m_byDelay = iDelay;
	}
	[...]
#ifdef ENABLE_LEGENDARY_SLOT_EFFECT
	void CAniImageBox::SetColor(D3DXCOLOR* pColor) // Add this func
	{
		for (auto& img : m_ImageVector)
			img->SetDiffuseColor(pColor->r, pColor->g, pColor->b, pColor->a);
	}
#endif
	


PythonWindow.h

			void ResetFrame();
			[...]
#ifdef ENABLE_LEGENDARY_SLOT_EFFECT
			void SetColor(D3DXCOLOR * pColor); // Add this line
#endif

 

 

This is only for the latest code 

hope i didn't forget anything  GL 👀

Edited by CONTROL

I don’t know — I think.

 

MetaWork

 

  • 1 year later...
  • Active+ Member

Sorry for the delay!

I've updated the repository and moved the project to my GitHub.

Changes

Removed the colors from the effect textures. The colors were already controlled through the code, but having colorless textures produces much cleaner and more accurate results.

.png

Uploaded the latest version to GitHub, including all fixes, improvements, and recent updates.

Thanks for your patience! If you run into any issues or notice something I forgot, feel free to let me know.

  • Love 1

I don’t know — I think.

 

MetaWork

 

Don't use any images from : imgur, turkmmop, freakgamers, inforge, hizliresim... Or your content will be deleted without notice...
Use : https://metin2.download/media/add/

Please use https://metin2.download/ when uploading files smaller than 100MB, otherwise the approval will take longer due to manual upload.

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×
×
  • 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.