diff --git a/Source/UI/UICaptchaRegisterWnd.cpp b/Source/UI/UICaptchaRegisterWnd.cpp index fe0c45017..7f848a3b2 100644 --- a/Source/UI/UICaptchaRegisterWnd.cpp +++ b/Source/UI/UICaptchaRegisterWnd.cpp @@ -171,8 +171,7 @@ int UICaptchaRegisterWnd::SendMsg( memcpy_s(packet.text, sizeof(packet.text), this->m_editCtrl->Text(), sizeof(packet.text)); packet.size = static_cast(this->m_decompressedSize); - CRagConnection& connection = GetRagConnection(); - connection.Send(g_packetLengths.FixedLength(packet.id), &packet); + GetRagConnection().Send(reinterpret_cast(GetRagConnection()).FixedLength(packet.id), &packet); g_serverLanguage->ResetInput(); } diff --git a/Source/UI/UIMacroBlackListCheckWnd.cpp b/Source/UI/UIMacroBlackListCheckWnd.cpp index 5e97ff365..fea1e0f1d 100644 --- a/Source/UI/UIMacroBlackListCheckWnd.cpp +++ b/Source/UI/UIMacroBlackListCheckWnd.cpp @@ -194,8 +194,7 @@ int UIMacroBlackListCheckWnd::SendMsg( MacroBlackListCheckPacket packet; packet.id = 0x0BDC; strncpy_s(packet.text, sizeof(packet.text), this->input, _TRUNCATE); - CRagConnection& connection = GetRagConnection(); - connection.Send(g_packetLengths.FixedLength(packet.id), &packet); + GetRagConnection().Send(reinterpret_cast(GetRagConnection()).FixedLength(packet.id), &packet); this->inputLength = 0; std::memset(this->input, 0, sizeof(this->input)); return 0; diff --git a/Source/UI/Window/UIDebuffRemoveWnd.cpp b/Source/UI/Window/UIDebuffRemoveWnd.cpp index d14b2a96b..510429382 100644 --- a/Source/UI/Window/UIDebuffRemoveWnd.cpp +++ b/Source/UI/Window/UIDebuffRemoveWnd.cpp @@ -46,8 +46,7 @@ int UIDebuffRemoveWnd::SendMsg(UIWindow* sender, int message, std::intptr_t a, s if (a == 184) { DebuffRemovePacket packet; packet.id = 0xC2A; - CRagConnection& connection = GetRagConnection(); - connection.Send(g_packetLengths.FixedLength(packet.id), &packet); + GetRagConnection().Send(reinterpret_cast(GetRagConnection()).FixedLength(packet.id), &packet); } return 0;