|
|
Hi I fixed the swap bug a long time ago it got tested on my server and it worked
9 q r3 e/ @( \; gI posted this because someone kinda posted a youtube thingy about it :O.6 J' y1 P, W* \! j5 d( W! g* k
- B. R7 h! t8 i. X9 z0 w. j7 s4 G
Find this in DPSrv.cpp @ worldserver
/ W" d. C% h% ?: q7 L( |
" w9 F: |) D3 v# m5 p8 pCode:
1 Z. `( j, I! i# r; |3 m* D7 u7 bvoid CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize )4 K6 p# B( @# S+ m$ w5 A
{
# S- @! f4 s- B- v4 H) j& C DWORD nId;& [. K7 z1 _8 E8 d2 R' ?
int nPart;
3 ], E( O8 d" B0 |! J
+ L- o6 N* B, L2 Z9 \ ar >> nId;
+ \7 I3 }- u" }5 b" R, v8 S2 K+ Z; L ar >> nPart;
% ^" w/ x, L2 t- \ ( B( m2 y3 A+ H H- g4 v
if( nPart >= MAX_HUMAN_PARTS ) ; C3 U. o7 p+ Q3 r
return;
: n Q# n- ?; ?4 y, G8 c0 o1 x k( V3 u( ~9 Z/ I. A
CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it
; I8 M3 B0 O8 d5 u8 O+ _2 ]# T, a+ @# n' a; t$ E0 @; U
( ?% M) K: I2 x, ^% z. I+ B
Code:5 R8 M5 J/ |5 {- c- ^8 ]2 A8 p
#ifdef __QUGET_SWAP_FIX
; }5 M9 @; Y- R* ^4 S& Y8 L' x* m& a
/ [! l/ j6 ~$ b! a' G3 { if( pUser->GetHitPoint() > pUser->GetMaxHitPoint() )( r( U; O8 i$ C
pUser->SetHitPoint( pUser->GetMaxHitPoint());
. M) Z2 [1 Q. W$ R! r2 D& @7 Y) b- D9 s
if( pUser->GetManaPoint() > pUser->GetMaxManaPoint() )
+ D6 i# G( ]+ j1 b pUser->SetManaPoint( pUser->GetMaxManaPoint() ); S- {4 ?8 K! y7 ]( [ P4 _
, I' w2 _! n: z: h6 \
if( pUser->GetFatiguePoint() > pUser->GetMaxFatiguePoint() )* _1 X) l. b' R0 C, Z
pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );) @ C. e# n! }5 u3 Y
+ T4 V! ^. K# a" b9 {; _3 m#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp$ }$ T- V6 s+ h) k8 Q- s
and add under+ V+ F* n/ r0 p' d
. h! `5 j+ ]8 |, H5 uCode:( f2 s# l; O! y. h) E& \
if( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel )
6 C5 J- R' R4 h8 d# c1 u4 M* f {
; G' a2 L8 P1 e3 M6 Y- D 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 );
# p+ g6 `5 N8 B" s) |$ r- X }this- s$ I! l9 y& q }( Y& ?& T( [, s/ o
% p+ _: l) Y# [2 K" g2 a- e
Code:& q' [: @2 g" i
#ifdef __QUGET_SWAP_FIX+ t0 `/ A! r3 G( @! Q
if( pPlayer->GetHitPoint() > pPlayer->GetMaxHitPoint() )
" `9 K% ]) u$ {/ V) I+ w7 a. B pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());
1 N3 I! K1 D3 K& @! T8 R3 h" `1 d2 |8 b9 e$ A
9 T! v" S7 H% c if( pPlayer->GetManaPoint() > pPlayer->GetMaxManaPoint() )
9 d# P) y2 w r* n8 d! G: t pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );- g# m0 \5 j9 o6 x7 D; W
% }5 A" e2 d0 d' m
if( pPlayer->GetFatiguePoint() > pPlayer->GetMaxFatiguePoint() )
9 O) ]" s' U8 y- N# u* L; @5 k3 \ pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );5 ?1 p# X& b" v# ~
$ z- c; c0 ^4 V# `3 I) ]
#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver
: v& X& ~% _* M- T- w- T1 k/ ?0 f9 @! M* a4 W$ o
( `7 j. r9 d0 D
|
|