|
|
Hi I fixed the swap bug a long time ago it got tested on my server and it worked
+ ^6 c& A1 ? n$ sI posted this because someone kinda posted a youtube thingy about it :O." c# L6 R* p b: b" H" F
5 t: m9 L! w/ }* B* u* |3 M
Find this in DPSrv.cpp @ worldserver
5 U2 T3 p F4 S2 \ ?. ^
3 ?3 o& F9 y" r) {Code:; r& I8 M- ]; `
void CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize )
3 Z5 T# }' d2 b8 J{# U4 z) J5 \% k6 j
DWORD nId;
9 Z" V: U$ i$ J+ ^3 z int nPart;
8 z" w9 w& F w; B2 h2 U6 q0 G) V$ h3 ]: X3 N3 |5 w: n
ar >> nId;
. ?. X* k; _: |9 n" c: q ar >> nPart; - d& B [0 C! C. R
1 X j: K1 P. j0 d if( nPart >= MAX_HUMAN_PARTS )
- H" e) g* _5 A5 m' G f return;
( n* n- K& n. Y& L* j+ Y F; u% e4 {( i& e
CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it! P( ^) V8 J6 k3 `; p
% c: r% W4 P r$ F% L( }
* N d: T* I. \ F2 E: WCode:0 ^* M {) o- E, T
#ifdef __QUGET_SWAP_FIX/ P1 s$ a( Z% z, i
, a9 j+ {- E* X& J6 w# X
if( pUser->GetHitPoint() > pUser->GetMaxHitPoint() )
( {- B1 R# t, o5 a" S" o0 a! a3 K pUser->SetHitPoint( pUser->GetMaxHitPoint());2 w' x' H `, G% {
& g! l$ U& O) @+ n- z, ? if( pUser->GetManaPoint() > pUser->GetMaxManaPoint() )
% z) w$ J/ c$ G* S# v* G* p pUser->SetManaPoint( pUser->GetMaxManaPoint() );. C6 D, V, h4 r$ x; _' ~
/ c+ t5 l8 d( k
if( pUser->GetFatiguePoint() > pUser->GetMaxFatiguePoint() )* h `3 Q7 N' M- {; A$ Q$ I$ B
pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );; J+ l# o; P4 s; q: T, S
0 y+ j4 ?, P2 f: t o. q, {8 @#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp( |0 ~9 `) t7 Y9 s# z
and add under
! I9 R" p! W+ Y5 c6 I V7 p& m, S
5 @% x' k E. O% dCode:
9 W) \% U1 N2 A1 j) x$ Zif( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel )/ t" d8 U8 L4 g
{
- e/ j9 q8 R8 v( M: l+ n) n( M; {' 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 );& P5 T, ] P% n2 \' A9 f# u5 }
}this
; _- W0 U9 F; q8 a) }' V& H' W
. Y3 @0 s: t; m; SCode:4 l+ C# `4 P& f8 K) t7 @# q/ u: T( n3 {
#ifdef __QUGET_SWAP_FIX
1 ~( h' @( ?" p% S if( pPlayer->GetHitPoint() > pPlayer->GetMaxHitPoint() )
+ |" I* O8 Z6 v) z3 {# f9 ? pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());1 \! E+ }& D" g1 m, o" F
. D% V! ^9 q/ x8 e( _- D0 v5 U if( pPlayer->GetManaPoint() > pPlayer->GetMaxManaPoint() )& \3 T' I/ X' S1 x6 }
pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );
: w9 H6 o7 U5 J+ B; t: S. x/ Q# Z0 ^% W: ?; } W
if( pPlayer->GetFatiguePoint() > pPlayer->GetMaxFatiguePoint() )
1 b# h2 ~9 S) M8 y) V pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );
9 ~! r$ b; X' x/ y& a
( B6 |" [3 A% c" ^; X#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver 1 {, `- l; D9 y# M
! V+ M$ ~) k3 Z8 n) \0 u3 {
. k( d6 z! ^/ ~% y |
|