Jump to content

Problem with alignment color


Recommended Posts

TITLE_RGB_GOOD_8 = (  0, 204, 255)
TITLE_RGB_GOOD_7 = (  0, 204, 255)
TITLE_RGB_GOOD_6 = (  0, 204, 255)
TITLE_RGB_GOOD_5 = (  0, 204, 255)
TITLE_RGB_GOOD_4 = (  0, 204, 255)
TITLE_RGB_GOOD_3 = (  0, 144, 255)
TITLE_RGB_GOOD_2 = ( 92, 110, 255)
TITLE_RGB_GOOD_1 = (155, 155, 255)
TITLE_RGB_NORMAL = (255, 255, 255)
TITLE_RGB_EVIL_1 = (207, 117,   0)
TITLE_RGB_EVIL_2 = (235,  83,   0)
TITLE_RGB_EVIL_3 = (227,   0,   0)
TITLE_RGB_EVIL_4 = (255,   0,   0)

 

Link to comment
Share on other sites

  • Premium
48 minutes ago, .Incredible™ said:

This is blue rgb and is shows white ingame.

Open your InstanceBase.cpp file, post here your GetAlignmentType and GetAlignmentGrade functions.

 

"Nothing's free in this life.

Ignorant people have an obligation to make up for their ignorance by paying those who help them.

Either you got the brains or cash, if you lack both you're useless."

Syreldar

Link to comment
Share on other sites

vor 19 Minuten schrieb Syreldar:

Open your InstanceBase.cpp file, post here your GetAlignmentType and GetAlignmentGrade functions.

bool CInstanceBase::IsConflictAlignmentInstance(CInstanceBase& rkInstVictim)
{
	if (PK_MODE_PROTECT == rkInstVictim.GetPKMode())
		return false;

	switch (GetAlignmentType())
	{
		case ALIGNMENT_TYPE_NORMAL:
		case ALIGNMENT_TYPE_WHITE:
			if (ALIGNMENT_TYPE_DARK == rkInstVictim.GetAlignmentType())
				return true;
			break;
		case ALIGNMENT_TYPE_DARK:
			if (GetAlignmentType() != rkInstVictim.GetAlignmentType())
				return true;
			break;
	}

	return false;
}

 

----------------------------------------------------------------

 

UINT CInstanceBase::GetAlignmentGrade()
{
	if (m_sAlignment >= 30000)
		return 12;
	else if (m_sAlignment >= 25000)
		return 11;
	else if (m_sAlignment >= 20000)
		return 10;
	else if (m_sAlignment >= 15000)
		return 9;
	else if (m_sAlignment >= 12000)
		return 0;
	else if (m_sAlignment >= 8000)
		return 1;
	else if (m_sAlignment >= 4000)
		return 2;
	else if (m_sAlignment >= 1000)
		return 3;
	else if (m_sAlignment >= 0)
		return 4;
	else if (m_sAlignment > -4000)
		return 5;
	else if (m_sAlignment > -8000)
		return 6;
	else if (m_sAlignment > -12000)
		return 7;

	return 8;
}

int CInstanceBase::GetAlignmentType()
{
	switch (GetAlignmentGrade())
	{
		case 0:
		case 1:
		case 2:
		case 3:
		{
			return ALIGNMENT_TYPE_WHITE;
			break;
		}

		case 5:
		case 6:
		case 7:
		case 8:
		{
			return ALIGNMENT_TYPE_DARK;
			break;
		}
	}

	return ALIGNMENT_TYPE_NORMAL;
}

 

Link to comment
Share on other sites

  • Premium
8 minutes ago, .Incredible™ said:

 

 

As I thought, you missed some of them. So they were getting set to ALIGNMENT_TYPE_NORMAL by default, which, in terms, is linked to 

TITLE_RGB_NORMAL = (255, 255, 255)

Change your GetAlignmentType function with this one:

int CInstanceBase::GetAlignmentType()
{
	switch (GetAlignmentGrade())
	{
		case 0:
		case 1:
		case 2:
		case 3:
        
		// Syreldar fix
		case 9:
		case 10:
		case 11:
		case 12:
		{
			return ALIGNMENT_TYPE_WHITE;
			break;
		}

		case 5:
		case 6:
		case 7:
		case 8:
		{
			return ALIGNMENT_TYPE_DARK;
			break;
		}
	}

	return ALIGNMENT_TYPE_NORMAL;
}

 

 

"Nothing's free in this life.

Ignorant people have an obligation to make up for their ignorance by paying those who help them.

Either you got the brains or cash, if you lack both you're useless."

Syreldar

Link to comment
Share on other sites

  • Premium
3 hours ago, .Incredible™ said:

Same Bug look, and the 20+ Alignment is white.

P8p6eab.jpg

I gave you the reason: you forgot more things in other files for sure. double-check the things you did..

 

Probably InstanceBase.h, locale.py or uicharacter.py

Edited by Metin2 Dev
Core X - External 2 Internal
  • Love 1

 

"Nothing's free in this life.

Ignorant people have an obligation to make up for their ignorance by paying those who help them.

Either you got the brains or cash, if you lack both you're useless."

Syreldar

Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

Announcements



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