|
|
Hi I fixed the swap bug a long time ago it got tested on my server and it worked
& w* ]! n% x* l, }I posted this because someone kinda posted a youtube thingy about it :O.: d8 j& q- t/ I+ {% p9 d2 B* e: Z0 N
5 F! Y- u5 W- O2 PFind this in DPSrv.cpp @ worldserver
; ^; k3 z7 I+ K3 l7 u/ f" H8 m' Q# J7 N5 T4 `/ e, x
Code:
; g" @* `/ D* }- p" Ivoid CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize )) V8 j& y2 T) E$ h, H6 K
{
- c2 F* l5 a- N) d0 ? DWORD nId;6 z" H& |5 N1 B9 y; P
int nPart;& c: a) m- D0 |. h+ M" U
3 |. N1 L4 X. U* B$ O ar >> nId;
6 e! c/ \7 U( Y/ ?0 u- K ar >> nPart;
4 a; e y P1 N4 `' c / e0 }$ F. v2 C+ c
if( nPart >= MAX_HUMAN_PARTS )
# D) v d0 M% i+ Z return;
5 k. T- b, y4 Q+ |) o& b0 Q; M6 w+ G( b5 ^$ f" a. R+ C, a
CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it6 H; L5 D" d) f0 K
" B. s4 E% g) T8 h8 S, K
# H4 T& _. E S! B, ?; m
Code:8 g8 C W* g1 p0 B6 ^( g' o d
#ifdef __QUGET_SWAP_FIX
1 L6 z" [* H. H6 M( h* J
5 i& I% M1 r" w! @5 e. P if( pUser->GetHitPoint() > pUser->GetMaxHitPoint() )
! J/ I# R' E' V' j- a pUser->SetHitPoint( pUser->GetMaxHitPoint());! n6 F3 e# `" a2 U8 J. ]
+ j: M, i+ u% N( K* [ `4 X
if( pUser->GetManaPoint() > pUser->GetMaxManaPoint() )
y8 d, y, \+ v9 O: s" _ pUser->SetManaPoint( pUser->GetMaxManaPoint() );! F7 f2 I9 b6 t( @, l
# }1 R/ ^% u( O6 T* R6 N2 B if( pUser->GetFatiguePoint() > pUser->GetMaxFatiguePoint() )
1 @! y( c3 @: s( n pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );( H& b5 \0 R% a9 z, U
/ W) D* D: g. }0 N5 v; Y#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp! {* U0 \# `0 D0 S
and add under
7 K6 V! x( W$ X J# c6 k& p7 |' ~2 {7 j3 o, Q
Code:
" L+ L3 A; T; s# |+ jif( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel ) ~& x" o# Q( V) j2 _
{
6 ?# [1 R* j6 o- j' N, @ 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 );
2 m" `) b8 x, T! Q }this
% \* w) w# z2 Z% H: @9 |: s1 h7 n8 }: L3 I* X
Code:
/ u; _: Y, ?$ b0 A& I/ s( U1 O#ifdef __QUGET_SWAP_FIX4 Y) ?* V, N$ f2 ^, {
if( pPlayer->GetHitPoint() > pPlayer->GetMaxHitPoint() )7 {! S) ~# H' T4 ]7 L$ R1 }
pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());
! Y6 l' o# Q( S" c4 v. q- S
5 t+ j; Z: `; U3 n8 q# B. M" V if( pPlayer->GetManaPoint() > pPlayer->GetMaxManaPoint() )
B6 Q& Q2 Z+ q9 P3 ?# C5 S pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );
( X( X) p/ G* y0 e* m# g) o9 m! w# } J5 w
if( pPlayer->GetFatiguePoint() > pPlayer->GetMaxFatiguePoint() )
6 T( w c/ Q2 ]- {6 W/ G- m8 W) h pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );
. q; D. Z* H3 {! x( B3 M
( p7 i# ]/ N% `$ p1 b0 T#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver
+ Y( o5 V* e6 O/ F# L f
3 k1 N, V4 [) y$ @- j$ w( q3 S* _6 A6 ^5 a& u( P6 W; E
|
|