|
|
Hi I fixed the swap bug a long time ago it got tested on my server and it worked
; j Z8 D3 f6 l# K5 P- gI posted this because someone kinda posted a youtube thingy about it :O.! Q9 U1 o \% _- C* d& w
0 m. }6 O/ ]8 P/ ?) U, J
Find this in DPSrv.cpp @ worldserver1 b9 C/ t& J# ?/ h
& d: ^. ~! q% Q& q3 a
Code:
" V, i" A% D2 k. ~: Lvoid CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize )
) I# v% h/ o" |: y( M* v{
' M5 n2 k. U, F' i DWORD nId;
* |+ x4 m# o; C8 x! w: Y4 a int nPart;4 x8 M8 r0 ?8 w( G' P' B
( h. u8 \2 N6 z/ b& I ar >> nId;, q/ y$ t# E/ O- t/ q0 l
ar >> nPart;
/ B Y4 V; a3 G0 i) `/ y0 V$ L, D L9 o) m0 `! c0 H" g, ~) p
if( nPart >= MAX_HUMAN_PARTS )
, o, [, e* C$ V2 j( ~8 I2 U7 X return;) `& p1 }) U, B* D5 G
5 a9 z; `9 x& L$ G2 C
CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it# ~. R) s4 P$ B* u4 X0 {
* c7 s7 c& i2 n* m/ {) U+ j
( c4 ^9 |; W% o# _Code:
/ B5 g+ c0 E7 c$ x a4 A# b#ifdef __QUGET_SWAP_FIX
0 o: h2 m4 e e0 m- P4 u8 p' Y' r9 x. j9 c0 L* e
if( pUser->GetHitPoint() > pUser->GetMaxHitPoint() )
6 v/ M( s: d4 t( ]8 S% x/ n pUser->SetHitPoint( pUser->GetMaxHitPoint());
4 L7 K+ P! m; C$ L
9 o, S( j+ \9 J6 ^ if( pUser->GetManaPoint() > pUser->GetMaxManaPoint() )
# n. n) q$ X+ z1 A7 r pUser->SetManaPoint( pUser->GetMaxManaPoint() );
( J' C/ ?* \7 z0 q9 @
# W) r. ? {. N$ k+ ?6 J( X, l if( pUser->GetFatiguePoint() > pUser->GetMaxFatiguePoint() )
: f, c# h+ S( U, Y4 V pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );
$ G) _, K' v& R0 X q' T5 Y2 t# P5 b8 A
#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp D4 l, w1 R0 p0 ?5 \
and add under
8 l1 r, U' M- C, A( a3 x/ P. ?, V- T4 R7 }3 }" }
Code:
+ d) M" ]2 A8 q7 ^/ V& fif( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel )
' l H* Q. l7 a# M" i1 B {
/ O& u% G! S' `. h 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 );
2 u: |* g# N+ | }this
8 I) u+ Q! F# f% s# p+ n& x; S" p3 w
! [. y+ m4 V# ~, bCode:: a* E! m: s( @' I# Y! ]9 i5 i K
#ifdef __QUGET_SWAP_FIX5 Q8 P/ B& k# m( F* R' L
if( pPlayer->GetHitPoint() > pPlayer->GetMaxHitPoint() )
. {7 K2 S0 Q" |/ d- y7 l pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());9 Q% r. V: L5 {5 N
) |' S* E t; i$ C3 o2 Z! x if( pPlayer->GetManaPoint() > pPlayer->GetMaxManaPoint() )5 C/ {+ B# {. c6 O4 L" @. x
pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );
9 \ ^( E' T- q+ @2 R- v1 |
8 P( k) F7 M$ ^% v- e9 S if( pPlayer->GetFatiguePoint() > pPlayer->GetMaxFatiguePoint() )8 e- c% ~9 p" O& z
pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );: }: L. c o+ w+ O5 G$ @
: }2 Y9 W! n9 v& B: B#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver & @! m# \; d0 s# |# T
. V9 Q' M/ ^5 v3 g0 x7 K6 A
! j: A) E: `) ? y: c- }
|
|