|
|
Hi I fixed the swap bug a long time ago it got tested on my server and it worked
5 r% w. q& l; f# F+ W. EI posted this because someone kinda posted a youtube thingy about it :O.
; r8 L4 G2 G# C( S$ b5 r* v+ H5 z2 I: x3 i/ d" k3 |
Find this in DPSrv.cpp @ worldserver- M2 G( k& }: p- B$ V4 t0 d
8 c! T3 R+ r. e( P: C& x: _" O
Code:) d, o y" Y( V! t' V
void CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize )! M4 x4 ~0 t4 _$ H3 v$ ]
{
- N: I# {! ]; H7 T, K" N DWORD nId;
" j; M! c! Z. L( g int nPart;
+ c: S3 F. f8 `% H
6 b# J+ Y+ E0 E% E2 z' |$ Y2 E& o ar >> nId;; z- A6 h! g# W% j/ ?8 g/ r
ar >> nPart; 8 n, G: C9 J& i
0 o# {! E9 b q& W- b/ d
if( nPart >= MAX_HUMAN_PARTS ) $ `. \: k! C' \0 J, ~( s1 b+ C
return;$ G" [& M3 v& T+ k$ S# L( R
% `1 y7 \3 k3 o: i
CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it
% \8 K/ x c1 r3 Z- a$ u! n# i( T1 N0 g U* H
$ x6 T0 D5 p5 ~Code:. I5 E \( W1 W6 a
#ifdef __QUGET_SWAP_FIX+ D( ?: c5 o8 I: C: G2 B) _
- @* K& l$ g# [* @
if( pUser->GetHitPoint() > pUser->GetMaxHitPoint() )
' T( F, [2 o5 G% @ pUser->SetHitPoint( pUser->GetMaxHitPoint());) W1 e6 D; O0 H, ?) t
4 h6 o8 j5 B4 C8 m3 U if( pUser->GetManaPoint() > pUser->GetMaxManaPoint() )! w) n, a1 ~/ |8 H4 J
pUser->SetManaPoint( pUser->GetMaxManaPoint() );
- l' |* U/ \( I, f4 X2 [% ]! L4 `9 J" ^4 x. n- ?' g F
if( pUser->GetFatiguePoint() > pUser->GetMaxFatiguePoint() )
9 y4 W- n7 H& b, \ f pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );- ?4 Y# e [5 g5 l) X3 W/ N
: `! x) W. ]0 ^0 I$ S$ d; w#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp2 S9 s* V6 f8 S3 u: E3 r
and add under
k2 T2 o7 b# N2 }4 g, Q- c
. e$ l+ Z; t7 g6 \3 |* [, I! R+ @9 e# jCode:
* }: S9 s' U. Aif( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel )% }# }/ B% D. G+ i
{
0 S3 N1 e5 k; `# 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 );
% h1 R2 k, F0 N' Y; K }this: {0 {! F. ^) N, b, z
+ e' t' n/ @) M5 e, {Code:
. v# s, O! y! ~5 {#ifdef __QUGET_SWAP_FIX
9 a# j$ }+ w2 g if( pPlayer->GetHitPoint() > pPlayer->GetMaxHitPoint() ), T6 V# |0 Y4 q: P9 g
pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());
4 A; \* w3 t8 v- _/ l3 i, X t8 R' T3 Q4 I. V, m8 D1 z
if( pPlayer->GetManaPoint() > pPlayer->GetMaxManaPoint() )
" ~" ?4 D' x& c pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );6 Q8 v& p; q+ Y' u8 K# I |
. e# c( D" o" N6 w
if( pPlayer->GetFatiguePoint() > pPlayer->GetMaxFatiguePoint() )/ _7 U) c6 x! \+ C: R k
pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );- A, C l1 x- V; p
; l3 ?+ ? [( K; R# L* d#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver # ~! k; t% y w# O
, k- N8 H( G+ O3 P& ^8 B5 T4 U
& p. G6 r+ [2 `% h. `/ ~/ p
|
|