[Development] Source Mu Main 1.03.35 [Season 5.1 - Season 5.2]

Newbie Spellweaver
Joined
Sep 12, 2022
Messages
23
Reaction score
1


It has been fixed, there is no LOG folder in the GS directory. Where does the main set the connection IP?
 
Joined
Oct 8, 2006
Messages
740
Reaction score
289

It has been fixed, there is no LOG folder in the GS directory. Where does the main set the connection IP?

It's in the source code. Search for this variable szServerIpAddress.

char *szServerIpAddress = lpszServerIPAddresses[SELECTED_LANGUAGE];

This code is taking the IP from some static definition based on the selected language define.
You need to check what language have you selected in the source and where the IP is assigned to szServerIpAddress variable. There are many IPs set up in the source.
 
Newbie Spellweaver
Joined
Sep 12, 2022
Messages
23
Reaction score
1
[报价=拉链20032;9166656]它在源代码中。搜索此变量 szServerIpAddress。

char *szServerIpAddress = lpszServerIPAddresses[SELECTED_LANGUAGE];

此代码根据所选语言定义从某个静态定义中获取 IP。
您需要检查您在源中选择的语言以及将 IP 分配给 szServerIpAddress 变量的位置。源中设置了许多 IP。[/引用]


与此主对应的版本号和序列号是什么?
连接后提示游戏版本不正确
 
Last edited:
Newbie Spellweaver
Joined
Apr 24, 2015
Messages
31
Reaction score
7
[GameServerInfo]
ClientExeSerial = fdUiqE28nKN324vH
ClientExeVersion = 1.03.34

What is the version number and serial number corresponding to this main?
After connecting, it prompts that the game version is incorrect

Search in WSclient.cpp
BYTE Version[SIZE_PROTOCOLVERSION]

you will find there
 
Newbie Spellweaver
Joined
Sep 12, 2022
Messages
23
Reaction score
1
Search in WSclient.cpp
BYTE Version[SIZE_PROTOCOLVERSION]

you will find there


What server are you using? Can you share it? I can't log in with the louls server. The GS of the Original WZ Sources 1.00.98 I compiled cannot be connected. After entering the account password, it is stuck. The GS prompt is as follows

14:19:50 connect : [9000][107.173.14.14]
14:19:59 join send : (9000)louismk
error-L2 : User who is not authenticated requested character list?? ...\GameServer\GameServer\DSProtocol.cpp 1718
WSARecv() failed with error 10038
14:19:59 (9000)logout : louismk [107.173.14.14]
Whole connection closed

 
Newbie Spellweaver
Joined
Sep 12, 2022
Messages
23
Reaction score
1



Can you upload the 【CNewUICheckBox】 class and the 【MoveTextPos】 function?




 

Attachments

You must be registered for see attachments list
Experienced Elementalist
Joined
Apr 2, 2009
Messages
223
Reaction score
57



Can you upload the 【CNewUICheckBox】 class and the 【MoveTextPos】 function?

Code:
class CNewUICheckBox
	{
	public:
		CNewUICheckBox();
		virtual ~CNewUICheckBox();
		void CheckBoxImgState(int imgindex);
		void RegisterBoxState(bool eventstate);
		void ChangeText(unicode::t_string btname);
		void CheckBoxInfo(int x, int y, int sx, int sy);
		bool GetBoxState();

		void Render();
		bool UpdateMouseEvent();
	private:
		int						s_ImgIndex;
		POINT					m_Pos;
		POINT					m_Size;
		unicode::t_string		m_Name;
		HFONT					m_hTextFont;
		DWORD					m_NameColor;
		DWORD					m_NameBackColor;
		float					m_ImgWidth;
		float					m_ImgHeight;
		bool					State;
	};

Code:
SEASON3B::CNewUICheckBox::CNewUICheckBox()
{
	s_ImgIndex = -1;
	m_Pos.x = 0; m_Pos.y = 0;
	m_Size.x=15; m_Size.y=15;
	m_Name.clear();
	m_hTextFont = g_hFont;
	m_NameColor = 0xFFFFFFFF;
	m_NameBackColor = 0x00000000;
	m_ImgWidth = 0.0;
	m_ImgHeight = 15.f;
	State = 0;
}

SEASON3B::CNewUICheckBox::~CNewUICheckBox()
{

}

void SEASON3B::CNewUICheckBox::CheckBoxImgState(int imgindex)
{
	s_ImgIndex = imgindex;
}

void SEASON3B::CNewUICheckBox::RegisterBoxState(bool eventstate)
{
	State = eventstate;
}

void SEASON3B::CNewUICheckBox::ChangeText(unicode::t_string btname)
{
	m_Name = btname;
}

void SEASON3B::CNewUICheckBox::CheckBoxInfo(int x, int y, int sx, int sy)
{
	m_Pos.x = x; m_Pos.y = y;
	m_Size.x = sx; m_Size.y = sy;
}

bool SEASON3B::CNewUICheckBox::GetBoxState()
{
	return State;
}

void SEASON3B::CNewUICheckBox::Render()
{
	EnableAlphaTest();
	glColor4f(1.f, 1.f, 1.f, 1.f);

	RenderImage(s_ImgIndex, m_Pos.x, m_Pos.y, m_Size.x, m_Size.y, 0.0, ( State ) ? 0.0 : m_Size.y);

	if (State)
	{
		RenderImage(s_ImgIndex, m_Pos.x, m_Pos.y, m_Size.x, m_Size.y, 0, 0);
	}
	else
	{
		RenderImage(s_ImgIndex, m_Pos.x, m_Pos.y, m_Size.x, m_Size.y, 0, m_Size.y);
	}

	g_pRenderText->SetFont(m_hTextFont);
	g_pRenderText->SetTextColor(m_NameColor);
	g_pRenderText->SetBgColor(m_NameBackColor);
	g_pRenderText->RenderText(m_Pos.x+ m_Size.x+1, m_Pos.y+4, m_Name.c_str(), 0, 0);
}

