|
|
Hi I fixed the swap bug a long time ago it got tested on my server and it worked
9 Q8 w% s7 Q# { O6 K' f$ B2 d: t- fI posted this because someone kinda posted a youtube thingy about it :O.
4 c% _2 h. H' U) K+ r+ b4 J" \* b+ T% f
Find this in DPSrv.cpp @ worldserver3 U* f9 T% d, b" S- ]! x
% l/ [0 c |! TCode:
7 Y- F: z% c+ m1 pvoid CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize )2 k' {( ~* C+ C* Y" F: A
{& I- Y: h F* n+ t6 \* x
DWORD nId;, t# o4 Z) }' l$ X; W
int nPart;/ e) x+ a0 z5 B3 E! S
0 [' }, G, B) b# q" U
ar >> nId; V" x4 ^0 H! H) d1 L0 A
ar >> nPart; 7 q3 x4 _# q- F$ Q+ W; {
1 Q3 E8 L1 g% V if( nPart >= MAX_HUMAN_PARTS ) % |, U2 T2 W9 r% w/ g9 D" d
return;$ v/ P0 k: s2 U5 s, m
" R& V1 h9 f0 ?4 z6 q( U CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it
9 N4 s. l; w- `3 W B0 U4 R( t- s
- k7 P0 X4 P; b* w
% v5 @; @. I5 e3 q. J: {( rCode:5 U T0 } f& O- J' O$ V
#ifdef __QUGET_SWAP_FIX% D. p* Z4 C. L$ K f0 ^% W2 N2 d
$ z0 R2 @# P3 N1 z. a7 ] if( pUser->GetHitPoint() > pUser->GetMaxHitPoint() )
0 L! h; u b. F' ? pUser->SetHitPoint( pUser->GetMaxHitPoint());" J6 c$ I+ H5 x e# N
6 U- l% m7 p' R& r if( pUser->GetManaPoint() > pUser->GetMaxManaPoint() )$ Q$ x$ @; f' B" a5 M( v+ d
pUser->SetManaPoint( pUser->GetMaxManaPoint() );" C8 D2 A6 [: O3 H' y8 A b
) ?. E3 n# I! [+ p5 X- L if( pUser->GetFatiguePoint() > pUser->GetMaxFatiguePoint() )
; l/ g+ E+ M4 ?( z' N pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );3 s* Z$ B% b* `2 Z( s
; Z& z/ ]: L- {/ `$ s#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp
2 \# O! p+ ?! j6 Z$ hand add under
; W# L5 g: n8 _) y' Q) p( Q y k5 J9 u) V: l w1 o
Code:
/ U/ C; \2 k# gif( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel )
; T- ~% H. r1 ?2 _6 |- a% C { p- k, s0 W+ G) N' S ^! q
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 );
* I6 ^8 h9 U$ f0 D3 q0 A }this, K" Y/ R! Y1 }4 q
& `+ R2 g# C1 b, [) [# }$ ECode:. C1 |! E9 ~2 M- i1 t1 r0 H
#ifdef __QUGET_SWAP_FIX
3 Z8 C f! w: c5 w6 o3 _ if( pPlayer->GetHitPoint() > pPlayer->GetMaxHitPoint() )
. E4 n3 j/ e2 b5 S pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());' t0 l5 y% H: Y" ^/ p2 @5 H
# @/ ?1 e: Y! [: g0 q if( pPlayer->GetManaPoint() > pPlayer->GetMaxManaPoint() )3 q4 Z9 ~1 Y2 ?( E) p7 K& {
pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );
F! y; g+ e8 \5 `' Z. A
% y8 y% u) ?* l! b+ ` if( pPlayer->GetFatiguePoint() > pPlayer->GetMaxFatiguePoint() )
4 p* C* _% x, g pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );/ @; F ~% k# w* E; s0 W/ ?# K
+ d+ E# M# T( }7 k4 |5 @#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver
% I/ B4 ~9 {- I( H8 H4 Z1 V) Z
: x$ f. y5 L, a2 a2 ?0 |8 U" n4 V5 }3 }
|
|