|
|
Hi I fixed the swap bug a long time ago it got tested on my server and it worked ' B# \, V/ l, w5 E" |
I posted this because someone kinda posted a youtube thingy about it :O.8 c) y+ y0 X) A& i& R6 F
( m! p% j9 a0 ~9 f) CFind this in DPSrv.cpp @ worldserver' c* m+ W. q0 x( L3 w: B; g
& K9 ^% E: @3 I3 V
Code:" D1 B. v- D" G8 x; T \
void CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize )
[9 t. z2 k3 s- F5 ^' w{6 ~7 I2 ^% H) U0 S
DWORD nId;
% ?% R. O! J" T int nPart;. n/ {3 `: }! @* W( M! ?* ?" H
' _. W" i$ c( P6 h/ H ar >> nId;
0 O6 j: y% I6 y9 J# [ ar >> nPart;
4 {( t" B; i. ]( o2 L 9 D; O- w/ T' L9 U) {1 a
if( nPart >= MAX_HUMAN_PARTS ) 3 }0 ~- j" @% G
return;
# j" W( F$ i1 D6 N9 n9 n2 H4 {
) L+ O% R6 y0 v: U& G& h; ?1 g CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it: ]5 {3 q& S$ x
+ x4 [5 n' m4 r1 t3 y1 J+ i) b5 K! F
Code:2 Z& x* W1 A, }$ |6 m2 @
#ifdef __QUGET_SWAP_FIX
- M P) j8 v) E% c& b! t$ ~+ B0 @! ]
if( pUser->GetHitPoint() > pUser->GetMaxHitPoint() )
# r% f. ~3 N6 h) H- r0 Y pUser->SetHitPoint( pUser->GetMaxHitPoint());
1 b8 _- @# ]7 c
, R+ b& i" X5 x, [ if( pUser->GetManaPoint() > pUser->GetMaxManaPoint() )' \: \4 K* H8 }. J% ] o" W
pUser->SetManaPoint( pUser->GetMaxManaPoint() );' v6 x& l. F1 |3 v" z8 w' @, N& V
6 V8 k( u$ B* {9 c$ v6 N4 p) X if( pUser->GetFatiguePoint() > pUser->GetMaxFatiguePoint() )
3 b- y' i* V. Y5 n* } pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );
, J$ v. C2 l& O% G' c
- X* O8 b+ h8 n! ?. i: U- H& ~#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp
5 T4 H) i" k% ?" q9 [1 fand add under
3 g8 u8 V2 Z" s9 }7 w) V( x
9 K$ o6 v7 o; t6 l+ B& J4 P; iCode:4 O3 Q- |* b1 M0 ^; n# V, Z# U
if( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel )
1 I6 I8 M) ~, M {" o7 C j I+ T1 \2 K
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 );
. T/ }0 v' h: \- t; Q1 @ }this/ \$ o% T/ V& U
$ _% _8 v. w+ x% U' V. v4 {
Code:
- e* ~7 R$ d* `& s' @1 d" [2 w#ifdef __QUGET_SWAP_FIX; @* N. y. \9 g, a8 b7 f
if( pPlayer->GetHitPoint() > pPlayer->GetMaxHitPoint() )
. K1 f" [ n& y( j" t0 V* @4 ^ pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());& d T( d# `# G* ?) {
: P. E6 ?" E$ L if( pPlayer->GetManaPoint() > pPlayer->GetMaxManaPoint() )" I4 y& k3 Z/ d, |' Z+ i. w- I
pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );
" T0 ~- L" L! `9 p
3 ~5 [, D1 B; K# M if( pPlayer->GetFatiguePoint() > pPlayer->GetMaxFatiguePoint() )
' S+ S7 p; h. Y' }4 Z- v% g pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );
* f5 ?; k: j2 G* L; p) _0 U* P. m" Y( u0 |% y: l) A$ |! s) r
#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver $ t" K6 T( L+ W( h
3 K h0 ~1 ~ ~, {* Q- \; ]( A
+ m/ S, T# Y/ l$ [$ g1 W8 _
|
|