|
发表于 2015-6-9 00:05:24
|
显示全部楼层
本帖最后由 imutczy 于 2015-6-14 09:08 编辑
传奇2服务器端配原版传奇3客户端,实现登陆。可是物品显示不正常,3里面的物品是11样属性,传奇2服务器传递的物品是8样,并且顺序结构不对,已经解密部分结构,后续将继续解密。争取用传奇2服务器端(C++版)来模拟3的服务器端。留个纪念,怕以后忘记了。
- /*配合新客户端,反编译之后消息加密,应该是只和客户端通讯用的*/
- void testmsg(_LPTDEFAULTMESSAGE const pDefMsg)
- {
- int i,leng=sizeof(_TDEFAULTMESSAGE);
- int pos[]={5,7,9,11,6,1,8,2,10,3,12,4};//和客户端一致了。
- byte *des=(byte*)pDefMsg;
- byte pMsg[sizeof(_TDEFAULTMESSAGE)];
- memcpy(pMsg,des,leng);
- for(i=0;i<leng;i++)
- *(des+i)=*(pMsg+pos[i]-1); //
- }
复制代码 在下面的消息中调用上面testmsg函数。
- __inline void WINAPI fnMakeDefMessageA(_LPTDEFAULTMESSAGE lptdm, WORD wIdent, int nRecog, WORD wParam, WORD wTag, WORD wSeries)
- { lptdm->wIdent = wIdent; lptdm->nRecog = nRecog; lptdm->wParam = wParam; lptdm->wTag = wTag; lptdm->wSeries = wSeries; testmsg(lptdm);}
复制代码- __inline void WINAPI fnMakeDefMessageW(_LPTDEFAULTMESSAGE lptdm, WORD wIdent, int nRecog, WORD wParam, WORD wTag, WORD wSeries)
- { lptdm->wIdent = wIdent; lptdm->nRecog = nRecog; lptdm->wParam = wParam; lptdm->wTag = wTag; lptdm->wSeries = wSeries; testmsg(lptdm);}
复制代码
|
|