Jump to content

[C++] Nivel de Mobs donde el nombre


PACI

Mensajes recomendados

Hola. Pues na' que no sabía que los oficiales habían puesto esto, así que hoy decidí hacerlo, y os lo traigo.

Off: Llegan nuevas dungeons al oficial.

 

Cuando compiléis el binario quedará así:

 

e4361d3e6f.PNG
 

/*
	@PACI - 03.08.15

	The following changes will allow you to see the Monsters Level
	without clicking on them. Like a normal character, you'll see
	the level before the monster's name.

	Apply these changes on InstanceBaseEffect.cpp (located at InstanceBase).
	Replace your AttachTextTail() function with mine, don't forget to add the include!
*/
#include "PythonNonPlayer.h"

void CInstanceBase::AttachTextTail()
{
	if (m_isTextTail)
	{
		TraceError("CInstanceBase::AttachTextTail - VID [%d] ALREADY EXIST", GetVirtualID());
		return;
	}

	m_isTextTail=true;
	DWORD dwVID=GetVirtualID();

	float fTextTailHeight=IsMountingHorse() ? 110.0f : 10.0f;

	static D3DXCOLOR s_kD3DXClrTextTail=D3DXCOLOR(1.0f, 1.0f, 1.0f, 1.0f);
	CPythonTextTail::Instance().RegisterCharacterTextTail(m_dwGuildID, dwVID, s_kD3DXClrTextTail, fTextTailHeight);

	if (!m_dwLevel && !IsPC() && !IsNPC() && !IsWarp() && !IsGoto())
	{
		const CPythonNonPlayer::TMobTable * pMobTable = CPythonNonPlayer::Instance().GetTable(GetVirtualNumber());
		
		if (!pMobTable)
		{
			TraceError("Could not get mob table %d", GetVirtualNumber());
			return;
		}

		float fAverageLevel = floor(pMobTable->bLevel+0.5f);
		m_dwLevel = int(fAverageLevel);
	}

	if (m_dwLevel)
		UpdateTextTailLevel(m_dwLevel);
}
Enlace para comentar
Compartir en otros sitios

Unirse a la conversación

Puedes publicar ahora y registrarte más tarde. Si tienes una cuenta, regístrate para publicar con su cuenta.

Guest
Responder a este tema...

×   Has pegado contenido con formato .   Eliminar formato

  Only 75 emoji are allowed.

×   Tu enlace se ha incorporado automáticamente.   Mostrar un enlace en su lugar

×   Se ha restaurado el contenido anterior. .   Borrar editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recientemente navegando por este tema   0 miembros

    • No hay usuarios registrados visitando esta página.
×
×
  • Crear nuevo...