|
|
Hi I fixed the swap bug a long time ago it got tested on my server and it worked
. a9 i# G8 P! f% S* U8 m* I( ^I posted this because someone kinda posted a youtube thingy about it :O.# o# A; _- S( T1 q# o
% M& z5 v+ n5 Q0 J# SFind this in DPSrv.cpp @ worldserver
. T0 I" E& @3 v7 X* F% z) e0 c6 }( z1 S" T# N; X
Code:2 R U- }" t2 b- y6 o
void CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize )+ I# a/ J+ y: p4 V0 ]% z
{! ]0 s% p5 B2 E! F! K& g
DWORD nId;0 o) i' K& W( r Z4 y# C8 w/ o
int nPart;. l; P3 a$ S+ J4 g
& b) F5 ^* w% p% h" C R ar >> nId;
$ ^( M! G Q' D ar >> nPart;
, w) L; x- G& K( U% d" a9 \% X , M7 y- @6 H1 T, s. r
if( nPart >= MAX_HUMAN_PARTS )
1 V% i; s) @8 o return;
; l) r: W/ D# y* T
& {& p8 V7 |, [0 X, P: m CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it
* E2 E2 B" K4 |- C: T, e& f
; o, l J% f1 a6 P& C& e8 v8 x1 q- n6 E/ J1 s' q3 }
Code:
0 [ d! I9 C( O7 H& @2 K, X+ A#ifdef __QUGET_SWAP_FIX
7 Y% @8 V: ]3 d: Y3 A& c7 m
: B9 f5 y' o" B, p% ^ if( pUser->GetHitPoint() > pUser->GetMaxHitPoint() )
# q, A; k7 R6 S$ f pUser->SetHitPoint( pUser->GetMaxHitPoint());9 [5 L D1 p5 q# x9 I
5 `5 M2 u: L4 C d4 y if( pUser->GetManaPoint() > pUser->GetMaxManaPoint() )0 z+ F7 {3 [, h" T! A$ ?! ?
pUser->SetManaPoint( pUser->GetMaxManaPoint() );+ L+ U w7 c2 p0 j! u$ a
$ U7 l" ?: q" R
if( pUser->GetFatiguePoint() > pUser->GetMaxFatiguePoint() )
( N4 `- r+ f; D2 E: J4 h pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );
% C3 Y) J" X4 n4 p9 L% I* j& B' P/ f% ` F: D: a. Q8 _
#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp2 m, S/ Q l) ]0 x1 x+ v" i
and add under
. O5 c* }5 O/ u& Q/ {$ k1 W- `: C7 q; U' A0 ?5 V9 g" d
Code:
2 @ [ g' l- nif( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel )+ F; Q0 d4 h7 J, u5 s
{5 ^3 P5 q9 ^2 V: ?7 v `0 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 );
' Z/ A, H8 h" W2 g }this9 q: u5 [9 }$ k/ ]! z
/ v& h8 S, b. F/ E$ _
Code:' }, b% p x+ u4 b
#ifdef __QUGET_SWAP_FIX2 {! k% S8 w6 b5 P% C/ g: G2 q
if( pPlayer->GetHitPoint() > pPlayer->GetMaxHitPoint() )* c3 L) C. e. h ?
pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());( d! s3 m: m. I6 I, O5 I# q
. a5 b3 X$ W! U6 q# R; Y+ {2 g: h' V/ ~ if( pPlayer->GetManaPoint() > pPlayer->GetMaxManaPoint() )4 _ z/ |* n5 ]+ v+ d
pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );
$ [9 U! p" J: @! @+ P u% o. G( o. T: f/ w# d, c( {0 P% e
if( pPlayer->GetFatiguePoint() > pPlayer->GetMaxFatiguePoint() )& ?7 q H+ C# U: ^8 l
pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );5 P& N" F6 c% F( z: {7 x; ?
0 F4 W6 f5 S: |! L+ B2 w+ D#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver 8 r% X, k& [8 E8 I; [# j8 q
6 ^# d% g# ~2 y- [+ {; B- M3 |
. U4 n/ g3 F( P3 ^
|
|