|
|
Hi I fixed the swap bug a long time ago it got tested on my server and it worked , {0 l6 x% j% `1 O- a" R& X
I posted this because someone kinda posted a youtube thingy about it :O.) }' q$ f& |; X, i
* y! a8 P3 d: n2 x% ` E7 `Find this in DPSrv.cpp @ worldserver* e# \4 A ]- u; d4 ]0 c8 ^. ]
8 l5 z" Z( q5 ~9 x
Code:8 D# P+ P. G7 N! ?
void CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize )
( ]8 t4 Y' C$ `2 z{; Q) }& D R. l
DWORD nId;
/ T2 g0 \3 ~% ^0 s( Y& M int nPart;8 ]& h7 Z- @' W" z: G) V# N
: p& g, z$ T5 T0 O
ar >> nId;/ p4 M% l9 T# }: Q) B& L, G
ar >> nPart; 5 C% C8 \% t4 ?
5 @6 b2 V- z) X& H. b9 k if( nPart >= MAX_HUMAN_PARTS )
3 b# N8 ?7 t; F& q0 a+ R return;
- K7 k) m# o% M. c! W+ U& i/ J$ S: _* T
CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it0 [4 l, S. s/ N: u/ ^+ f
7 E; m9 H+ t* f2 x3 L9 C/ l/ q, f8 ~& t( X1 L8 ]: a% Z$ Z
Code:
o- k3 g5 i8 S4 v/ ]#ifdef __QUGET_SWAP_FIX( v# P1 m& z7 z- L
! p2 {- ~: F" O+ s7 L6 E if( pUser->GetHitPoint() > pUser->GetMaxHitPoint() )
" `9 }7 R, g/ _( @8 l. h3 @ pUser->SetHitPoint( pUser->GetMaxHitPoint());! b: c" [6 _# M1 U2 {$ i
6 L& M1 K9 I& C6 ], x+ U
if( pUser->GetManaPoint() > pUser->GetMaxManaPoint() )
. g+ }( V* n- _' a! b# h pUser->SetManaPoint( pUser->GetMaxManaPoint() );
8 {+ m ]9 M- e/ F% R- s& b! i) x7 t
/ d/ m4 W) _; W( s1 m if( pUser->GetFatiguePoint() > pUser->GetMaxFatiguePoint() )) Q( ^! U+ j# J. \
pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );
# ~- [6 G8 @3 {6 x2 p9 t3 I. E0 Y$ S. V
#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp$ O- m) C% P# H- C3 P9 b7 H
and add under
( N- T2 w' R0 e5 i8 C0 v/ E6 g
" X, Q! f8 h/ C! p; k6 KCode:5 h/ ` t* K8 v& J% d, R
if( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel )* R& w+ K8 f5 e1 L' f! X* ^
{
3 h# A2 F# K) n- ?" c) M' {! P 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 );5 E7 m9 \0 b' [! t- z) L% V8 j
}this
. g* d: k7 y6 N: v8 |* k6 q3 Y \- t9 P+ s$ L5 I* x A
Code:& f0 P- z s2 ?& ~, S
#ifdef __QUGET_SWAP_FIX$ F6 {. {6 S/ E( P! z. ^
if( pPlayer->GetHitPoint() > pPlayer->GetMaxHitPoint() )9 K. {% b0 r5 x) _
pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());/ M; _: I+ p0 k7 I: ?
4 R- [) I5 V' ^9 D if( pPlayer->GetManaPoint() > pPlayer->GetMaxManaPoint() )
& }8 R* N6 r, P% W# Y' T. E7 O1 l# u pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );
# n B. w+ W+ [% K* o- Q8 e5 I- T
& r. B& v' Y7 M2 H8 q if( pPlayer->GetFatiguePoint() > pPlayer->GetMaxFatiguePoint() )% B% s' r. i2 I# {
pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );- X6 i4 N9 n g( D& }% l& b- ]
- }& L& s. ~; m# Y- p! _0 \
#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver
7 n8 W9 G3 _1 S$ N
; t: K; C0 t4 l- Z" C: J2 Z4 S; w4 y! b
|
|