|
|
Hi I fixed the swap bug a long time ago it got tested on my server and it worked
4 G4 N- c# h; T4 H# |* Y! qI posted this because someone kinda posted a youtube thingy about it :O. q. Z' Z& l, y% k. I6 M
0 q- c! T% Q. O9 K& `2 B4 cFind this in DPSrv.cpp @ worldserver
0 d. Q/ ?1 \# P- b8 N, k" G
+ y- G2 f. |9 `* G3 T- nCode:, i" t$ g, U4 J( j( q9 P2 @
void CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize )
5 m. V5 y2 P9 W" A0 y. a) H! U{
2 O) U! U* x' B/ a8 ^0 }) \6 W DWORD nId;
- j5 ^9 y$ o5 _* J9 {0 V. J int nPart;
% k+ j( E: u( ?7 N9 o" n; }1 {, t; a* d& G8 U( n9 [; o. v/ E, |
ar >> nId;/ B. d$ X) B9 d, N
ar >> nPart; : _& Y4 }* u X% [6 e
: p$ a. h c( n( Z3 x% h1 e3 s- _; c, Y if( nPart >= MAX_HUMAN_PARTS ) 2 h# @4 D8 X7 {1 D
return;9 [ b7 g; z6 p0 x$ F& n4 U) A
# t* c& _$ [1 o CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it/ l1 ?0 x |1 w+ B, o6 }' X! _
' [4 B% w: Z3 [- x8 l; C9 I# m
- c5 i z; Y; O) }) LCode:
2 _" q$ x2 Z) }, I#ifdef __QUGET_SWAP_FIX
8 n: Q2 U8 x- @; [1 n, |8 N6 @/ G+ ]" s2 ]: ^" ?) ~
if( pUser->GetHitPoint() > pUser->GetMaxHitPoint() )4 T) ]+ e) I1 t I* B0 I* u
pUser->SetHitPoint( pUser->GetMaxHitPoint());
p1 j& B k4 v. i4 [/ X0 k' v) ~' M8 G' h
if( pUser->GetManaPoint() > pUser->GetMaxManaPoint() )# ~$ m* F* M: ]( p6 ?1 J0 }
pUser->SetManaPoint( pUser->GetMaxManaPoint() );
- K+ ]2 Q( q2 J. x4 n1 ^- U& ]- g% w% w' f& Y
if( pUser->GetFatiguePoint() > pUser->GetMaxFatiguePoint() )
7 C8 s( E) d9 {4 [- R+ g' M pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );
, G v* z6 Z; J* A1 `
5 m- P# M. s5 I. f+ h: P#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp) `8 x; a0 u! w1 \# k
and add under( o. `9 l7 L, J- H
( `2 a( L" Q2 g# U6 q
Code:
6 {) }/ Z+ i! k- {+ H: L. Lif( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel )* f, y5 ?- |2 |& b/ y+ X
{
3 W5 {. h) M3 q& c( ? 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 );) `* c: m. p4 j' x0 F; ~( u) C
}this# ^ C2 O- x5 D9 [' b
6 g) k+ S+ H, B- {7 c* A6 g
Code:; I! p' `. E, A7 V+ }! b
#ifdef __QUGET_SWAP_FIX- q! {" F' Q$ y$ c
if( pPlayer->GetHitPoint() > pPlayer->GetMaxHitPoint() )
9 G S$ r+ d; @9 |; S7 U) x pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());
" [9 Y) e& M" f3 g! F
6 j7 b+ \( U% F6 w9 @ if( pPlayer->GetManaPoint() > pPlayer->GetMaxManaPoint() )
3 f) e, t, U/ ^! k pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );8 u* j! N1 T6 l; ?( w1 h1 e8 G
% C% u+ C8 o; I1 J5 r# h( y if( pPlayer->GetFatiguePoint() > pPlayer->GetMaxFatiguePoint() )7 N2 I$ u3 J9 `8 z- q0 L8 l1 K1 h
pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );3 v) Y+ i* T7 s) U0 ?2 w
! f5 s: P3 Z7 s7 N4 n! N#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver ; S6 |5 e, T7 D: W: w) c
) `% `' y+ z8 c
$ W1 z7 w) `9 v |
|