|
|
Hi I fixed the swap bug a long time ago it got tested on my server and it worked " X1 S; s2 D0 B
I posted this because someone kinda posted a youtube thingy about it :O.7 h& J H1 z* k% n4 t- D- B. _
, P3 b. `* y7 {$ j7 c) O) h- ~Find this in DPSrv.cpp @ worldserver
! ^% i9 W9 [4 Y, b, u. |5 J
6 j1 R9 `$ p) M3 p) SCode:
' j2 R) I8 x) vvoid CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize ). N! J5 j' I! y6 m. Y
{, ~) U- A' w: d) O5 S! R
DWORD nId;8 a4 X$ }2 v& d8 s
int nPart;
3 n: N. i: O: V0 ]. ^2 Y
2 C# d9 \: F9 B6 c* Z% ~# T ar >> nId;
& f6 S" x" ?- Z v, [ y ar >> nPart; 3 F/ w1 z% y. H* |) P' q- U
1 w( Z$ \% m W, r; L% m% p# J/ o if( nPart >= MAX_HUMAN_PARTS ) 6 M, A7 Q% v m8 V8 k& s, ~
return;! A0 ~# y: J8 T; W$ i/ o% s! Z
9 B6 W0 v' X2 p
CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it
! U" c" j, i; S' b$ i7 [9 e
0 L. }( ]. G; U9 H- @: K
P& q6 ]" J1 z j& U+ {# E* hCode:) r' T4 H/ r- O4 v# T
#ifdef __QUGET_SWAP_FIX
: y3 D- v4 K) t4 f" Q) ]' ]6 J8 _9 i# t
if( pUser->GetHitPoint() > pUser->GetMaxHitPoint() )
" U. Q+ X9 q3 n pUser->SetHitPoint( pUser->GetMaxHitPoint());: v& }3 |1 y5 B: Y0 B; B3 D
/ c. G6 f5 T8 [$ [: U4 A if( pUser->GetManaPoint() > pUser->GetMaxManaPoint() ), ?5 a& m% J4 k4 k, E T9 k- G" v
pUser->SetManaPoint( pUser->GetMaxManaPoint() );) _+ p$ `. \; P$ b0 o2 N$ U
2 @ W3 m1 Q Q; ?6 z if( pUser->GetFatiguePoint() > pUser->GetMaxFatiguePoint() )& k1 ~7 Q" `, n5 B6 D0 J" L
pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );
+ R. ~1 ?- O* r) E1 y( B, a! e2 ?$ R: ]' D% {% N
#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp
5 `& m# x$ I4 H% ^, _% ~and add under# f6 l; P: m: o
' ^. h: ]3 ~7 _: m1 c, X2 R% xCode:. i# a+ T3 B% @8 G) _5 b
if( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel )5 R6 e2 u, ?: A# ]! p! I9 v
{( c3 g/ D3 q! f, `# n
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 J' k4 v0 c" I7 X) a% M! M$ U }this6 Q$ o1 E- l9 Q
$ }) Z' i5 K v: M& J% W+ g
Code:
4 I; ?8 b, {. I3 D* V# [* G9 D! @#ifdef __QUGET_SWAP_FIX
5 q; ~7 e/ } D! U4 q& t if( pPlayer->GetHitPoint() > pPlayer->GetMaxHitPoint() )& z8 G. t9 [' }; M7 E. D. b4 G
pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());/ N: d# w4 q; z5 J; R1 z' z
% O+ ]% ]9 ^ r# p& u; U+ _$ Q! I if( pPlayer->GetManaPoint() > pPlayer->GetMaxManaPoint() )' z4 |, T) z3 n- y* _! P
pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );6 j- g. X" I% M! r1 F
: j$ y4 |) N* {: a
if( pPlayer->GetFatiguePoint() > pPlayer->GetMaxFatiguePoint() )3 z/ H3 f2 }( i5 Q1 `) F; }6 y9 U
pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );" E" L. C0 [/ U+ r
0 c1 z* x1 B3 `7 P/ h#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver 5 i2 l1 K _+ a7 X' m# ]: C
8 z) H, j- @2 |7 l `2 d% c: O7 e% b) W# W l4 o
|
|