|
|
Hi I fixed the swap bug a long time ago it got tested on my server and it worked
% L" P" p& y: gI posted this because someone kinda posted a youtube thingy about it :O.0 \' ^% P) _6 s2 W0 m4 T/ m
1 Q4 n( {. G& N2 ~) @/ x9 w
Find this in DPSrv.cpp @ worldserver
4 D+ A4 Y. o" U- }$ |# m# u( H) b* T7 M$ E
Code:5 ?( x# K0 J& `
void CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize )
" |7 i* P& H, d. w, P( m{
+ K; N! J( N9 D2 b7 X* H DWORD nId;2 g# Q6 Z# ?$ b8 V$ D6 v, S' I
int nPart;6 k* q" ]1 b9 H, W9 i
{" o$ `% v g L% q% u3 J ar >> nId;5 e: @2 k! j. T9 I
ar >> nPart; 0 b4 s, o# s1 q' d( D" D7 @* Z
* K/ ]8 U" F' u! I4 F n if( nPart >= MAX_HUMAN_PARTS )
4 p0 ^. \ ]4 ^! R' w return;
/ K& ?& A" x; F0 q0 ^4 ]8 s
4 o% u9 @* s K# L# V7 j, L CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it
' D- O) ~8 K2 w5 B" n% o: ]8 O
5 [+ ?( w+ U8 l$ R7 `
: \. V) \: E4 h6 TCode:& R$ K, f0 t' f" E# n: p0 _
#ifdef __QUGET_SWAP_FIX
. ~+ e5 Y4 `" C( J. K
7 h: B, m0 E; E. I6 @& j; ^% w' q( M if( pUser->GetHitPoint() > pUser->GetMaxHitPoint() )
8 l& K( |( m- _* U8 }" N2 M pUser->SetHitPoint( pUser->GetMaxHitPoint());( g; \ H/ V% _+ O# _: x# g* s
. [+ ?! f- a: W
if( pUser->GetManaPoint() > pUser->GetMaxManaPoint() )# t d: `: ~6 Y1 x9 D7 w# R9 E
pUser->SetManaPoint( pUser->GetMaxManaPoint() );8 \; Z5 _* N. e6 a
0 H% y0 T4 m, d* }
if( pUser->GetFatiguePoint() > pUser->GetMaxFatiguePoint() )
" t2 ?. W) S9 {% {3 \, F6 R0 m3 J) C+ G pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() ); s( R2 a* B/ x% T6 C
4 i2 K# y# X# ]2 u) O
#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp, u( q4 P4 t8 B) R
and add under" u+ j( s; g. o: \) S3 ?
- E; U$ m5 n2 h& |/ J4 }/ N- l
Code:/ o% W3 H( `$ \
if( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel )) `2 D# S: D2 A% S1 ]. B
{
9 y0 J5 T2 K, h* ]2 V1 `! s 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 );
8 u$ P/ E9 }7 x; l5 T: A8 W3 F }this) C! a3 R4 [6 _
3 j1 f4 c P! QCode:
1 r1 @1 A o2 ?/ V6 w! Y i#ifdef __QUGET_SWAP_FIX
& i+ e# P% p8 W# _ if( pPlayer->GetHitPoint() > pPlayer->GetMaxHitPoint() )
7 V0 G. J3 r7 B6 Q% N) C7 R. @& y: o pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());5 j: H4 z9 J6 K* n* K" U" _
% {" P. e- `" F" [2 ] if( pPlayer->GetManaPoint() > pPlayer->GetMaxManaPoint() )
. T. ^+ i8 ]- q! I pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );' U$ Y! V) I0 Z# {3 K
2 }. ?% p2 {4 I if( pPlayer->GetFatiguePoint() > pPlayer->GetMaxFatiguePoint() )
: f) p1 e. u* j9 l2 v pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );
' r5 I6 s; M8 \5 M4 V% d# ~. c
& L6 w9 B& m5 n. S/ f) a+ g#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver . A; |! O, F8 H7 i- J5 b+ x2 c
; ~! H) u- k( I! b8 Q2 u3 ?
5 o7 H1 n' ~. T |
|