|
|
Hi I fixed the swap bug a long time ago it got tested on my server and it worked 6 z2 }2 F6 t3 \, `
I posted this because someone kinda posted a youtube thingy about it :O.
+ T# ^0 l0 m# ]7 V# p @% i! j; j+ J5 j4 N5 H9 C) s4 K
Find this in DPSrv.cpp @ worldserver! D9 ~0 a: C& s# a3 |4 d. @
0 X0 n# ]' C' {& o! u
Code:9 v" z/ I/ i7 l7 j* N- b0 U
void CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize )8 T: z7 V6 I9 U, Q
{9 V! O( v. d8 Q
DWORD nId;0 Z5 s$ B- M* z' t) t
int nPart;
! R! N& A" e; V# ~1 R% W& D& i3 c" `5 @0 Q8 V, t2 z9 F+ p
ar >> nId;7 r9 m- L" ~5 W/ v" D0 \' F) ^( _
ar >> nPart; 1 L7 U+ O2 G! M
9 m4 ?& D" ?! S5 i3 E1 S
if( nPart >= MAX_HUMAN_PARTS ) . |* c+ Z6 ?9 n; @% n
return;
+ a8 A+ ^2 `8 A; J
% ]( E2 r) z3 u* f1 e0 W4 C& D CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it8 I' N9 A0 B3 q6 n2 v n \5 r$ b
8 ]) [) O0 l" n# O) v
0 ^) l5 i- i, Y3 H, UCode:0 b* D( D' g" X' [3 s2 `9 J
#ifdef __QUGET_SWAP_FIX$ h) t* s; i7 I4 G m% z+ Q. C; L
( ~5 | a8 u Y8 G5 h" [, _
if( pUser->GetHitPoint() > pUser->GetMaxHitPoint() )
2 ?7 S2 t8 Y0 {8 Y, f9 ^ pUser->SetHitPoint( pUser->GetMaxHitPoint());& f+ {* C9 t) U
1 f, I, w9 `$ D; K2 x% |5 |" S* v) K if( pUser->GetManaPoint() > pUser->GetMaxManaPoint() )) _3 \; L/ B1 o; e9 Z4 k
pUser->SetManaPoint( pUser->GetMaxManaPoint() );: Z0 {6 ^, L' O. D
B# k$ v2 ~9 t3 J M6 g! d
if( pUser->GetFatiguePoint() > pUser->GetMaxFatiguePoint() )
" W" g& @9 _( _; j l pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );
8 u0 J- I2 J2 K7 r, w% a$ b- G8 q. I, w
3 @* k2 r' Q! O#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp
; ?0 d5 [# A, U5 s/ uand add under
+ Y6 A$ r( J: N+ V. u. U$ L; {) i. f1 d+ q3 ~& `: `
Code:7 w+ C2 _6 L# S: k& D
if( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel )
& Z* Q8 Y6 u: _' ? {
: a4 F- P4 Y: t9 u/ p8 n9 N* F 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 );
* c1 j9 n3 ^: ]' j" a9 B+ S }this$ S x" q0 t/ P& ]
9 o: m8 Q3 \1 m" B6 [1 k% A& h
Code:
6 \2 Q7 a' T. p1 y#ifdef __QUGET_SWAP_FIX
, c9 g* b+ Y+ _5 u9 \* } if( pPlayer->GetHitPoint() > pPlayer->GetMaxHitPoint() )
3 [% G2 c% d) [" _, `! E& h pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());
; s( Q- a% G; r, w" F
4 _, K: P1 m2 J: K, a1 @ if( pPlayer->GetManaPoint() > pPlayer->GetMaxManaPoint() )
& x/ A5 S/ n& o/ E, H$ Q pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );
/ V5 f( E, Z6 F9 D1 g- k, J3 V7 m8 A
if( pPlayer->GetFatiguePoint() > pPlayer->GetMaxFatiguePoint() )7 t0 f$ l& t! K/ {/ h
pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );" j$ _ S5 c8 x) w* f/ \0 F! f
% y4 X% B8 ^) j3 Z% @
#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver / z# g: w, T- V5 [( [
$ A6 P4 Q# U. L; _
: \3 P: p" y k( g; m7 }
|
|