case 0x180C:
var ItemName = INC_LOCAL[i].ReadUnicode();
byte[] ItemInfo = INC_LOCAL[i].ReadUInt8Array(0x1D0);
Packet itemlink = new Packet(0x180C);
itemlink.WriteAscii_Chinese(Charname + $"<{ItemName}>");
itemlink.WriteUInt8Array(ItemInfo);
Utils.BroadCastToClients(itemlink);
----------------------------------------
public void WriteAscii_Chinese(String value)
{
byte[] bytes = Encoding.GetEncoding("gb2312").GetBytes(value);
m_writer.Write((ushort)(bytes.Length + 1));
m_writer.Write(bytes);
m_writer.Write((byte)0);
---------------------------------------
C++=DLL
time_t lastClickTime;
LRESULT CALLBACK ImGui_WndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam) {
BS_DEBUG_LOW("ImGui_WndProc");
// Check if context is already created
if (!ImGui::GetCurrentContext())
return RESULT_PASS;
ImGui_ImplWin32_WndProcHandler(hWnd, message, wParam, lParam);
if (KEY_DOWN(VK_LCONTROL)) {
if (KEY_DOWN(VK_LBUTTON)&&(time(NULL)- lastClickTime>1)) {
lastClickTime = time(NULL);
if (!strcmp(g_CurrentIfUnderCursor->GetRuntimeClass()->m_lpszClassName, "CIFSlotWithHelp")) {
CIFSlotWithHelp* CurSlot = (CIFSlotWithHelp*)g_CurrentIfUnderCursor;
byte SlotID = CurSlot->UniqueID() - 100 + 0xD;
if (CurSlot->Type == 70 && CurSlot->ItemInfo) {
CIFChatViewer* chatView = (CIFChatViewer*)g_pCGInterface->m_IRM.GetResObj(1, 1);
if (CGlobalDataManager *g_datamanager = CGlobalDataManager::Get())
{
if (ObjectData *uqdata = g_datamanager->GetObjectData(CurSlot->ItemInfo->ItemID))
{
std::wstring NameStrID128 = g_CTextStringManager->GetStringByNameStrID(&uqdata->ObjNameStrID)->c_str();
wchar_t* NewMsg = new wchar_t[1024];
std::n_wstring ItemNameW = (NameStrID128).c_str();
UINT16 Size = ItemNameW.length();
CSOItem* myitem11=CurSlot->ItemInfo;
if (CIFMainMenu::GlobalLinkGUI->IsVisible())
{
wsprintfW(NewMsg, L"%s<%s>", CIFMainMenu::GlobalLinkGUI->m_edit->GetText(), NameStrID128.c_str());
CIFMainMenu::GlobalLinkGUI->m_edit->SetText(NewMsg);
CIFMainMenu::GlobalLinkGUI->m_custom_label10->TB_Func_13(myitem11->GetObjectData()->AssocFileIcon,0,0);
}
else
{
wsprintfW(NewMsg, L"%s<%s>", chatView->m_InputBox->GetText(), NameStrID128.c_str());
chatView->m_InputBox->SetText(NewMsg);
chatView->SetFocus_MAYBE();
}
NEWMSG(0x180C)
pReq.Write(&Size, 2);
pReq.Write(NameStrID128.c_str(), Size * 2);
pReq << *CurSlot->ItemInfo;
SENDMSG()
} }
}
}
}
}
Shit files-those idiots sold them, I share them~~~
}
if (KEY_DOWN(VK_RBUTTON) && (time(NULL) - lastClickTime > 0)) {
lastClickTime = time(NULL);
if (!strcmp(g_CurrentIfUnderCursor->GetRuntimeClass()->m_lpszClassName, "CIFSlotWithHelp")) {
//??
CIFSlotWithHelp* CurSlot = (CIFSlotWithHelp*)g_CurrentIfUnderCursor;
int SlotID = CurSlot->UniqueID() - 100 + 0xD;
byte slotID2 = SlotID;
if (CurSlot->Type == 70 && CurSlot->ItemInfo) {
NEWMSG(0x180B)
pReq << SlotID << CurSlot->ItemInfo->ItemID;
SENDMSG()
}
if (CurSlot->ItemInfo && (CurSlot->ItemInfo->ItemID == 3851 ||CurSlot->ItemInfo->ItemID == 35592 ||CurSlot->ItemInfo->ItemID == 33887))
{
CIFMainMenu::GlobalLinkGUI->ShowGWnd(true);
CIFMainMenu::GlobalLinkGUI->BringToFront();
CIFMainMenu::GlobalLinkGUI->m_edit->SetFocus_MAYBE();
CIFGlobalLink::SetSlotID(slotID2);
}
}
}
所有代码需要的自己测试






