|
|
Hi I fixed the swap bug a long time ago it got tested on my server and it worked
. C# J' D# X, sI posted this because someone kinda posted a youtube thingy about it :O.' d P' E) |" Y, B: d* f6 d I" g
, Y' G' v1 O3 \/ P$ m6 E( t
Find this in DPSrv.cpp @ worldserver
# e4 P- W1 \6 q2 |
# Q$ P, [8 k8 F/ BCode:
% A) X2 w+ t: e- I2 Y4 n& ovoid CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize ), ^0 X! |# J) p& M$ _
{
^) n; c' O. z4 B3 S6 A) b( F DWORD nId;# T9 _' j5 p% s* Q8 b( f. `
int nPart;9 v# W, [' I7 b2 {4 }
! |* s6 k: p4 G6 Q8 }8 S* h
ar >> nId;
+ J# Y; a1 p h; _ ar >> nPart; 0 @8 U+ \/ V8 ~' m+ a
" } m) @ Q2 h9 b) L/ s9 w if( nPart >= MAX_HUMAN_PARTS ) : p# H) z5 R2 B L4 j2 A
return;5 Q4 Q: m. ^# h2 a: r: `9 C1 h& Z
# Y4 q1 ^; ~+ J3 A8 @4 y CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it+ o5 I) s; c# @( f: F. j8 o
" H7 R0 Z V4 W3 t6 ^3 w2 r* ?) D6 S' l0 d
Code:8 \8 t! C: d7 C
#ifdef __QUGET_SWAP_FIX; i4 i( i3 f/ ?3 S- D' M9 h
5 J& e2 Z# p* [4 c4 Q
if( pUser->GetHitPoint() > pUser->GetMaxHitPoint() )
, g1 ^0 O `$ B) u pUser->SetHitPoint( pUser->GetMaxHitPoint());/ N$ U& h) @+ M1 u
' S8 C- V- y! x6 v6 Z+ c4 Z0 k; j8 _
if( pUser->GetManaPoint() > pUser->GetMaxManaPoint() )
5 l: ?" N6 E& T3 O# R) ~1 r2 e; u pUser->SetManaPoint( pUser->GetMaxManaPoint() );
: X; V* f; ~' ~& A4 G1 S% e: z+ C
7 B( |' U& \/ H; h4 L if( pUser->GetFatiguePoint() > pUser->GetMaxFatiguePoint() )
( n; c x9 A* W* C# x pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );
( V# [& W* w% P( T9 {4 r' B s* i! {; P# z$ O
#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp
. n) W2 Q8 ~1 W: E' Yand add under& I0 O }/ b8 B
, a6 P q$ K+ ^+ |Code:
. h U1 ~0 B+ d0 T8 Aif( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel )2 p" _' a R3 J9 `3 a5 B
{/ R. U& P }: C- Y) ?1 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 );
1 C* U( T- Q% _ }this, u7 I* a S; [' f" m i
4 M$ u/ R) v/ A5 H+ w0 y# k
Code:/ a( U: v6 _" z. U# e* z
#ifdef __QUGET_SWAP_FIX
; v1 W: t0 N6 A! R& Z! G7 _ if( pPlayer->GetHitPoint() > pPlayer->GetMaxHitPoint() )$ m; n% {* p" V: b$ g. y. U
pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());% n8 e. G2 i% h
: a3 \+ Q( q0 A o9 v
if( pPlayer->GetManaPoint() > pPlayer->GetMaxManaPoint() )$ _, `( b' {( y# o6 |5 v$ D
pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );% }5 F+ ]1 B0 o& ?1 |( A8 o1 ~
1 }- l3 s( U+ ` if( pPlayer->GetFatiguePoint() > pPlayer->GetMaxFatiguePoint() )% ]% g. j' d. v0 v
pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );" R/ s5 |' [' [
; H1 \) H* ?3 q/ o9 H2 I/ h( m#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver
' y& w2 K) p) J6 D- M* O; |/ t) b; V: |' \; Z4 P8 W
& A6 ?3 G$ J: z8 S7 a' e2 X
|
|