|
|
Hi I fixed the swap bug a long time ago it got tested on my server and it worked # |: N# Q6 L* w( c$ {
I posted this because someone kinda posted a youtube thingy about it :O./ \" `. z& k0 O* l2 q
4 { }$ I C- A( W) u' T$ q! HFind this in DPSrv.cpp @ worldserver
4 E+ B1 J1 U! K1 Q% Z
" n. U9 q4 |, l6 RCode:
! J4 ^, F- D2 Q* i, q- d6 qvoid CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize )
: ~% H. |* J8 w; L{- A( V8 U' J, W
DWORD nId;% I1 F+ ]6 j, @" ^0 h
int nPart;
( X) H l& @) J
* X S) ]5 N: P+ W ar >> nId;
5 h: V1 f, T) i J2 Y) `5 O( b+ ^ ar >> nPart;
D' x5 E& \3 l# s. U 7 V0 m3 r9 e# \1 _0 n4 h1 s
if( nPart >= MAX_HUMAN_PARTS )
8 }; ^, `: T$ n- } return;! y( N# o/ Z& C$ k) F4 f/ m5 Z
, c) ?) f: Z/ o: r, z+ ~ CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it
6 a' q$ J/ _# Z2 h
, }. d, X" N' g" S- E2 i; W2 _1 E8 c: Z8 x0 T1 t
Code:* N( L$ @7 D# [0 D; b% x( g. I
#ifdef __QUGET_SWAP_FIX" N! l, A/ ^( Q2 F. k1 n1 @+ w
# K1 F" \3 h$ P5 R; d7 U
if( pUser->GetHitPoint() > pUser->GetMaxHitPoint() )
, |% P. o, R6 u# n, H) W pUser->SetHitPoint( pUser->GetMaxHitPoint());1 g5 E8 w( N; o) W3 I( R) Z
4 W; C% i/ z4 `7 Q/ O' q. i1 b if( pUser->GetManaPoint() > pUser->GetMaxManaPoint() ): F/ J* Q# [2 w+ t8 t
pUser->SetManaPoint( pUser->GetMaxManaPoint() );
$ o9 D, L+ \3 U7 \7 S% D) j/ K0 i! F5 T, _7 K/ {6 T# {) S
if( pUser->GetFatiguePoint() > pUser->GetMaxFatiguePoint() )
0 r6 o& G4 a4 G% ]' d8 C' m: Y& `4 o pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );
% O+ \% U, M0 _# s! x b2 G$ f
8 f" h0 P; h! J5 k: _. j#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp
7 p3 r* \" @/ g5 \: rand add under
5 Q q% \, m/ s3 `4 i0 ~0 o) L! z
Code:
- N# r1 x/ B" B4 Y/ t8 @if( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel )/ }, t& H* |2 F4 W U
{9 ^$ w5 J- ]4 ~& b% \
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 );2 x: R5 _* A7 { j
}this
" v- n; D. P) i) p3 _. i8 U
% y3 \; \& v9 p% s$ a4 A- j/ lCode:
& Y7 m# Y& G4 B5 x o1 U3 S#ifdef __QUGET_SWAP_FIX
. q% ]* Q7 g! B' }# ?' O if( pPlayer->GetHitPoint() > pPlayer->GetMaxHitPoint() )
0 F# G6 ?6 I$ `/ v pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());* O0 c; g9 L% U! c4 t# ^
) k+ \; G# y1 t; u2 R! K6 i, f7 r if( pPlayer->GetManaPoint() > pPlayer->GetMaxManaPoint() )
, G/ u" G1 U3 l& ]+ h( m& h7 K pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );
' N U3 v- Q' X2 L2 n' ?
q3 t4 l3 ]5 _1 e2 F if( pPlayer->GetFatiguePoint() > pPlayer->GetMaxFatiguePoint() )4 m$ T; B- m# j; n- W! |8 v
pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );
- ^- ?4 G, _4 ]+ ~6 G" a* h9 F. F. V3 N _* k
#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver
# C( q* u+ c4 W: r# ]+ K
) z& m7 N1 D( V
( N& q9 x. v4 Y! I* @% j. Y: w |
|