|
|
Hi I fixed the swap bug a long time ago it got tested on my server and it worked 7 w7 c' c+ K7 J6 r. ^
I posted this because someone kinda posted a youtube thingy about it :O.4 u' c8 d4 R, P: A& P
$ Q& p9 n- O; }
Find this in DPSrv.cpp @ worldserver+ y* `2 _' ?' t: H
4 E+ D; z3 ] N5 f: k" s
Code:
s! P* }1 T$ Z9 ]1 {void CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize )/ Z0 y& K, u" r5 c2 R
{
8 L3 v- c2 u9 l5 T& O1 ?6 c; V i DWORD nId;
. s( e; w# D. n. {/ Z5 G int nPart;
M/ G( \0 o# ]0 @& E3 C7 C9 }8 Z' L/ B( d& K2 R4 e' G
ar >> nId;
7 j4 r: f, P/ S1 Z7 Z1 a' B4 [ ar >> nPart; $ z$ o! l4 }2 n* D, C
' [2 y" ]7 n4 l) M
if( nPart >= MAX_HUMAN_PARTS ) J5 \$ D4 S, v
return;0 ^# u4 X' x! d: Q$ d2 U' l
$ B( i$ Y( F! E ]4 G7 `; X
CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it0 n, l% t+ k1 q' X5 L5 U
; R% V! G1 v3 T* [3 l3 p, `1 {1 o2 \0 u: R, j: b
Code:0 e' X' m7 a( N
#ifdef __QUGET_SWAP_FIX5 e/ R4 s" `) l
1 Y# z7 }% y( c if( pUser->GetHitPoint() > pUser->GetMaxHitPoint() )
$ i3 F( [: ]2 {4 G0 M0 P6 n pUser->SetHitPoint( pUser->GetMaxHitPoint());
% Z R) P- p' q1 g6 v) {0 S0 G
/ A# ~, r! X( d! c if( pUser->GetManaPoint() > pUser->GetMaxManaPoint() )4 b4 i0 i9 A( @3 @% \
pUser->SetManaPoint( pUser->GetMaxManaPoint() );3 ?+ e3 z8 e8 c
4 L: V8 [- J$ D* F
if( pUser->GetFatiguePoint() > pUser->GetMaxFatiguePoint() )
- |" n* Q& Z5 p) V- |# U pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );
% t) x1 V. I* ?0 |3 f% G' K" e
) {/ n5 L K) H1 b#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp, Z9 M: r! b/ B5 R ~, P1 _
and add under) |; q: C3 z0 o/ z7 Y8 b
. B1 F1 V8 H4 L {
Code:2 @ c1 Z# E$ I8 I6 U( C1 M# e
if( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel )! c( O2 ?2 m8 \% M0 b/ ]) M
{
3 F7 {4 ^' P# i6 {2 M$ J 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 );
7 P, w2 ]# a2 F# m, [ }this
0 G1 l) F8 _$ @7 B, z8 ~
7 m. `& w" J9 z) o/ fCode:
8 m- R ^$ \( f/ B#ifdef __QUGET_SWAP_FIX5 R1 q3 [5 {/ e+ m* L& X, q R' t
if( pPlayer->GetHitPoint() > pPlayer->GetMaxHitPoint() )9 `7 f( x: r% h' E5 x, y6 S2 ]
pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());* l# F+ U+ w+ Z* t0 @, n
/ D' t" ^. r7 Y& d6 F+ h, h if( pPlayer->GetManaPoint() > pPlayer->GetMaxManaPoint() )' ?; [: E# E; C8 M
pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );
/ a5 y; O5 K1 H+ s9 s8 X# t3 q" M; K0 n' y' B- Z
if( pPlayer->GetFatiguePoint() > pPlayer->GetMaxFatiguePoint() ). Q' p( V2 G) I8 R: d* z
pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );. z; q0 I. W: s: f0 L# r
8 H5 h: `0 K8 n- a u) ?1 j#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver ! F& U5 j7 P* U4 W2 m4 @$ I
% C" H" m9 N, O! a `( w* [
/ l* h" @2 Q. W" f
|
|