|
Hi I fixed the swap bug a long time ago it got tested on my server and it worked : X/ ~ J6 k% h3 }/ M6 I& B
I posted this because someone kinda posted a youtube thingy about it :O.
8 `8 b9 R0 Y8 ?
/ ~2 S1 b7 }5 b4 d9 [. M' _* MFind this in DPSrv.cpp @ worldserver
- {( x# R, k" j- i7 w# X: Y+ \$ m: b3 I2 A9 c- p& P8 \- a7 C
Code:
: H+ a" e5 W/ P1 @- u( U3 ^4 @# J2 dvoid CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize )
7 x; l9 X* _9 B' ]3 |( Y{
' c6 ^+ U& ~3 L' {0 {! R3 T8 T DWORD nId;0 i8 }2 f9 R. R, b7 i- v
int nPart;% @) L3 g( V' C8 |$ c
1 s9 a j' q% p" a ar >> nId;
5 ]1 s# K/ g1 U2 A ar >> nPart;
% h+ F' K" X. Y6 U0 g) o* g% q3 D ! l' {* _! Z2 h$ Y: r* t) Z+ x
if( nPart >= MAX_HUMAN_PARTS ) 4 I% i U0 B* x9 m' e4 Z- u
return;- _! a; [- @) c& o. R
# W+ o* s3 J: U) }2 E' _ X& X
CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it8 _ X, L+ Q+ a
/ \) Y; H- ^* M' ~
& N4 ^' G; R; t8 XCode:
/ y5 l0 T1 X) x. |- I, _* [#ifdef __QUGET_SWAP_FIX# r' [1 S0 ^8 }' x
" h$ f6 S& C/ k# L! V j) {1 }2 w2 l1 Y if( pUser->GetHitPoint() > pUser->GetMaxHitPoint() )! X3 ?5 N: P' I6 E6 ]* `
pUser->SetHitPoint( pUser->GetMaxHitPoint());3 p# R2 Y" q6 c* E
k3 D6 y2 M" o- i, F! U if( pUser->GetManaPoint() > pUser->GetMaxManaPoint() )5 @1 h- i& r: B5 S5 @
pUser->SetManaPoint( pUser->GetMaxManaPoint() );
+ |3 r r" _7 k+ Z
9 u$ r( V3 Z/ b+ ~% W if( pUser->GetFatiguePoint() > pUser->GetMaxFatiguePoint() )' u$ z; Y/ s7 y; ]- W
pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );
0 |6 k3 O. E3 y! g9 F6 S9 a
$ K' p6 x6 @- Y* ~9 n! s) q* I#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp
9 F) l( Q9 Q& |; w0 ]and add under" ?3 D( T2 i' ]8 `8 M8 c" m
7 C% H8 e3 A) u, |
Code:* |4 l- n5 M9 w: X
if( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel )" i% h1 @& q1 r$ B& R- M
{
; G- t s# P$ _$ h8 h0 n 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 );
; z2 w! b8 M- d; X8 `% ?2 u }this9 v6 \- f4 S# B2 i+ a) ~
+ V. ~- I% D3 ^ Z
Code:9 ]- L P$ K' o" N @) c
#ifdef __QUGET_SWAP_FIX
, O* S: n! E9 G" s if( pPlayer->GetHitPoint() > pPlayer->GetMaxHitPoint() )
) T8 G/ ], U0 H/ c3 |- m pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());
7 n2 f/ {' P5 p+ C4 g; |
8 X. L) N) c7 x5 i2 Z3 n7 C if( pPlayer->GetManaPoint() > pPlayer->GetMaxManaPoint() )
" e5 v1 n5 d7 ]- n3 _* o pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );
' I2 X, \* m0 Z4 d! z! V/ p! a: D- G6 K! F& B; e' h2 w, T- I5 s
if( pPlayer->GetFatiguePoint() > pPlayer->GetMaxFatiguePoint() )0 U: P4 W7 u& q' u& I! B
pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );
5 T# Z9 u0 E3 ?% j( k* f! [8 ?* |+ [! ~' _' [
#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver
$ u0 ^+ n* Q0 w- M4 N6 E2 i( R( h% G
) l* |1 H& s! G9 o( Q- m- E3 V% D! G
|
|