|
|
Hi I fixed the swap bug a long time ago it got tested on my server and it worked ) d1 {0 {9 U, y7 [% }- t' |
I posted this because someone kinda posted a youtube thingy about it :O.7 x6 b4 X5 M" E2 a# t! w/ e
/ a4 t- c5 H& X* o* u! l7 Q5 p( Q
Find this in DPSrv.cpp @ worldserver
3 B U" P l5 C' i) {2 W7 p3 _/ d7 f3 k F: d1 v
Code:7 Y- c' d6 H @/ ?
void CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize )
0 G7 J6 K% V$ H% z- v1 W{1 D5 V* `" o: V2 {
DWORD nId;
* H* d# n* P2 `/ b# Q6 R, E int nPart;5 A+ X8 a" S3 Y6 M
7 L; u" m+ e/ d C2 X+ M9 `
ar >> nId;
, L/ A* ]: r7 x' d( K ar >> nPart;
1 r$ c( I& O; S1 o# q/ ], `& K
* M/ o8 f4 h% a9 R- k5 p if( nPart >= MAX_HUMAN_PARTS ) ; f6 P% `# N# O5 E* e8 |4 f
return;- s8 M6 x; f- a5 P* A$ k
, ~4 c# D: y4 z/ u) n& b- D3 X2 g CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it
7 g/ A* I2 Q1 Q' }- Y5 ]0 N2 L
7 V, _ p# \" {# H5 q, c
9 b# K# X- f6 C) f1 D0 eCode:) R, A) f! w, f2 G/ s4 X* q) V! S
#ifdef __QUGET_SWAP_FIX
) u. }8 ]7 b- y }7 o$ J4 Q- C: Y( s
if( pUser->GetHitPoint() > pUser->GetMaxHitPoint() ), T/ L$ Q( I8 U( T" [: F
pUser->SetHitPoint( pUser->GetMaxHitPoint());2 Q% z5 ^3 l! U! G: ~' D
! d4 F. ]7 X- @! N; g1 ^ if( pUser->GetManaPoint() > pUser->GetMaxManaPoint() )
3 u5 ]) W2 _# H I6 C9 u a- M2 q pUser->SetManaPoint( pUser->GetMaxManaPoint() );
# m$ x/ ?: G6 o
~0 ]1 a5 W8 R; ^% X if( pUser->GetFatiguePoint() > pUser->GetMaxFatiguePoint() )- I3 l; P# s% B, R6 @7 b% v
pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );# }+ O! A# M# K9 |/ P
8 Z( Z! |' l! X" o1 N3 F5 @#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp
) d7 w" U% G6 Pand add under- G8 f. s( k4 j6 t9 X! G w
+ b: K. x9 P; KCode:
+ H$ X, v# [ M7 R& \if( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel )
. H* K2 @6 Y; W- ~( y. Y v% h {) W' I! Y5 u8 L& D4 f" I
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 );# H! m, }9 L( H8 J
}this
. o! p- m' t( ~ w4 {7 _* h; C! [1 G$ [5 ~0 o
Code:& i4 }$ `& f3 J+ C7 B0 s1 C0 p
#ifdef __QUGET_SWAP_FIX* f0 Q0 }6 |$ k( a
if( pPlayer->GetHitPoint() > pPlayer->GetMaxHitPoint() )- i+ V4 A' o" ~+ G4 u
pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());' W# L# J5 j7 f+ q6 G. q8 ^9 w
8 v9 C$ J$ ^5 m; k
if( pPlayer->GetManaPoint() > pPlayer->GetMaxManaPoint() )" P9 X k. m! J& @+ F) R. M& B
pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );
% {% s2 U% Z7 N+ E4 k3 F
4 ?/ N, W' s' F1 s if( pPlayer->GetFatiguePoint() > pPlayer->GetMaxFatiguePoint() )( s! Z9 E; l0 r, m3 \1 X4 O3 T
pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );
* t; ?, f" l k+ |2 n# m& u( L4 b) A- q9 @2 b, q
#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver ) W3 x y E; Q$ E5 E! v* j% ]
9 h- [! H z7 {$ t# Y5 ?% \
, W6 D N4 ]/ d4 {4 [5 f |
|