|
|
Hi I fixed the swap bug a long time ago it got tested on my server and it worked
1 N: C+ T, q( z; |/ tI posted this because someone kinda posted a youtube thingy about it :O.' h! Y5 v6 g' U
( h" ~- t2 q8 p% g6 a+ ^' P* N M
Find this in DPSrv.cpp @ worldserver' \7 s5 C; W& x, _
# x7 Q( m- G0 I1 \+ R/ t/ g0 [Code:
; e+ z; A8 \* ?void CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize )% v6 @ i5 ?/ h- S% T. M$ ?$ a+ W4 m
{
7 r& t: ?: _+ c8 d. s( y' a DWORD nId;
+ O9 {. {: y4 z. \# M" F int nPart;3 q! i: `9 ~. D1 N! M3 G$ w9 ~
l9 x3 l1 b5 [ q* E ar >> nId;* a& `4 l- v; m- @* S% n# z
ar >> nPart; 9 W* S+ H. t5 }3 K
3 J# A& I& s/ W F3 ~, [- l
if( nPart >= MAX_HUMAN_PARTS )
& I! P' |2 M" [9 b2 K9 s! ?" |: _ return;& q' s4 I5 |8 Y, i/ i
# N# M! X: i4 k. A2 c X0 O% i+ M
CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it# `) l0 S2 L2 ~/ R! h: K
! ]' x; ]$ p" K
% g# e$ H X. a* X: Y" {3 g# \1 VCode:
! e" A* y% H) P+ q#ifdef __QUGET_SWAP_FIX
2 w( U* h$ ]4 E. ]: z" @) J q, p4 n$ [: a3 h( J+ V$ U, e2 z+ d
if( pUser->GetHitPoint() > pUser->GetMaxHitPoint() )
! @; O; u0 P' ~/ f3 H/ V pUser->SetHitPoint( pUser->GetMaxHitPoint());3 e, Y3 r, [9 p7 J) ^
9 \4 I7 ~5 ?8 |, |1 g' T
if( pUser->GetManaPoint() > pUser->GetMaxManaPoint() )$ q7 _; v" O7 p% J# R1 o; ~- \7 p
pUser->SetManaPoint( pUser->GetMaxManaPoint() );9 }8 H2 T) \+ Q; b0 E1 t. [
2 E G M1 x' G' \ p
if( pUser->GetFatiguePoint() > pUser->GetMaxFatiguePoint() )
0 t R) ?$ l0 D, s4 F9 v; d2 d3 A pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );* V R# n/ t% _5 r. R
1 Y3 w+ {& T3 ^' s1 {8 y
#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp: ]) A, s5 n9 K) u; p6 j
and add under
1 `: R! R5 D8 A" L4 j4 f
- `& W* M) p R) z6 Z" a, j: V" RCode:
7 V) n- k( w, L: [% Gif( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel )0 {6 {) _ R& j4 p; x
{, o0 |& l5 r+ p3 S
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 );/ m% {/ c0 D: `, X
}this
# Z+ a% ?& Z: y5 L* \
' d" t8 w6 r3 s5 F* UCode:
" ^6 D+ N4 q, O+ ]( W, d/ |#ifdef __QUGET_SWAP_FIX
4 t3 Z9 \' k+ ~3 E% N if( pPlayer->GetHitPoint() > pPlayer->GetMaxHitPoint() )
2 k( V: i* W L6 Q pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());
3 m& w) O2 G# ]/ A4 P; f( V8 m5 G, M# _: E8 H% ^/ F9 w
if( pPlayer->GetManaPoint() > pPlayer->GetMaxManaPoint() )
0 s+ q% B: q2 p' ? pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );" p2 b& N" [. { ~# _% e
% a7 u( w4 {. n- J! H7 O2 N$ V
if( pPlayer->GetFatiguePoint() > pPlayer->GetMaxFatiguePoint() )9 z! B( m$ e$ `! A2 s6 v. c1 ~
pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );1 i2 \! x( \8 d* x$ Y
2 J; x; S: T3 m+ l9 M
#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver
: ?5 _; c6 M+ O j# l, r" s
4 l ]( U5 _9 ~0 x" R8 S) U/ f9 q
; n- u; b; |% L3 s* z# x |
|