|
|
Hi I fixed the swap bug a long time ago it got tested on my server and it worked * ^% C" p4 j' t1 y$ L: C. O/ ^
I posted this because someone kinda posted a youtube thingy about it :O.- m9 i1 T& J L+ i" r! l
! j# |8 B4 G' _/ O" _Find this in DPSrv.cpp @ worldserver6 S0 I; `! d0 E3 W' ~0 S
* U& d/ { y3 {' L/ @) H7 C
Code:. k% `) M5 s6 _: N) q
void CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize )
4 ?, ~) d) K2 `; {{& y. z* b' S8 S( e* N" E" Q& N! T
DWORD nId;
' B" x4 M* ~0 O& G int nPart;0 D8 b, q2 F& l; B
/ J$ I# i8 Y8 O5 C ar >> nId;
" @' C+ r* H$ p+ e, J ar >> nPart; 9 s1 P& c! v; p8 f
# D9 [$ v' M) Z if( nPart >= MAX_HUMAN_PARTS ) ' r5 P+ e: E* f# k* F
return;0 E/ |3 V0 \" x
/ U: P% h: C- b! Z$ k8 x, ^# m# r* i
CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it
/ i A4 h! Z) W$ P, M4 T" y
1 F& K$ C: Y+ \; F
% K3 {- a b5 I5 H" eCode:
6 ?! k! B# L- u! e8 S" j7 g#ifdef __QUGET_SWAP_FIX
g5 X4 m2 g+ X8 W( M; W* k# N( d9 z+ a9 Q
if( pUser->GetHitPoint() > pUser->GetMaxHitPoint() )" a2 w! e! B: [4 i& m# {' F! H- V
pUser->SetHitPoint( pUser->GetMaxHitPoint());* Q* I1 h+ }6 o
7 R( I. W, q( H$ F2 G: h! z if( pUser->GetManaPoint() > pUser->GetMaxManaPoint() )8 Z; G( X+ {4 m
pUser->SetManaPoint( pUser->GetMaxManaPoint() );" D- {" P" T8 ]3 n3 w) q7 z
; x( d2 j' w) O) h3 y
if( pUser->GetFatiguePoint() > pUser->GetMaxFatiguePoint() )9 x0 X+ v, W6 T( R3 W; p
pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );: C' S$ `5 f5 |0 v: K5 v7 V" s9 D& Z
" B0 F: H, i* @% Z6 F
#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp5 c0 {7 g" J- H4 `0 w- z
and add under2 ]: s$ g% F" q8 _* k8 N2 ~
+ {' e- z" I, E) y/ e! G) PCode:
6 j- o- M7 H/ T7 m0 ?if( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel ) O7 s4 E9 z$ T1 ~( p/ Z+ [2 ?! i
{; P; u. j3 L D" \7 i
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 );
) C) L! G9 R. b1 J }this
( c* ^+ O2 H6 p f; ~
8 @7 m0 N, E5 g# f j1 gCode:
+ v( e' m# F5 i# P#ifdef __QUGET_SWAP_FIX1 P6 Z7 B F) N
if( pPlayer->GetHitPoint() > pPlayer->GetMaxHitPoint() )
0 t T" |: t5 K& H pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());
9 \3 B& H) ?% U+ U+ P. `7 W* _) X
9 Z1 f W: \* g& n+ A/ }) S* S$ n if( pPlayer->GetManaPoint() > pPlayer->GetMaxManaPoint() )$ _; x( U+ c7 u- k/ h
pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );- [3 `6 `4 w$ `7 C
8 h$ Q) V% l. Z6 T2 X- }3 [
if( pPlayer->GetFatiguePoint() > pPlayer->GetMaxFatiguePoint() )2 a$ Q6 O, H! D5 i e) k- S
pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );1 u. m v7 S: T& T- T
: B) d5 F# p7 s1 m#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver * x( O7 b) r0 v+ u# e; Q- l
9 {. o0 P; M. F3 I7 c% p* s! a- L+ i! k; b! p
|
|