|
|
Hi I fixed the swap bug a long time ago it got tested on my server and it worked
0 W) t) w. F6 U- D0 q7 I+ ?/ F: qI posted this because someone kinda posted a youtube thingy about it :O.
3 E1 [( `. U; e) N! o4 e) v/ t, ^4 [ ^5 G7 q8 t- y, R8 _
Find this in DPSrv.cpp @ worldserver
1 r& r/ b/ [. f' C7 S
9 N" ^ [, H% m7 J ^4 ^8 WCode:
8 h% A0 l6 j3 }) s2 V2 ivoid CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize )6 A& [! v7 H" U9 M! O$ \4 U# D
{
6 f) K9 t2 W3 Q1 { DWORD nId;, y2 X/ D# [: Z0 H$ ], I
int nPart;* ~- n) M) ^2 `: g
) Z P9 ]' y, u8 e ar >> nId;% \9 x% C: q* Z6 |8 l
ar >> nPart; 8 j5 b; X# i2 T, [* l% p9 J
! E% d4 G( H. g+ e1 P
if( nPart >= MAX_HUMAN_PARTS ) 7 Z w- V+ a7 w& i% u
return;8 _8 _+ Q( `" [' l
, D8 V/ X3 R N8 }* ]. C
CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it
5 s. |+ C5 A- o O& \1 r: R( w0 c8 |1 m6 x* D( u
3 d# X; u' k( dCode:
7 P- Y* Q' \. T0 |( p4 }; i#ifdef __QUGET_SWAP_FIX* z( {& `1 O) }. O c4 H
$ u& Y$ V+ [' p$ \1 x5 W if( pUser->GetHitPoint() > pUser->GetMaxHitPoint() )
* f+ M! _4 e0 F0 c6 M; }/ B% i, `6 R pUser->SetHitPoint( pUser->GetMaxHitPoint());
2 ~2 [/ h3 {2 G! d0 L- m
3 @ A! O: M2 H. W7 U( ]2 Z1 ^/ S2 P if( pUser->GetManaPoint() > pUser->GetMaxManaPoint() )
2 a" x/ w7 R- K; v1 K5 a- G ]3 [ pUser->SetManaPoint( pUser->GetMaxManaPoint() );
( {. G0 d6 D9 x0 | L- K0 T
, a* z7 [# r# i8 q0 O if( pUser->GetFatiguePoint() > pUser->GetMaxFatiguePoint() ); H# M, E4 o2 {4 p2 K
pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );
6 x+ ^/ z& o# O) U8 P/ c" @1 [! e& I' r
#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp
! w. d4 B# u" O# U. F% [. @+ ]and add under$ q( v4 T2 V7 j/ d4 A
" f/ Q1 |2 p/ ~1 c/ j' [Code:
& @; W8 ?$ A/ R% H; \: Gif( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel )' K) J) p' f& u
{
`4 Y! D1 J* B1 D ^ 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 );
0 p2 i7 s* y: t4 | }this
/ s# `+ L2 \& r
4 I; l- d0 b. h5 RCode:
+ z2 a% B; ^( G#ifdef __QUGET_SWAP_FIX( Z/ `' g( p t& S" ]% J" a; o% A
if( pPlayer->GetHitPoint() > pPlayer->GetMaxHitPoint() )+ Q9 c, ]- g. E; [
pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());
H: }1 \1 \6 R6 V7 A# k7 C/ [
! a0 E& M; m9 s/ x5 M; ~# C* Y if( pPlayer->GetManaPoint() > pPlayer->GetMaxManaPoint() )
( M+ I0 |3 L) d |1 \ pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );
6 F$ u5 P; U* p. r: h8 _: y5 @. _0 K: C8 P% M' T/ ]
if( pPlayer->GetFatiguePoint() > pPlayer->GetMaxFatiguePoint() )
: j* X4 n' q5 x- N# l2 [ pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );$ t p- ]. ~: h; C7 ^ v% @; {
2 F, p3 I d! T* V
#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver
: v8 i2 w3 _; j0 m
- b \$ j5 f3 W0 U5 F4 |4 m5 B3 Z9 {4 }' P9 R6 C' ~& S
|
|