|
|
Hi I fixed the swap bug a long time ago it got tested on my server and it worked / v( z! o; O5 r7 z
I posted this because someone kinda posted a youtube thingy about it :O.
& `/ ]7 \6 s& @8 B$ J! ?' v: T" P4 j7 m! X7 J* v
Find this in DPSrv.cpp @ worldserver5 v L& V8 ^1 y, _6 d6 t6 B
# @3 l, G t4 l7 }Code:( ^* ?0 X/ O+ E9 q* X* s! S6 [
void CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize )
. u2 X! r" c1 S! n! x. e, F{" s% x5 L/ u9 ]1 L$ d: {/ T C
DWORD nId;
2 k6 V3 |2 h+ C: L7 K& i int nPart;9 s" F$ j p" r4 W6 j5 z
6 s6 y( t+ m/ S
ar >> nId;4 s1 K1 m3 [) F; W# q' ^2 b
ar >> nPart; 3 _& R/ R+ v- Z; G* N
: E6 v6 y. ?% G8 t( N+ C
if( nPart >= MAX_HUMAN_PARTS ) * e! Z$ K" Y2 I
return;' M( C* f1 k6 I# \; q
, a9 c. N( |1 _7 X, o7 ^
CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it
& U( Y8 P( h* Z: ~# k/ V& N
* {9 S$ `* s" Y) r9 g( Y7 V! z8 X8 w; W
Code:
" o0 m3 c9 `; y8 t8 ~; ~#ifdef __QUGET_SWAP_FIX1 [) |% _$ ?( \0 y. T6 z
3 k6 X e, x+ i1 w% ^2 t if( pUser->GetHitPoint() > pUser->GetMaxHitPoint() )
5 x# t& t/ o6 ^4 W$ f pUser->SetHitPoint( pUser->GetMaxHitPoint());
" K6 R2 }$ s# i/ b9 R& M( s
2 B, r7 T: Q* ?2 {/ q) U if( pUser->GetManaPoint() > pUser->GetMaxManaPoint() ). J; C1 U$ Z, A4 v, ?
pUser->SetManaPoint( pUser->GetMaxManaPoint() );' j( o& p4 O' {- `; H: R0 v
; y% ~- i6 x0 ] if( pUser->GetFatiguePoint() > pUser->GetMaxFatiguePoint() )9 K" Q+ H% n+ s9 p j
pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );6 X1 F' P9 s+ d# x0 r
# l9 c+ [( c& u4 ]#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp
8 X& ]2 M+ d! sand add under) d: s9 I; T _5 }6 I7 X6 ~3 ?% Y& W% A* h
1 c* j: ]& L+ W: v6 ]) b# M
Code:' y3 A/ N) }# _% j4 b, b* k' X1 Y
if( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel )
Y' D, v; ?! x7 ? {& `6 `+ h/ a- f/ x% R1 Q0 m
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 );6 ^. X" ]( a/ n
}this- ^) |- R( V* \2 }5 H T
- E7 H. b* P' z1 |* j. u
Code:
0 Y4 t/ ^0 Y: G% R( e5 ]& l8 A#ifdef __QUGET_SWAP_FIX
( ~% k' ?% H- y% p# e if( pPlayer->GetHitPoint() > pPlayer->GetMaxHitPoint() )
$ H V1 O0 y7 g. d pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());
) W" c7 j; n; x1 N1 I* ^: R& I, ~# k; J* x
if( pPlayer->GetManaPoint() > pPlayer->GetMaxManaPoint() )" T0 @' i# K. f6 R/ V% [$ M" W3 M$ }
pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );) ]: Q8 O+ h ?+ L
& J+ t6 O8 O5 Y/ k1 x if( pPlayer->GetFatiguePoint() > pPlayer->GetMaxFatiguePoint() )0 v; ?4 @- o# I, }( z \
pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );
# P$ C3 }3 H1 \; X
9 W6 V3 z9 c/ }& V4 L#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver 8 c6 }7 s6 X# V) W
4 G- R, a3 P5 ~% M: ^3 {
, f, O4 B% R4 v# W |
|