飞飞世界论坛

标题: 修复交换错误 [打印本页]

作者: admin    时间: 2016-1-10 03:43
标题: 修复交换错误
Hi I fixed the swap bug a long time ago it got tested on my server and it worked
1 Y7 A/ e: P' d# [I posted this because someone kinda posted a youtube thingy about it :O.
* a5 W) r$ R& ~. H6 s1 b2 y! T/ n0 L$ H: M: y
Find this in DPSrv.cpp @ worldserver- t% B6 y3 C2 `4 b, \- D

  ?% d3 a7 L7 I- y3 C2 S/ n$ \Code:
, J( ]2 F+ ~& Q- ^& Fvoid CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize )6 V) |& H# a9 v& ~4 }4 r5 J2 H
{
" u7 H  h" p, f( q# T# F4 k' j& l# G        DWORD nId;
" y8 K) I0 X) \        int nPart;
# z/ b6 C! W' l
) h1 |9 }6 C+ p- p8 l- J        ar >> nId;
* O3 V% R+ O% ~7 t        ar >> nPart;               
9 ^0 c( Y. s2 }5 v. _: C       
2 b5 U1 Y) X7 r9 U1 \; f9 H5 M3 D        if( nPart >= MAX_HUMAN_PARTS )        ) V+ p+ i" T$ e3 u0 r4 A& H; B
                return;/ J+ U; M5 h6 Z6 V
% L, n( S) p/ ~' o) }$ z, ?7 B
        CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it
2 s% ~+ B, ^$ I2 H6 r6 D; g2 j) s2 `* s* \
$ n7 M5 m4 y1 r# g1 ]
Code:
# t/ l' L. G  z; v+ p#ifdef __QUGET_SWAP_FIX
+ v. s" X& x1 k! u( }4 _5 l' ]; T9 l3 c4 v  x0 {
                                if( pUser->GetHitPoint() >  pUser->GetMaxHitPoint() )
& M* D0 U1 o, W; N: M. t                                         pUser->SetHitPoint( pUser->GetMaxHitPoint());9 T4 o' H2 a1 B( n2 q0 f' L8 R
5 K  B$ Y. \4 x. Z
                                if( pUser->GetManaPoint() >  pUser->GetMaxManaPoint() )* g9 O. Q+ _4 n2 _; l4 m
                                         pUser->SetManaPoint( pUser->GetMaxManaPoint() );
" F( [1 J( [- K8 ?6 }: Z& Q7 \. N4 S0 J
                                if( pUser->GetFatiguePoint() >  pUser->GetMaxFatiguePoint() )
$ o( H9 B1 o) j1 }                                         pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );
  }% U% c' t5 I6 M+ J" }& A
2 y; L- V+ u8 w' e) W4 m2 @#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp
: `9 {  m/ S3 L. B- ~( `and add under
* ?* v2 X- {$ \: w! [  i6 r( C7 N" T
. `1 p' s# X: Y% e5 QCode:
2 q3 `0 i0 n* d7 n# Aif( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel )
/ g/ |' l, ^8 @! D7 {" y+ T; e                        {
, `) p* D  i0 {                                CMover::UpdateParts( pPlayer->GetSex(), pPlayer->m_dwSkinSet, pPlayer->m_dwFace, pPlayer->m_dwHairMesh, pPlayer->m_dwHeadMesh, pPlayer->m_aEquipInfo, g_WndMng.m_pWndBeautyShop->m_pModel, &pPlayer->m_Inventory );; y. _+ J. x; [8 y% j  q' n
                        }this( W' G. F- d0 D2 _

# n- M$ M9 ?9 a! A* KCode:
5 K9 q. ]  |: s' X9 G#ifdef __QUGET_SWAP_FIX8 k  h7 ?+ ^& K" x! \5 {
                                if( pPlayer->GetHitPoint() >  pPlayer->GetMaxHitPoint() )
6 ^, |3 r; m: w                                         pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());# K4 S- z9 [: x5 `, N, c4 c
$ X4 A9 C9 Z$ {" k6 V1 S
                                if( pPlayer->GetManaPoint() >  pPlayer->GetMaxManaPoint() )/ y+ j* V/ _! y$ V
                                         pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );
* b. D' b3 q) ]3 t$ E& j* {
& I; T5 E+ d: e2 B; p7 i                                if( pPlayer->GetFatiguePoint() >  pPlayer->GetMaxFatiguePoint() )) a/ e4 @0 l" C3 k8 ]- p
                                         pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );
$ V" X' ?8 g8 G: @
( y% f' s. Y6 ^& l& G7 J! Q9 w' W#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver - v% V- U, F/ {$ g, X; r! P
' r, k' g$ B! ]' ?, d0 b) T! h; M

" z$ n; m8 ^- K$ ?/ E




欢迎光临 飞飞世界论坛 (http://www.ffwold.com/) Powered by Discuz! X3.2