|
|
Hi I fixed the swap bug a long time ago it got tested on my server and it worked
9 j) n2 x+ `+ Q& I. V0 ?I posted this because someone kinda posted a youtube thingy about it :O.9 h4 v4 e* `, f
0 U; D1 k5 Z; x' K6 U
Find this in DPSrv.cpp @ worldserver
' [3 Y9 T7 E/ t+ C7 Z# p* {# }& G; Q P$ h: t( O
Code:
1 M6 }+ V) m D1 r& Kvoid CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize )
l1 u" w8 T3 L! k3 @; e. h7 |3 H{# r# {( W/ O! l6 i! a3 N3 U
DWORD nId;4 l e8 {$ a6 j5 o1 k4 c2 C2 I
int nPart;
" k: g! Z, D* ~+ C6 n4 Q$ R% u& q2 v$ H) ]2 n* W/ t- @
ar >> nId;
: u! @0 j: S& l ar >> nPart;
1 f! C6 i& \# ?" F/ w
4 \; ~, v( h! H' L% f; V if( nPart >= MAX_HUMAN_PARTS ) : X0 F' L; S \) L; c- O. H3 @$ Y
return;: K' Y. T+ v6 |- \ R8 l
% e. V. J$ K9 H/ ?+ m2 c
CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it
7 ?& P* s$ R8 X
# e- a6 ]' h6 `4 S" D
. s) ^" G( ~# P. q! n4 s" | Y0 PCode:% p% E! b5 o4 q L
#ifdef __QUGET_SWAP_FIX
6 s# j e6 a7 q+ B8 x: V, h7 \2 P% G5 z2 E# P
if( pUser->GetHitPoint() > pUser->GetMaxHitPoint() )* ~6 ]. z; Z p
pUser->SetHitPoint( pUser->GetMaxHitPoint());
5 i" E6 E) i7 |1 e+ L) Z
9 Q/ _2 a1 B7 x- ~! t if( pUser->GetManaPoint() > pUser->GetMaxManaPoint() )/ u( L3 O7 G" M( `: D& U8 i
pUser->SetManaPoint( pUser->GetMaxManaPoint() );
6 ]5 W- ?4 }8 \* }1 c! \
% f" j {! S5 Y7 ^) y5 I& J if( pUser->GetFatiguePoint() > pUser->GetMaxFatiguePoint() )
8 o( T; d7 T' _% V pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );; p. ^7 |2 Z' q" P j
9 D) t9 n" Z$ c/ |& k6 [, N6 i6 u#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp0 k, ?" r4 F8 \2 P0 k" \! ]
and add under4 {+ w' W: n( `
' I/ X, X) ~5 H8 N0 X: ACode:+ K% Z* C. a9 j& f2 k2 `$ Z1 j/ \
if( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel )0 v: y g8 ^7 \+ `
{
8 I) I, W1 J9 [$ R& _ 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 );
: x; a* F. G: T2 S5 b9 u. q c }this( X) y" w" K2 e5 j& {: M
]7 X% m3 s& r' j
Code:" Z( D% c1 T2 I
#ifdef __QUGET_SWAP_FIX: t7 E" v7 j; q8 k+ I( x
if( pPlayer->GetHitPoint() > pPlayer->GetMaxHitPoint() )& \6 k1 g( Q4 F' ] s& R! J
pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());+ j& a: t; [4 y5 {
5 z) Q7 u2 {9 ?
if( pPlayer->GetManaPoint() > pPlayer->GetMaxManaPoint() )
4 l- r5 }9 ]8 T8 h! w pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );. X8 l ~& \0 i( g
. h; z3 Y4 c: U! I. X( Q9 ^ if( pPlayer->GetFatiguePoint() > pPlayer->GetMaxFatiguePoint() )
2 |! `2 x% t- u- \3 p7 L pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );
3 r- n( F/ ?7 ^5 G2 }7 I0 J
7 g. g9 @$ e% t" y" @ C8 v; d#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver 0 \3 T; Q" S" t( v5 X" `. L$ D
- }9 W7 G) y, F+ p4 x) I3 X
3 C7 \4 W# _; K4 v& a |
|