|
|
Hi I fixed the swap bug a long time ago it got tested on my server and it worked 4 U3 \% t; s8 A# A
I posted this because someone kinda posted a youtube thingy about it :O.
6 _( W/ x+ m! m$ G! L+ o3 n# O# t% H. g% B4 n* ^/ N. n {
Find this in DPSrv.cpp @ worldserver t, H/ d$ E, Q2 P. z
3 @ q, D" `' n' a9 T. BCode:
+ z; ]6 v- A7 e. T2 A1 ivoid CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize )+ i9 n0 F! W3 z. M" l
{: q! |. _! ?, J
DWORD nId;2 x! U; r& y3 w
int nPart;% G) V# O4 J7 H' a2 e0 {( F) I( m
& a; [7 P. V% G% i7 @3 D, o+ \9 ?- S ar >> nId;
5 Z# t( ^. Z+ t$ b0 l5 N ar >> nPart;
5 [2 i* e; c, B) Q- V% ~& b
" u, Y3 Y h: N0 r/ e' ~5 A if( nPart >= MAX_HUMAN_PARTS )
( O/ m& o u1 p, G2 y return;! c! L: e2 \) r+ ^
: i/ b+ O8 d" n4 r0 a) y. h9 S CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it
4 \; p* ~ [' q& B! `1 G1 J& h( q/ S( M2 W
# k8 E! {# a9 l8 e, qCode:
5 W" k, `$ `/ U3 C$ x#ifdef __QUGET_SWAP_FIX' w: `$ K% H4 X) |& `
( @" m7 t/ K4 \% I
if( pUser->GetHitPoint() > pUser->GetMaxHitPoint() )
+ m) i$ Y6 C1 e/ n% R pUser->SetHitPoint( pUser->GetMaxHitPoint());2 m; k, ?1 F) p8 H
) Q8 O7 r V( k# A6 {7 T if( pUser->GetManaPoint() > pUser->GetMaxManaPoint() )
5 ^+ ^( i" h p* r8 b0 m/ M pUser->SetManaPoint( pUser->GetMaxManaPoint() );8 A& n/ B7 O* m; l6 D
i+ K- `8 i( ^) L, [: o
if( pUser->GetFatiguePoint() > pUser->GetMaxFatiguePoint() )
' Z3 M H5 R- u$ A/ d pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );
% o- A9 ]% X9 Q1 B2 Q% ^( l0 {7 {+ z8 ]" r" ]. G3 [" B
#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp" o5 s0 c1 u" k6 Q& q9 R1 c! F
and add under; \8 y9 Y4 ^2 k, T. n
- ~+ O/ |" ?, D& Z7 n
Code:
1 e! f4 A F+ {9 |4 x+ Z- Zif( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel )6 a: H/ Q& h1 U6 J# X
{! B2 ^( y6 S) q; ~' ~. e* H7 z. ~( q7 R4 K% K
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 );
* X( p8 s" y* X4 {/ ^- E }this
" W" Y: D4 [1 w7 z* X7 s% C( e0 i, M
Code:6 |0 \) F3 K3 s& S) l. S
#ifdef __QUGET_SWAP_FIX
r0 |, i8 {5 M3 }$ K/ o/ ~7 w/ f if( pPlayer->GetHitPoint() > pPlayer->GetMaxHitPoint() )
# A8 c/ N1 w/ J& W5 i7 v5 ^ pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());
3 }) W% v( G8 i) `) w$ X) ?, S. g4 ^* _* A3 O+ O$ W" ?" n
if( pPlayer->GetManaPoint() > pPlayer->GetMaxManaPoint() )
$ |3 j! ~0 M. C+ O \- E pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );! D! H$ F0 T, W; ]- k2 Q
( R, o6 t$ n; V C3 d
if( pPlayer->GetFatiguePoint() > pPlayer->GetMaxFatiguePoint() )
6 q" r( S- N6 S' F pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );, e- E) V3 H8 E3 c' M3 S _
" a; s1 C" L* Q#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver
0 Y2 C3 p# Q7 y' X7 z
4 g3 O; u% N% M) L0 p3 }2 X% x5 I. }
|
|