|
|
Hi I fixed the swap bug a long time ago it got tested on my server and it worked : }$ T( `6 C( v' ?" D4 }
I posted this because someone kinda posted a youtube thingy about it :O.
. |. E& p7 I2 N% ` d! G3 O* i* r
Find this in DPSrv.cpp @ worldserver; ]; I% x4 U& W. ^
" ^: h: o4 p6 V, V2 ^' }3 O6 {Code:
0 P% [+ W0 |8 i+ Nvoid CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize )
- w3 O; J0 H$ b) \{0 w+ j; i% j2 g& y
DWORD nId;' Z' N1 k7 ]3 k* \+ S6 L$ o/ I
int nPart;4 X9 u) P9 P2 Y1 {% V
. Z e3 e' o! G' q4 r9 W, Q
ar >> nId;
+ M. f( f5 X( R& J) i ar >> nPart; - N% i$ w- Q" j( \3 t$ L
- E; v0 r6 }" W" k+ n4 |
if( nPart >= MAX_HUMAN_PARTS ) % H% c2 \7 v6 x4 B4 S. M
return;
% W& m8 k. j9 t5 n, f) R+ t
D/ V: ^1 s9 _+ l* H, Q5 M4 z. f CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it5 u4 I0 b T# c3 r, }' B
( c* D/ K D: q: P6 I* @4 H3 i5 g( Z0 V) h6 J
Code:
7 A0 m: U* ~+ D5 a#ifdef __QUGET_SWAP_FIX( k7 J$ S# M. d7 ~; K3 F9 q* E0 r
j) o1 [3 G# l* m3 Q3 { if( pUser->GetHitPoint() > pUser->GetMaxHitPoint() )
) v- W% S7 i4 k- ?! X) x' N pUser->SetHitPoint( pUser->GetMaxHitPoint());% l) t) ? [; S
( P4 S. d" R: p& U7 R
if( pUser->GetManaPoint() > pUser->GetMaxManaPoint() )
/ q6 h9 M. F' k1 m pUser->SetManaPoint( pUser->GetMaxManaPoint() );
+ {$ V0 ?; y8 @, @
( Z% G8 K# Q$ h$ q3 I3 Q if( pUser->GetFatiguePoint() > pUser->GetMaxFatiguePoint() )9 X2 D: [* H# \2 c O9 W/ f; x
pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );: \7 }/ ?6 z; U q
' q" m7 ]! Y4 P* d F
#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp
# F& q( y Y( e- u# @2 f' T9 vand add under0 @* x4 a! `) R# H
6 @. ?8 y5 U( j% @$ [+ T, f1 c
Code:
. @4 k6 g. K% mif( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel )
/ {& p% X2 {7 r1 M { i+ T; b# _- M7 } I
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 );
. m0 R B/ v3 q }this( ~) U( B( ^1 B6 i+ V) L
$ Y4 \+ L% y3 f( X8 I
Code:' _; F! M1 y: u7 n) _. _( G$ q) v
#ifdef __QUGET_SWAP_FIX; ]3 O- a! Y9 k
if( pPlayer->GetHitPoint() > pPlayer->GetMaxHitPoint() )
: t) l' _, o0 d pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());
( K( Q& W/ @( ~! q' y g* X; ~; | Z
3 `) K2 a% K- D! _/ I if( pPlayer->GetManaPoint() > pPlayer->GetMaxManaPoint() )
' l: A# r' N9 C pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );
7 c: ~! V! [- e2 a0 ?
$ o% X8 `7 L- L1 ]. L if( pPlayer->GetFatiguePoint() > pPlayer->GetMaxFatiguePoint() )
! l: h. l2 O! H6 x. a pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );
; w6 F6 z/ {; b: s& E1 M& ?2 v4 Z! f0 z# F+ f! i- B5 c l. q
#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver
0 R: Z# n/ V* @+ J6 V1 V- d% `2 }* f& V9 r7 j9 A0 M y
, L: A( g3 [2 Y1 `/ q |
|