Jump to content

Recommended Posts

  • 2 months later...

Or you can make like that:

[File: /Src/server/game/src/char.cpp]

//1.) Search:

			addPacket.sAlignment = m_iAlignment / 10;

//2.) Replace with:

			addPacket.sAlignment = m_iAlignment;

//1.) Search:

	pack.sAlignment	= m_iAlignment / 10;

//2.) Replace with:

	pack.sAlignment	= m_iAlignment;

[File: /Src/server/game/src/char_battle.cpp]

//1.) Search:

void CHARACTER::UpdateAlignment(int iAmount)
{
	bool bShow = false;

	if (m_iAlignment == m_iRealAlignment)
		bShow = true;

	int i = m_iAlignment / 10;

	m_iRealAlignment = MINMAX(-200000, m_iRealAlignment + iAmount, 200000);

	if (bShow)
	{
		m_iAlignment = m_iRealAlignment;

		if (i != m_iAlignment / 10)
			UpdatePacket();
	}
}

//2.) Replace with:

void CHARACTER::UpdateAlignment(int iAmount)
{
	bool bShow = false;

	if (m_iAlignment == m_iRealAlignment)
		bShow = true;

	int i = m_iAlignment;

	m_iRealAlignment = MINMAX(-20000, m_iRealAlignment + iAmount, 20000);

	if (bShow)
	{
		m_iAlignment = m_iRealAlignment;

		if (i != m_iAlignment)
			UpdatePacket();
	}
}

 

[File: /Src/server/game/src/questlua_pc.cpp]

//1.) Search:

	int pc_get_real_alignment(lua_State* L)
	{
		lua_pushnumber(L, CQuestManager::instance().GetCurrentCharacterPtr()->GetRealAlignment()/10);
		return 1;
	}
	int pc_get_alignment(lua_State* L)
	{
		lua_pushnumber(L, CQuestManager::instance().GetCurrentCharacterPtr()->GetAlignment()/10);
		return 1;
	}
	int pc_change_alignment(lua_State * L)
	{
		int alignment = (int)(lua_tonumber(L, 1)*10);
		LPCHARACTER ch = CQuestManager::instance().GetCurrentCharacterPtr();

		ch->UpdateAlignment(alignment);
		return 0;
	}

//2.) Replace with:

	int pc_get_real_alignment(lua_State* L)
	{
		lua_pushnumber(L, CQuestManager::instance().GetCurrentCharacterPtr()->GetRealAlignment());
		return 1;
	}
	int pc_get_alignment(lua_State* L)
	{
		lua_pushnumber(L, CQuestManager::instance().GetCurrentCharacterPtr()->GetAlignment());
		return 1;
	}
	int pc_change_alignment(lua_State * L)
	{
		int alignment = (int)(lua_tonumber(L, 1));
		LPCHARACTER ch = CQuestManager::instance().GetCurrentCharacterPtr();
		ch->UpdateAlignment(alignment);
		return 0;
	}

 

Now you'll get the real values, for example if your align in the game is 17214 in the database will show 17214 work good, before to make that  he show multiplied by *10 equals with 172 140 in database.

Now check is real for GetRealAlignment && GetAlignment.

6b9afc657f43439d819600680493f016.png

 

Edited by Metin2 Dev
Core X - External 2 Internal
  • Love 1
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



  • Similar Content

  • Activity

    1. 5

      Effect weapons

    2. 3

      Crystal Metinstone

    3. 3

      Feeding game source to LLM

    4. 113

      Ulthar SF V2 (TMP4 Base)

    5. 3

      Feeding game source to LLM

    6. 0

      Target Information System

    7. 3

      Feeding game source to LLM

    8. 2

      anti exp explanation pls

  • Recently Browsing

    • No registered users viewing this page.
×
×
  • 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.