|
|
Hi I fixed the swap bug a long time ago it got tested on my server and it worked , V8 ?. w: S* P3 {) n
I posted this because someone kinda posted a youtube thingy about it :O.
# E) w, b( C2 V n% {0 K2 T4 U- G& A, O. ^7 l8 s S6 ?
Find this in DPSrv.cpp @ worldserver; U: T2 G' {+ W- A5 V" y
- Q ~0 S% z3 f7 j: w) kCode:) a% Q/ z/ N0 H1 Z
void CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize )) X: P. \- ^/ j4 S% A- ?
{( [! S: u: a: |& L! A- e( m
DWORD nId;
8 @2 ]9 D8 \/ Q) q- d9 I9 q int nPart;) V( _' ]. z( q$ v- q
- g" }' ?0 H6 K/ Q; X- I
ar >> nId;3 D0 q8 Q$ a% A+ ~% }7 w' z$ y
ar >> nPart;
. p1 u$ S# {. L6 N5 b # j m: D- ~( ] U2 L: o" I
if( nPart >= MAX_HUMAN_PARTS ) ( `' k! c6 a# [' k3 P% x
return;
, L1 ]! Y0 l$ T1 D3 G
2 z p+ w- y5 M9 e$ @0 k: P$ ]& O) { CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it$ U' E( O6 Y$ R' X7 h" t
F# u9 S2 F# A, o3 S1 P4 x
L: V( u& d, XCode:, e+ s$ M2 r7 A/ N
#ifdef __QUGET_SWAP_FIX
: ?( d% ]! p. C F/ f7 j
3 H! x7 j; y4 H+ p' [+ }0 ^ if( pUser->GetHitPoint() > pUser->GetMaxHitPoint() )
1 V6 ?/ ?" b ?& [ pUser->SetHitPoint( pUser->GetMaxHitPoint());
+ E; u) @4 S0 B/ g9 n+ y+ z" ]$ C/ n/ o& P
if( pUser->GetManaPoint() > pUser->GetMaxManaPoint() )
8 A* l& R, u6 Z, P7 k8 [6 O$ | pUser->SetManaPoint( pUser->GetMaxManaPoint() );5 w9 G+ K$ t0 z/ m9 K- S9 P7 b n8 |
/ U8 D# n0 r5 w7 o7 C
if( pUser->GetFatiguePoint() > pUser->GetMaxFatiguePoint() )
a; p J/ m ^: r& G& v; Z1 D' x pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );: E+ k- V$ y: S- D3 u
' U, v- a, O8 w0 v0 d
#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp
( \- g Q' b2 F/ Y1 Y( Hand add under
$ \- d8 L% J! F- H8 s A; a9 H" m" q" T
Code:
- {9 B7 S, v' e, Cif( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel )" y8 M) i1 S3 |9 ]
{4 s4 U/ t. O1 b+ |
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 Q( j2 m; c8 y5 P5 z }this1 \- k' R! x/ S% U o+ b1 ?* d
! }' ^7 X; }; @& W
Code:& ^' k1 z1 c# |7 [/ U7 \
#ifdef __QUGET_SWAP_FIX4 v) v+ _$ N) c: }2 t* D
if( pPlayer->GetHitPoint() > pPlayer->GetMaxHitPoint() )! O+ @- `% Y3 x1 S! J* C
pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());
$ p9 E# }0 E% X% W3 k
- X9 Y2 V' ]9 r. e+ e6 C if( pPlayer->GetManaPoint() > pPlayer->GetMaxManaPoint() )
2 y! _8 x q7 L" L0 i, f$ r x pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );
& `7 P/ T8 d* y6 U; d2 G5 R/ e
if( pPlayer->GetFatiguePoint() > pPlayer->GetMaxFatiguePoint() )
" q! k4 E( t) F pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );
8 x V. ]; g0 _* l$ P
* o- C5 |& t4 E" k#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver
* F. w( v! w5 P& y# g/ ^3 g$ c
; W& d+ n0 {7 H+ @, h: \2 }- t/ ?
6 g# D) R4 B5 |7 n) C |
|