bool SEASON3B::CNewUICheckBox::UpdateMouseEvent()
{
	if (CheckMouseIn(m_Pos.x, m_Pos.y, m_Size.x, m_Size.y))
	{
		if (IsRelease(VK_LBUTTON))
		{
			State = !State;
			return TRUE;
		}
	}
	return 0;
}
 
Newbie Spellweaver
Joined
Sep 12, 2022
Messages
23
Reaction score
1
dude and these two


2.



 
Newbie Spellweaver
Joined
Sep 12, 2022
Messages
23
Reaction score
1
No helper button after adding






PHP:
void SEASON3B::CNewUIMessageBoxButton::MoveTextPos(int iX, int iY)
{
    m_iMoveTextPosX = iX;
    m_iMoveTextPosY = iY;
}

Option 2 Add library
#include "NewUICommonMessageBox.h"
 
Experienced Elementalist
Joined
Apr 2, 2009
Messages
223
Reaction score
57
No helper button after adding



Code:
	BITMAP_HERO_POSITION_INFO_BEGIN,
	BITMAP_HERO_POSITION_INFO_END = BITMAP_HERO_POSITION_INFO_BEGIN + 6,

NewUIButton.h
Code:
		int						m_iMoveTextTipPosX;
		int						m_iMoveTextTipPosY;

[CODE] void MoveTextTipPos(int iX, int iY);
Code:
void MoveTextPos(int iX, int iY);

NewUIButton.cpp
Code:
void SEASON3B::CNewUIButton::Initialize()

void SEASON3B::CNewUIButton::Initialize()
{
	m_hTextFont = g_hFont;
	m_hToolTipFont = g_hFont;
#ifdef KJH_ADD_INGAMESHOP_UI_SYSTEM
	m_iMoveTextPosX = 0;
	m_iMoveTextPosY = 0;
	m_bClickEffect = false;
	m_iMoveTextTipPosX = 0;
	m_iMoveTextTipPosY = 0;
#endif // KJH_ADD_INGAMESHOP_UI_SYSTEM
}
ADD
Code:
void SEASON3B::CNewUIButton::MoveTextTipPos(int iX, int iY)
{
	m_iMoveTextTipPosX = iX;
	m_iMoveTextTipPosY = iY;
}

Find
Code:
bool SEASON3B::CNewUIButton::Render( bool RendOption )

y en dentro de la función buscar el if

	if( m_TooltipText.size() != 0 )
	{
		if( CheckMouseIn(m_Pos.x, m_Pos.y, m_Size.x, m_Size.y) )
		{
			SIZE Fontsize;
			g_pRenderText->SetFont( m_hToolTipFont );
			g_pMultiLanguage->_GetTextExtentPoint32(g_pRenderText->GetFontDC(), m_TooltipText.c_str(), m_TooltipText.size(), &Fontsize);

			Fontsize.cx = Fontsize.cx / 640;
			Fontsize.cy = Fontsize.cy / 480;

			int x = m_Pos.x+((m_Size.x/2)-(Fontsize.cx/2));
			int y = m_Pos.y+m_Size.y+2;
			
			int _iTempWidth =  x + Fontsize.cx + 6;
			x = ( _iTempWidth > 640) ? (x - ( _iTempWidth - 640)) : x;

			if( m_IsTopPos ) y = m_Pos.y-(Fontsize.cy+2);
//-- remplazar este rendertext
			RenderText( m_TooltipText.c_str(), x, y, Fontsize.cx+6, 0, m_hToolTipFont, m_TooltipTextColor, RGBA(0, 0, 0, 180), RT3_SORT_CENTER );
		}
	}

Code:
now replace where the comment marks //-- replace this rendertext

RenderText( m_TooltipText.c_str(), x + m_iMoveTextTipPosX, y + m_iMoveTextTipPosY, Fontsize.cx+6, 0, m_hToolTipFont, m_TooltipTextColor, RGBA(0, 0, 0, 180), RT3_SORT_CENTER );


[/URL]
 
Newbie Spellweaver
Joined
Sep 12, 2022
Messages
23
Reaction score
1
After clicking the button, how to set and enable



After clicking the button, how to set and enable



 
Joined
Oct 8, 2006
Messages
740
Reaction score
289
Anyone has any idea what should be used instead of a text box for displaying items in Helper but with a possibility to click and change the background color of the current line? (like when you select something)



Not sure, but I think it has to be a text box list or something.
 
Joined
Oct 8, 2006
Messages
740
Reaction score
289
Yes, clicking the button does not show the assistant



NewUISystem.cpp
Join MU help without displaying the helper interface

Just stop copy pasting pieces of code and try to understand better how the UIMng works.
You have to register the new interface in the m_pNewUIMng because ShowInterface method works for only registered UI windows.
 
Newbie Spellweaver
Joined
Sep 12, 2022
Messages
23
Reaction score
1
Can you provide the next file? I study

Just stop copy pasting pieces of code and try to understand better how the UIMng works.
You have to register the new interface in the m_pNewUIMng because ShowInterface method works for only registered UI windows.