|
|
Hi I fixed the swap bug a long time ago it got tested on my server and it worked
7 x _2 [# d" }2 M& z( iI posted this because someone kinda posted a youtube thingy about it :O.
& @! P/ ^( i' y" V6 e
0 f6 E2 H" z. ^& k8 J) [+ QFind this in DPSrv.cpp @ worldserver
* X# @- O5 ]0 h) _1 _5 J
! d7 y; B L+ c# m% F6 B$ fCode:0 K3 n, z" C y- e' F
void CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize )
* f9 Q: j! M, _0 N1 V& ^' Z' p{' Q5 a/ ]6 f8 Q$ J" G
DWORD nId;
: S$ X0 D+ O) {( U int nPart;
$ q, K3 z8 T g$ Z) L: X, V! d! [; { d- q
ar >> nId;- o% g2 Q' E) e( ]& |8 Q/ y' O
ar >> nPart; * Y8 w, c" Y" A
w5 y9 a b) ~3 Z# Z& l if( nPart >= MAX_HUMAN_PARTS ) - u# c5 e& e0 _9 m
return;, f* ^0 u# _% K/ G' `% b6 K6 G" N
" |5 h1 Y. Z; @2 R( r
CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it6 z% N' O0 M/ Z+ T9 i' |+ Y7 H! Y
/ V7 e- C) L: H" e5 ]( a6 {8 A
9 Y7 Y: v9 ]% A" E' n ]Code:% m+ }: T! x2 n' l
#ifdef __QUGET_SWAP_FIX/ ~, R: x X& O& N1 i
7 R9 `& w- V) N9 m$ i$ E
if( pUser->GetHitPoint() > pUser->GetMaxHitPoint() )
, F5 J7 ?4 F* ?5 u2 l pUser->SetHitPoint( pUser->GetMaxHitPoint());
l# w! B8 ^4 n$ s+ b: ?( ^) G9 r9 ?, p' G
if( pUser->GetManaPoint() > pUser->GetMaxManaPoint() )5 ]- Z2 t4 [; c; ~
pUser->SetManaPoint( pUser->GetMaxManaPoint() );
2 O \1 h {( O' K' T% R
# b% n+ e1 U2 Z" K% ^ if( pUser->GetFatiguePoint() > pUser->GetMaxFatiguePoint() )
) [& R5 L! x k( \: t pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );
# ?0 K1 h! f4 s1 L2 g. P" N# t3 u. s8 m% b9 @; r6 D) |
#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp
9 s6 G- m1 S; e( [' k- z- @, sand add under: a$ C \" q$ F* w
5 V3 x6 p6 J1 {4 s" n* t3 m0 A2 c
Code:
6 T, i: w8 ]4 Mif( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel )2 _" c4 t8 Z- u, S, L
{
* U- Y6 M' @( g' H# H$ Z* b 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 );
* U. T1 N; i: K1 x8 ? }this
; u- c+ }+ r3 _+ d6 A3 S- l
5 B5 E' T6 x; FCode:/ k0 X4 [, [& i9 F6 E
#ifdef __QUGET_SWAP_FIX) ?. P- e+ Q' H/ D, |
if( pPlayer->GetHitPoint() > pPlayer->GetMaxHitPoint() )0 W9 l9 j2 P* `; {# U
pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());
& x7 ]: Z- N9 n( ^+ ?: Z/ N: m8 C, X/ b2 x2 O$ e- |
if( pPlayer->GetManaPoint() > pPlayer->GetMaxManaPoint() )' E- x. i2 q" R8 R/ H4 q
pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );3 [* Y' I- O" H2 M& N, U6 ]
6 G- {2 W# U$ a j7 | ?
if( pPlayer->GetFatiguePoint() > pPlayer->GetMaxFatiguePoint() )
( A. F% n0 u" S$ {5 p5 w pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );' J8 p% f- D$ e: z
* \" Y8 E8 w% E
#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver & P- `' }5 q! |
5 o f6 k$ M" A" X, q
. c& P& D( O5 z# x |
|