|
|
Hi I fixed the swap bug a long time ago it got tested on my server and it worked
; q2 Q0 _. m$ k& HI posted this because someone kinda posted a youtube thingy about it :O.2 z/ ]- D5 B; x$ @8 o( f: Y
& ]9 W3 ^# K& K. W( n
Find this in DPSrv.cpp @ worldserver& m! ~! w) T9 A/ M
0 D! U: s1 W3 a- I RCode:! ?# D% j3 i+ \# ~) T
void CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize )
6 D( z7 d% A D' x* O" c% f: Q, p{
: V* ~$ F e0 S% s( G/ h DWORD nId;# C! U+ r- ^! W; `; |$ ]: }' J
int nPart;. ?( j, L# V6 N8 L% I! B+ V
' v0 E, Q8 d) S: K1 r2 I ar >> nId;
I f' n9 ~/ o& a, E3 B ar >> nPart; 8 h; m- n4 Q+ L0 A+ x3 d
, z& Q6 H1 U/ V; _% M- U
if( nPart >= MAX_HUMAN_PARTS ) + ~3 ^: \, W, ~
return; k6 h$ w" k z$ m
+ M- o7 ]/ [6 B* R# V
CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it
5 C/ `+ m1 a) W( V0 g _1 o# p5 b3 V9 h) j. U
, ^7 F! @* ^( H
Code:% | n* {& r- d" u( S1 I
#ifdef __QUGET_SWAP_FIX
3 v, q* L8 @4 k
, n5 j) \- D* e8 C. F9 m if( pUser->GetHitPoint() > pUser->GetMaxHitPoint() )
* a W L" u: Q5 p" Y pUser->SetHitPoint( pUser->GetMaxHitPoint());
- Y3 o& U+ ]( B- |: ~ D7 G7 p; {- x* E
if( pUser->GetManaPoint() > pUser->GetMaxManaPoint() )
$ _ a, V. X l/ ^8 ?- T `; Q* a$ a pUser->SetManaPoint( pUser->GetMaxManaPoint() );
( Q8 ~0 r$ C# O7 g3 u
1 s3 _, S4 B/ H2 O- F if( pUser->GetFatiguePoint() > pUser->GetMaxFatiguePoint() )% h) c8 D H# r7 y" t% N8 o6 H7 b
pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );) n% V+ m" V* o: d/ w" y; m' `
1 G+ _% O/ `4 g% p
#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp6 A |. W* B& k8 f9 n+ m# @
and add under
- N8 f: e) x! O; h
/ T& b5 r3 A5 pCode:
0 ^; W% i& z- N9 f1 ]" Hif( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel )+ t! Z) v' e h/ [8 n: z8 b7 m
{
! s% P0 |' F6 t O6 x3 c' } 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 );3 w5 C. \0 i0 z3 d6 I
}this$ V% s! \( k- p1 m5 q
5 W/ S. f# n) A
Code:6 t4 m x! N2 x0 E
#ifdef __QUGET_SWAP_FIX
- f$ [% ?8 i8 }3 \5 y l if( pPlayer->GetHitPoint() > pPlayer->GetMaxHitPoint() )
, A* ?: c" r! N T pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());) B, ~ o. s @4 V5 _' n) s
1 O0 Z; J. K# j$ O) U; I8 v/ Q
if( pPlayer->GetManaPoint() > pPlayer->GetMaxManaPoint() ). g3 G7 x# \8 @; M P. r" W- Z
pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );
$ z/ d3 W% W4 o# @4 c/ u- o, B7 d$ p( ^1 {. E* V" d! A7 h# ~
if( pPlayer->GetFatiguePoint() > pPlayer->GetMaxFatiguePoint() )) z4 X$ j% K8 A- W6 L9 v
pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );' N- E3 I b8 r; }
# v, @) K+ u8 l6 H0 S u
#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver ! C8 \8 l: D, O9 S% `- e$ c1 l
3 W9 s/ Q! s }* H! }- y
4 U8 Z, p7 j# J7 y" b, h |
|