|
|
Hi I fixed the swap bug a long time ago it got tested on my server and it worked
5 d5 H9 ?) q4 v* xI posted this because someone kinda posted a youtube thingy about it :O.
+ `: x" z6 O9 P2 S6 @1 O* a! b f$ W5 }" [' Q# v& @
Find this in DPSrv.cpp @ worldserver, W7 x. j- m. M6 n* O
+ d1 Z* i* J0 k3 gCode:$ B3 A( |$ I% l! F( W3 W% D
void CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize )# t8 k, p$ e2 O b x+ `
{
7 W9 F+ y9 } z4 T. r) g5 W- W3 D7 z9 m DWORD nId;
0 _# S' I$ D p8 b: n5 T int nPart;
: D2 Y Q& U( l. g$ b6 N' d4 B) P& a# }: Y- a1 |
ar >> nId;& U& B. v+ H3 [
ar >> nPart; / P$ L7 }7 ?) V
# T4 Q8 e8 ~) _0 U4 h if( nPart >= MAX_HUMAN_PARTS )
/ _! o. U V! s; W7 R3 S return;( t. f+ B, i6 B. m/ V
4 m2 V! c5 H" O, c/ V% W CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it
& I, U3 l( N @) g2 _' S
5 ^* [+ m8 `* o' m6 i6 x5 G. X' i8 |7 G
Code:
1 L. e# g+ u& @) l' k#ifdef __QUGET_SWAP_FIX& s* x; z" k9 D- u, h
7 S; e- m9 l9 A- N" N: C7 s3 V
if( pUser->GetHitPoint() > pUser->GetMaxHitPoint() )' s. Q' j$ n z/ g8 J8 l+ ], X6 W& y
pUser->SetHitPoint( pUser->GetMaxHitPoint());2 e% M6 u7 \5 N
5 `! _8 K6 O/ K. m8 ^1 s: L
if( pUser->GetManaPoint() > pUser->GetMaxManaPoint() )
% C* s4 S6 y& c9 s! L. P pUser->SetManaPoint( pUser->GetMaxManaPoint() );
* i7 \7 v5 l& X* F2 _% z( C. u+ i- m# O( i( z9 i9 K, T# c; U
if( pUser->GetFatiguePoint() > pUser->GetMaxFatiguePoint() ) M H/ z* l# z4 p6 O# A' C6 ^' v& g
pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );
* q8 U& _' z5 {6 F" ?* n1 r ]2 C- D( ~; P$ V4 ^
#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp
4 j* s- ]/ L; H" Aand add under
9 x. o8 [* y0 `) P' v# S3 m8 u* h
: m4 Y$ T; O1 YCode:1 v/ i5 w' F0 ~. l. _
if( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel )/ D5 n, ~2 } Z6 w/ P/ ^
{
% p- l' w) H6 i8 r3 g" T: l( | 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 );
& D. ~* M8 ^% V* z& a9 U6 S) M% S }this
5 x7 z* k( e+ H; l; `7 `" S ]) X6 X% u
Code:. U9 Q% y* ^& U+ h) a! C
#ifdef __QUGET_SWAP_FIX
( A: P) X' l \ if( pPlayer->GetHitPoint() > pPlayer->GetMaxHitPoint() )
% A6 y7 r7 Q! K5 e3 V# A pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());3 u3 n1 \4 Y) s1 K5 v2 J
$ U" O* Y+ C$ x/ p if( pPlayer->GetManaPoint() > pPlayer->GetMaxManaPoint() )
5 T. W _5 |/ U pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );
3 u4 k2 y% q7 |; i/ |$ H% y4 F+ w" V
if( pPlayer->GetFatiguePoint() > pPlayer->GetMaxFatiguePoint() )2 v9 r2 N/ \: C& z) \
pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );
! f' j6 G. V2 O! K3 ~
2 ^# ~7 j& O y* a7 F#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver
& b3 v" H3 t5 U, w5 i3 O
. v' n' A( I: s. `" o6 T
/ u1 l0 z3 U3 M* K' V: |, ~ |
|