|
|
Hi I fixed the swap bug a long time ago it got tested on my server and it worked
7 K$ Z3 ` e3 l l! ~I posted this because someone kinda posted a youtube thingy about it :O.
% _1 l/ L W' l+ V
" Y( G3 i k9 A( C9 w& o! zFind this in DPSrv.cpp @ worldserver' M1 T) x1 F a4 X7 m
( t8 s& b3 K7 f( ]Code:
, I$ ?$ g9 N$ X5 t6 N$ kvoid CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize )5 u. M- l8 Z$ r# {9 L2 p
{
; s% D' Q5 S+ W- b8 X/ R7 y DWORD nId;
! H0 e) Q& @1 }: C/ |' i( j0 z' J int nPart;$ g0 T4 C" X4 k3 s' n7 A9 \
2 \4 i. ?+ R) r7 {/ y5 ?+ ?8 V
ar >> nId;% U6 F, d9 Z. M: e0 O- n9 H
ar >> nPart; # a/ ^( d, y1 y- N' ~. I3 s
/ @2 f1 S: k& g/ m _/ ~
if( nPart >= MAX_HUMAN_PARTS ) $ l8 ]! ~/ {1 f& Q( l1 p0 c" m* F
return;
3 \; P/ M& m# ?: t3 D
6 G: o' u8 z% `8 ^: T& q5 [, y CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it6 H0 q" C; c' ` a( d$ A4 h2 c
6 s4 r; x8 Z3 r% c% l
: @; x5 Y! E- @7 c9 }2 ^
Code:
: O/ ^2 u0 ]: M3 k2 R8 j#ifdef __QUGET_SWAP_FIX
5 B9 V9 F! v0 d, [. Z
7 i) N; b. M) \5 @5 C if( pUser->GetHitPoint() > pUser->GetMaxHitPoint() )3 Z; _+ n5 e; g5 v4 {
pUser->SetHitPoint( pUser->GetMaxHitPoint());
3 H- R8 M" I; P) c% M
2 W: u8 F8 Z- i, h! ~' N, a if( pUser->GetManaPoint() > pUser->GetMaxManaPoint() )3 M' z V" M. F" h0 ]( ]
pUser->SetManaPoint( pUser->GetMaxManaPoint() );: K+ @( M/ M: g# V
- ^# e/ L0 r; H6 w8 J; V+ _ if( pUser->GetFatiguePoint() > pUser->GetMaxFatiguePoint() )
; X) Z" h2 Z: A- w- \1 }/ d! d pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );
+ _! B. w: F. p1 A$ y8 Q. x
* ]7 k* Y% G% `9 _/ e#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp5 z$ a* }6 r' ?! J3 W
and add under# h# v' a( b' t# {% P! z
- X, c$ g$ W4 _/ uCode:
( B- C4 _" f, g* Dif( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel )
- O1 J4 P! I/ r% h* u {# U' q5 q9 ^3 t+ } g* 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 );2 ^( m1 Q1 x0 r# {4 b% a% O w
}this
* h( c% J$ _/ x7 X1 G; G W! l
) y1 _2 J7 w8 L0 b' B* ~Code:! @+ b6 P0 |: D: y/ t9 C
#ifdef __QUGET_SWAP_FIX( S4 g; T; a" _" u
if( pPlayer->GetHitPoint() > pPlayer->GetMaxHitPoint() )% |; K' c; N) ~. u* K2 Y C% I! X
pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());
) |& f" F6 h7 Y& f! P' A# |0 F1 |7 c* ]7 t+ t
if( pPlayer->GetManaPoint() > pPlayer->GetMaxManaPoint() )! R1 d0 e w( x
pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );7 h2 x- ~" k% ^2 _
$ q1 t8 l7 K; I$ d5 z if( pPlayer->GetFatiguePoint() > pPlayer->GetMaxFatiguePoint() )7 [& S" F9 `/ {' s) X4 c( G# C: ^1 B
pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );
+ M: ? Z) w6 p2 q1 h
5 U0 F1 R8 Q; O! R9 m/ n$ o#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver * }& f b5 w" R! s; w7 }
) `% T8 G1 v$ e( c, O+ b- L3 g
+ D4 n4 y; n8 C |
|