|
Hi I fixed the swap bug a long time ago it got tested on my server and it worked
' R ]( G; B. v/ X+ YI posted this because someone kinda posted a youtube thingy about it :O.
2 ^4 Q. g$ R( Z1 _
5 r2 S' t2 D' G# @8 F5 x- DFind this in DPSrv.cpp @ worldserver
; i8 y$ k7 x: F& X
8 h; }) J2 K) m3 |Code:
; I; A/ u8 {& l8 O# R3 s3 jvoid CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize )
* V6 Z2 h7 B; K2 a2 [* e{
2 G) m* N% e9 h4 a; p DWORD nId;* H9 \# P9 y, `8 c( W4 Q
int nPart;* g! ^# e9 x5 B2 Q0 [
- ]2 I k3 u# s" c
ar >> nId;
* Y; E% N5 ~0 ]. [& p ar >> nPart; 1 I" p7 }) n, ]: Y) [
2 l; H, r) Q7 \/ u, \- F' j6 S& \
if( nPart >= MAX_HUMAN_PARTS )
" N, L5 J/ F8 p( Y# h* Y3 X return;
0 U) C; U D1 F& E
; ~1 q( R/ Q/ y" F" p+ @! V CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it7 F/ U' G3 U/ ]( k o, {6 C5 H
7 [ {1 H' G2 c! l" E( L% v1 ]9 _6 @$ t
Code:+ B, `; j6 t% s- s5 B
#ifdef __QUGET_SWAP_FIX
" J9 x/ O& f8 {. P) N4 N* i: ?
: ^. h) ~+ A$ `6 K2 f if( pUser->GetHitPoint() > pUser->GetMaxHitPoint() )
# L; ]1 {3 R( O% p! A$ B( @ pUser->SetHitPoint( pUser->GetMaxHitPoint());+ j6 u# X1 Q1 _
; Q" N+ W4 ]$ K+ O' ]6 |. Y if( pUser->GetManaPoint() > pUser->GetMaxManaPoint() )
W3 ` n7 N* Y8 d2 ^ h0 q pUser->SetManaPoint( pUser->GetMaxManaPoint() );
" G" g% v! B3 I4 z' y5 S
+ D5 E4 k. y% s0 g- z" @0 [ if( pUser->GetFatiguePoint() > pUser->GetMaxFatiguePoint() )
) G) l# `9 f g, F pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );
+ X0 A/ t. P p0 z1 Z: M) u; }3 G- s' Q. T1 {$ B
#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp" T4 B5 p) F7 Y; A& E
and add under
' e8 ~1 J6 F, k1 J6 N) o- w
- l' x/ \( Y% OCode:+ w6 y; u5 Y5 d5 {7 C4 l
if( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel )
% b; S8 J8 R/ P* }7 @! m, t9 f { q+ W% R" R" M W9 v% U, \+ x
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 );
4 i2 k- V% X$ v" U, R }this3 f6 w3 p) X( L8 Q5 w
" w- U& q/ n; D- ]Code:
8 I* z1 y) \6 i0 Q! k9 Q#ifdef __QUGET_SWAP_FIX
! P( Y, M( I# e7 \' N9 R if( pPlayer->GetHitPoint() > pPlayer->GetMaxHitPoint() ): u8 r; d, e7 ^( D
pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());
# h% h' I" n1 d, G/ a3 v
$ T2 N( h/ _) R+ W if( pPlayer->GetManaPoint() > pPlayer->GetMaxManaPoint() )
! d) D1 ]( l7 o" t pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );
) N; o4 G) S3 y6 m' j5 V4 k6 n/ l t1 c& Y8 w; Z. q% b) X0 }
if( pPlayer->GetFatiguePoint() > pPlayer->GetMaxFatiguePoint() )
+ c( d& ~9 r" E$ p+ w4 Z: R pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );0 H' i+ F2 r9 i4 @
- T5 B3 M" H; s% K" \) B# T6 H#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver
6 e* n% G/ U1 x% ?! `0 D% h; m1 r- G( R3 X0 M- u
- O4 _; ]& e1 N: `) Q. p/ B% ^
|
|