|
|
Hi I fixed the swap bug a long time ago it got tested on my server and it worked
5 V7 D: q2 N# T- b& K' n0 EI posted this because someone kinda posted a youtube thingy about it :O.
, X( ]* w7 _# `# b
3 k" s; Y7 ?. g+ t- j1 oFind this in DPSrv.cpp @ worldserver1 |# C/ r- L T$ N1 ^. h
" j l4 H& b3 p- X( b
Code:6 g' A5 d }! E7 P5 g
void CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize )4 N1 ]; V% X. \+ y6 N
{
2 U- u8 r, M( Z& Z" G DWORD nId;0 j; V$ I+ p8 K) v
int nPart;6 ^+ x& ? _5 s3 } `
9 O3 Z# s$ p# p2 s- e ar >> nId;, E6 z7 b! V) _& X, n8 y; B3 A
ar >> nPart;
& f: |% G# b6 D % t/ i/ R$ B5 f3 J- O6 U# t) H
if( nPart >= MAX_HUMAN_PARTS ) d0 P/ S+ c3 s4 `
return;$ S8 |6 Z7 ?# a4 G* X5 @/ C
4 y0 _4 J2 l5 q7 i
CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it D5 W$ T# c8 D/ |$ _
" g3 }" u& e) h" F: V. a+ a
- L0 a7 s; ^% HCode:
, r/ ~ m' `, W6 w$ \#ifdef __QUGET_SWAP_FIX
( X! w- D/ c/ C& e; e- s
/ j3 r0 s; i W% v if( pUser->GetHitPoint() > pUser->GetMaxHitPoint() )8 J; |* @$ e+ G: k* |/ q! o* y2 t
pUser->SetHitPoint( pUser->GetMaxHitPoint());+ U3 g7 B. Z" K8 G
9 B5 v( H% c# w, n7 {8 s: d; i: L
if( pUser->GetManaPoint() > pUser->GetMaxManaPoint() )
8 |7 A" C# m4 ?0 T, O+ ] pUser->SetManaPoint( pUser->GetMaxManaPoint() );5 [. D1 K' ^2 r5 s5 w5 K! q
, o. N. P& J! r# b- ]9 j8 ?
if( pUser->GetFatiguePoint() > pUser->GetMaxFatiguePoint() )2 C0 `/ U0 X# i# F* ^4 g+ |
pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );( d y7 G* O# `3 \, p% l/ F6 P) C' R7 ]
0 t8 |* b- m" R6 w#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp1 k. `( H$ C6 m0 A1 e! q" R
and add under
, v6 A/ {& i3 y2 d: f9 c E2 b8 h& m% g7 G6 F4 |
Code:
; H( X, @& O5 `3 Aif( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel ): t$ H: v, X% B
{% J1 ] J6 D y* x
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 );
8 ]6 t" [% V5 \9 j: ^ }this/ E, m- N* F% k, ^1 v
) B. D7 |; C8 g/ l6 ~) XCode:
2 B+ G2 u y" \0 a7 t#ifdef __QUGET_SWAP_FIX$ N% r4 C; Z4 X) }& N
if( pPlayer->GetHitPoint() > pPlayer->GetMaxHitPoint() )9 Q" O) R5 K( l
pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());4 t$ ^+ ^6 F* ?8 W* v( M
! `) w" ?+ q+ r; S( y
if( pPlayer->GetManaPoint() > pPlayer->GetMaxManaPoint() )1 t- T; l1 _3 H$ L' {
pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );
* J& I/ V" Y) x; D0 ]$ T
5 `3 f6 Z8 F7 ?8 [- x1 D* E if( pPlayer->GetFatiguePoint() > pPlayer->GetMaxFatiguePoint() )
8 Z; l9 T! J2 [6 G pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );, k5 r* W9 b! r# |
+ X/ p# G( M1 b+ }, X3 V1 x: O2 Z9 U
#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver 0 U- e: C" C4 @. Z
- P5 ~+ [8 c1 S6 ^5 f
) J/ f- x0 j* d/ E: @7 s |
|