|
|
Hi I fixed the swap bug a long time ago it got tested on my server and it worked
! S: Y, L3 W9 }" B' x" s0 hI posted this because someone kinda posted a youtube thingy about it :O.( W4 c6 G& F( {
/ Q H5 ]) ^$ G6 }1 l/ [; J. |
Find this in DPSrv.cpp @ worldserver
: W% K, v% V. n0 J5 _. J, b$ K( ~/ ?. y2 M+ y6 f
Code:
2 \6 g: X* ^2 R' W1 bvoid CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize )1 `% @" D5 O, x" X9 ^( p) H
{ h* A4 H" I: m( \
DWORD nId;8 g$ P) g1 l4 E* W# P6 p" k
int nPart;
: ^* N) K$ G0 l# G
$ X6 F8 J$ }# K* ~$ |$ i. h& q7 c! m ar >> nId;
- o5 a& Q1 ], [- T4 S: y ar >> nPart; 4 n) c; A# |6 d4 y0 m% @
1 \& a$ r! c- }! P+ Z
if( nPart >= MAX_HUMAN_PARTS ) 6 Z1 B, r+ ?/ H2 \; Z
return;
[% T2 A7 S$ W# }+ b8 L. k& m! ?, x, D+ A+ Y+ w
CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it
, k( N" O, t2 C6 u6 B) n
. `* p3 V+ f$ n$ o# ~7 S4 u8 m, J+ r) Y; U
Code:# B* ^" C' `$ k; n f6 [/ X, I
#ifdef __QUGET_SWAP_FIX3 b( Z- l9 ^9 Y7 m4 W9 k) H r g
* ~% l! n$ ?- A* L- e# } }1 A( W
if( pUser->GetHitPoint() > pUser->GetMaxHitPoint() )
+ P2 |' M5 q$ x2 G6 X pUser->SetHitPoint( pUser->GetMaxHitPoint());; [) M) ~) e u3 O" q, H3 R# z
6 B" m- u* Y. b# M& B$ j' \$ l9 u) O
if( pUser->GetManaPoint() > pUser->GetMaxManaPoint() ), |9 U+ f% `6 K. N; G
pUser->SetManaPoint( pUser->GetMaxManaPoint() );7 X4 z% q/ ]. S8 E+ ^4 ^6 g! i0 h
/ f3 u, O! u9 r" o2 y* D if( pUser->GetFatiguePoint() > pUser->GetMaxFatiguePoint() )( y8 u( y" s+ _7 n. d
pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );
6 z& c+ D; S S& ~. R1 o
8 z2 S7 H" `) x#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp8 ~& m" c0 d0 N! U2 Z6 S
and add under
0 J' _2 b1 F1 j) \4 _- `/ J# U% M& b$ _4 D/ l* A7 z- L; Z
Code:" w1 p7 U/ _! f! V( ]
if( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel )+ j5 A: N& S5 }
{
5 c) ]$ V+ }$ U, x7 a7 l! G 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 C. V S; s* Q, Y2 R- [
}this4 Z& b% F- R3 }3 B
0 o1 K: S" a4 C! p& c' I' I
Code:. h7 F& j% v% {" n; d# o3 a) V
#ifdef __QUGET_SWAP_FIX
& d8 Z: h8 n- t* }' G' L if( pPlayer->GetHitPoint() > pPlayer->GetMaxHitPoint() )$ F$ G! C# X# A8 E) `
pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());: |' V# E2 v1 p$ |7 k- T# z- a" }
& B q$ N& `) P' ~9 v3 Y if( pPlayer->GetManaPoint() > pPlayer->GetMaxManaPoint() )* N0 R d$ F8 ^2 s( N4 L( P
pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );
" H' ~5 J& }0 S, B" z% k3 g9 j3 e5 j2 J9 e7 ?3 J7 W
if( pPlayer->GetFatiguePoint() > pPlayer->GetMaxFatiguePoint() )
+ }2 d2 p4 \$ g4 a/ T0 q pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );
6 I! k4 c& Y, [7 ?
2 l# q! i5 x3 Z: I- q#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver ; Q# O: R2 N2 [
! i' O+ M4 l4 l& g' o4 W6 Y" U! v- R( U; O( d" R1 U- G+ X7 T
|
|