|
|
Hi I fixed the swap bug a long time ago it got tested on my server and it worked
9 ^, V9 C5 ]+ P) P! a5 S" |! KI posted this because someone kinda posted a youtube thingy about it :O.# Q5 o3 u1 d/ c v% S: e
8 d" o- G5 Y9 \* E* b
Find this in DPSrv.cpp @ worldserver
: {, s' @) a( Z' Z, G
/ t- m' T. a! s& H2 NCode:3 w/ k( M3 n4 C/ ^- G4 P2 j
void CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize )
8 Z* ^% Q6 |; }0 h# k# J{
+ c) h; z5 L+ ]" g: U6 L DWORD nId;
6 N4 Q+ M; S# D/ I5 _0 z! T int nPart;# z; [6 I8 N$ b- H
! Y7 U y+ S2 G1 Z5 I ar >> nId;1 V3 h: ?& w* a9 ]# b$ L8 K2 y2 C
ar >> nPart;
! }: ^& F0 |+ j0 W, ~0 _9 E , [& } R9 ]* k8 A9 N- G
if( nPart >= MAX_HUMAN_PARTS )
% C: e a: @8 Q return;
( K# z. |/ u: g$ ^# d" q L8 n, l# X8 p4 p1 m
CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it
2 Y5 _& k3 i a( S; ~0 u( r7 c- e" Q' q. W. y- t, V" L9 k
9 c: F. C8 l+ n5 F
Code:
* f$ F9 p/ M! }# C( d#ifdef __QUGET_SWAP_FIX
) [1 J* t9 S7 \6 q: H
% P% y1 r8 x4 }( R$ y% n% E if( pUser->GetHitPoint() > pUser->GetMaxHitPoint() )% k! N7 k. G0 O; `
pUser->SetHitPoint( pUser->GetMaxHitPoint());
8 M' M0 y& G. S3 y. @2 O- y3 I9 E9 r6 G! M- l; e# D' G, A& z. s
if( pUser->GetManaPoint() > pUser->GetMaxManaPoint() )! S. F& o8 P" L* |/ s
pUser->SetManaPoint( pUser->GetMaxManaPoint() );* S# r8 U# r7 ~6 v, f4 h
. V7 h/ X% a4 P( p$ }6 t1 @ if( pUser->GetFatiguePoint() > pUser->GetMaxFatiguePoint() )
0 {" m8 i0 N3 k+ R2 a pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );6 [% W) M( ^1 A' M* |
2 Z9 U" X. ~# J6 W7 T
#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp1 A4 F' D& |* J0 m+ f2 h2 A
and add under
; H. `% [2 \: g2 o2 V
5 Z1 z# M( o/ c% n2 ~Code:2 O/ n! g( u6 \+ `
if( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel )
/ H3 H" `( v, W! O; ~2 b# T4 ~ {
) B5 `) `/ D+ R3 D: 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 );
) e0 N3 f& D2 z( V# y; L7 P$ K }this+ o6 ]4 q7 {/ `, h
( K' f z; S* x* o- bCode:
" [0 H6 E" B' f( G8 `0 U#ifdef __QUGET_SWAP_FIX
3 j3 }+ O* z& ~ if( pPlayer->GetHitPoint() > pPlayer->GetMaxHitPoint() )
( ?* w, p. P+ p8 L6 d2 ]/ C4 H# A pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());! A+ O" K# F# M
( X6 {. J+ p P4 |0 x( `
if( pPlayer->GetManaPoint() > pPlayer->GetMaxManaPoint() )6 E$ O7 S. o( a
pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );9 r- E( m- ~9 V8 [
2 a7 b$ o/ e. f j, z% I if( pPlayer->GetFatiguePoint() > pPlayer->GetMaxFatiguePoint() )
; c8 B. [' f5 g# o pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );
; Y' O h) [6 U, I/ V: a( k5 f
& d" E" a+ C, U# w7 [#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver
: ~& E; }( t: L9 `& c+ N; V! [) X# V f) s3 M/ N7 g9 ]! U$ ]9 J
$ Y$ l3 A: E2 }9 N$ a: c' X |
|