|
|
Hi I fixed the swap bug a long time ago it got tested on my server and it worked A. S$ ]5 D; B' z0 R6 C
I posted this because someone kinda posted a youtube thingy about it :O.
- y% x$ e" P) D# V0 H9 w2 P' R+ S9 L' N% l& {9 q q. Y8 F
Find this in DPSrv.cpp @ worldserver
- A! x8 I' D5 [ j8 O- m4 r
; u# u+ {9 K; ]& f7 qCode:
3 o9 F7 ?0 c5 u, u4 kvoid CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize )
7 C9 v1 N) t+ P1 L f! R{& x; I6 V9 D* v' ?- P' H
DWORD nId;
% K( W' \) r, e int nPart;6 w5 u9 H9 y, U( I9 p9 V
( K; d: I& F* q* l8 R: y$ s
ar >> nId;
. z" E1 z$ b& ~8 N3 p4 [$ r ar >> nPart;
$ A! \( o, v% H$ f$ c
2 k" T) N/ I/ h6 o7 q9 d7 m if( nPart >= MAX_HUMAN_PARTS ) / B9 X7 Z% S8 p2 H% o' M, r
return; M) F* t j; u9 W, {; r
* O) }( {. k6 b, |. ^ t
CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it3 j9 O; G7 ~" z6 i
2 L0 k3 w& X% |" L: V
: Z3 V8 H/ \8 U8 V
Code:; X7 k0 { Z& r; U- Z
#ifdef __QUGET_SWAP_FIX7 N* F* P k v8 o) l3 c
9 l+ ], f+ i* }! O9 \5 h, m+ y
if( pUser->GetHitPoint() > pUser->GetMaxHitPoint() )5 Y% D5 O* q# G% h
pUser->SetHitPoint( pUser->GetMaxHitPoint());
: F# a8 O S8 w( ~
" O$ v9 a" D. G- e if( pUser->GetManaPoint() > pUser->GetMaxManaPoint() )% t% T6 ?! G) o8 M
pUser->SetManaPoint( pUser->GetMaxManaPoint() );
3 N& X: p; i7 l
- |. z2 @0 k9 M( x if( pUser->GetFatiguePoint() > pUser->GetMaxFatiguePoint() )- o% M1 `( q9 n$ M+ F2 H- d2 Q
pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );
/ @* f% O k) w+ c5 Q/ D' j' u2 z: N9 H
#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp
4 Y. v# w$ r: Yand add under
/ I& r9 X- N' Q5 e+ E' [; ]
. D: f1 r! C$ x. R! j! vCode:
8 p6 w, m8 E, N! ]if( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel ) x' I7 A6 [1 X/ S4 I- D; d# m
{
% P0 s! k, g. d+ }/ o7 f S9 `3 _ 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 );
& o& C; R1 ^: L. i0 }9 b* Y1 q' I6 r }this; O! [, \7 N0 D+ ]8 o4 Q6 X
' B: Q3 u) h9 l+ m- Z, L% x; [
Code:
2 k9 E G4 V+ ?; z& W0 ]+ y, }#ifdef __QUGET_SWAP_FIX# J) X; p: \" o E
if( pPlayer->GetHitPoint() > pPlayer->GetMaxHitPoint() )8 ?2 v- H5 o: r5 f# V! o% R2 I
pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());
! C+ ^" r! X* X. q5 M- [8 c, k5 p$ h2 |5 p4 {" S( o; ?) S7 T
if( pPlayer->GetManaPoint() > pPlayer->GetMaxManaPoint() )
) o& x5 g8 `& F pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );
1 k* u, X9 Y# m; m$ _# f: ?
% Y& n6 d, V/ G8 K3 ? if( pPlayer->GetFatiguePoint() > pPlayer->GetMaxFatiguePoint() )
0 c6 r/ W D" k; x$ G pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );
9 c& j, u0 H. S" ^8 I
: i8 v$ F; B$ O& U* s0 S- Q9 C+ F#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver . P$ A# w. K i7 _1 {- w% ^3 k
- p5 p7 y0 T0 p2 A
0 i! Q) I5 n( K* |
|
|