|
|
Hi I fixed the swap bug a long time ago it got tested on my server and it worked , G( z7 v$ i9 E- _
I posted this because someone kinda posted a youtube thingy about it :O.
, ?. J8 b+ y( w R
7 S& K: ]/ S* b( {( {Find this in DPSrv.cpp @ worldserver; L; h1 [: S! n) P! J
; E0 T2 s7 Q; dCode:
' z" n h) N, G" I H Tvoid CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize )6 P w$ A: t6 E- k& H. Q0 S# k! j
{
& V- j5 e+ m0 {6 a* G5 y0 L DWORD nId;( a- Q7 F2 n: ~- s, L; n
int nPart;+ {4 ^( i7 M# E
. U* X8 {6 { {8 z7 R! q
ar >> nId;- |: z2 q' [7 j
ar >> nPart; - E& R1 j+ b6 {" O1 U F3 u
7 h! D4 h! `4 Q/ h
if( nPart >= MAX_HUMAN_PARTS )
7 Q& B% \+ D, Y/ C6 v return;4 J6 `& a! u3 x) K: [+ |! r% d
6 i! P" H! Z! W2 H3 H CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it5 v& Q. S/ e2 p) P
: M! `8 b' e) X8 e, p2 P& J/ o/ k" @
Code:
6 [& k* G/ [$ @2 |; o; Y#ifdef __QUGET_SWAP_FIX
, E: E' ?" I8 ]- |3 v5 r& }
7 I& _$ W9 m9 Y5 X if( pUser->GetHitPoint() > pUser->GetMaxHitPoint() )
. h! H/ c3 B0 C pUser->SetHitPoint( pUser->GetMaxHitPoint());; V) c$ ^ y$ @/ D+ u" ^
; E7 ]" [& L; G5 V8 r if( pUser->GetManaPoint() > pUser->GetMaxManaPoint() )4 d4 U) }! f& N
pUser->SetManaPoint( pUser->GetMaxManaPoint() );
9 |9 T3 R! d a( M) b7 u6 |- }* w, v* h4 g6 U! u! Y
if( pUser->GetFatiguePoint() > pUser->GetMaxFatiguePoint() )
; R3 h8 _7 v9 `- D0 O pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );
+ A, M ^6 b, N D& q
% |" O. D( o2 ?7 A' f. ?#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp7 f. W, J- i% I
and add under; r0 b) w/ K9 y+ Q! D3 ^
* i* J1 i# q5 O# X" K" _Code:) o$ j6 P* B) l* ]8 Z
if( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel )) b) r9 @! T) e7 t( z$ ~
{
( u* H ?4 M1 }6 s9 | 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 );
6 w: U( ^$ I6 l7 ^ }this) \' N2 v( C! N
# Q. Y( [3 {/ u, DCode:
$ X4 |# [+ E2 a- D1 n' r#ifdef __QUGET_SWAP_FIX
" y0 l( P+ S! p- i. H4 ^: x if( pPlayer->GetHitPoint() > pPlayer->GetMaxHitPoint() )
5 W3 [! L' x2 l' b- T4 I pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());
3 h- _2 A8 U9 ^1 T2 P3 F# F5 m# }2 d# f: k
if( pPlayer->GetManaPoint() > pPlayer->GetMaxManaPoint() )
( o, ^. s6 N9 Y* p- E pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );) w, L3 R! n8 B* t) t" V
4 q- L2 C5 U8 i- j! s l% Y
if( pPlayer->GetFatiguePoint() > pPlayer->GetMaxFatiguePoint() )
* p- e* b, R* Q# t$ Z& l) {; k pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );
8 H4 D5 R4 I% \2 B5 e5 D+ ~2 `+ D: f4 F! y$ J. b$ X: b
#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver
# q- Q9 u7 u, |2 t6 n0 o% u8 }1 a, @. D* N k' B& D4 o0 v7 f6 c
9 E! Z" y% W% e8 e6 ^0 o
|
|