|
|
Hi I fixed the swap bug a long time ago it got tested on my server and it worked ! M: D2 B3 V: `* w2 [
I posted this because someone kinda posted a youtube thingy about it :O.
) f# d: u! r. G# D8 u0 S9 L4 r6 r9 [# \5 B5 o$ H
Find this in DPSrv.cpp @ worldserver
7 O1 s. ?9 a3 M; B3 ~
# Q/ i& _% g# g6 @: o+ ?5 C1 @Code:
, X* D0 t" m+ Y1 x- bvoid CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize )
8 J; a' o$ V* V1 w, K/ l1 [' J# g9 L{
% U1 E8 X* A2 n+ V DWORD nId;
4 Z [" Z8 R# Z V) J+ f+ V int nPart;- \$ R1 a2 P& R
! ^0 b2 x5 Z$ L; p+ ?
ar >> nId;0 \/ X g5 R7 x7 I8 i; r
ar >> nPart; 6 [# l) ~' X- Q, l+ c( A: u0 E
: x! @& r4 ^! W! C; C2 Y
if( nPart >= MAX_HUMAN_PARTS )
# d: O( j; \% F+ G8 q return;
. R) v* H6 Y7 m& x+ Q( C) ~0 u& \! x
CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it# Y; [" v! U6 D7 l% D$ @
3 a8 I' G" E8 m s- L: V+ c7 Z7 O
; J7 P& ^, B, H! _5 t/ t
Code:2 |* M3 Z5 ~( \1 R8 f( D
#ifdef __QUGET_SWAP_FIX
$ R5 W- f7 l8 j. }8 n B9 o9 _( r+ @' a2 Z
if( pUser->GetHitPoint() > pUser->GetMaxHitPoint() )
1 e- J% [4 ]9 r1 y6 @: A1 s) e pUser->SetHitPoint( pUser->GetMaxHitPoint());- O4 N4 n- ?/ y
% V& ?* ]. c- d( K
if( pUser->GetManaPoint() > pUser->GetMaxManaPoint() )
5 j1 F2 W% i( ?; b2 \% `" J pUser->SetManaPoint( pUser->GetMaxManaPoint() );
/ Q( r* B( }! E9 K; l: b6 b% x G9 J
if( pUser->GetFatiguePoint() > pUser->GetMaxFatiguePoint() )( b5 D' D& x& u L- V' o0 q4 k' V
pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );* w" x! m6 x7 I% i
% M( F+ Z) I% v, u9 \
#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp
7 b5 E$ t; R3 b4 T- T+ Vand add under
& d5 Z W2 y! d5 n v* Q
: [" h C- _. A9 E+ T; t: fCode:
' g( T/ F' \) g' Y- r) T- _$ B1 Sif( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel )
6 D- K# O0 H2 F4 m) ?# Q6 Y {
# K) U8 n7 I }% A9 o 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 ); a7 x" Q9 ]+ N' S* d/ `% `
}this; C2 U2 d8 @, h* S1 L
; _8 D6 i% b: Q' p6 |Code:1 r9 w& _/ y: C ?1 @/ w* `. q9 C
#ifdef __QUGET_SWAP_FIX/ w; c& j5 P. {* P) n' W! g9 I
if( pPlayer->GetHitPoint() > pPlayer->GetMaxHitPoint() )0 o8 [$ P3 g. E6 {; ~
pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint()); U% e) `/ G0 O
5 ~7 j1 M4 }% _( Z if( pPlayer->GetManaPoint() > pPlayer->GetMaxManaPoint() )+ U o. c: |8 z3 o7 x
pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );% u; `6 c$ A# q! W
+ _# y, d- H3 O. X# n. v# w& J8 n if( pPlayer->GetFatiguePoint() > pPlayer->GetMaxFatiguePoint() )8 `- ~/ p7 v( l! j% V
pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );
; o% |7 h! ?% }0 P# h+ t
6 V5 y; `" D) z+ Z" H" o#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver
* Z4 H. Q/ U }1 A8 }2 `: N2 U3 G" R9 g. ^. O# h) ^7 K: p' j
0 F/ v+ ]$ R {/ }: f; }. F3 C
|
|