|
|
Hi I fixed the swap bug a long time ago it got tested on my server and it worked
* U4 T5 D; ^+ @# l( o, L% _I posted this because someone kinda posted a youtube thingy about it :O.
. u% H+ F/ }/ U. w# I1 s/ D( `6 X" f% Z' x# K3 f& E& p& M$ I
Find this in DPSrv.cpp @ worldserver/ c: ^$ d3 ]6 H
. o1 a3 o/ t' V/ \- jCode:
# {- D3 v4 V0 I8 G$ a! I b+ Zvoid CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize )$ A' ^; n v# m. U8 s! Q
{
5 r1 G* _, P4 }8 Z4 M7 U DWORD nId;
) q( n8 a2 K0 G( `; B' r int nPart;
; p* i" Q( F9 D3 w
3 ~( @- D0 y4 h( o ar >> nId;6 S7 G/ p/ {7 n
ar >> nPart;
: M: S2 v7 H# A! ^- g
4 w0 ~6 r* M/ J- i$ D* q if( nPart >= MAX_HUMAN_PARTS )
5 Y* Y# _+ v7 ]8 Y return;3 ^" [- M- B' O1 ~0 h. K, g
, J' @" G' v' V. F7 [5 B
CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it
" x3 |1 L. m" d" e3 \0 L
! F% f& M9 ]( W7 u- [
3 Y. n8 k B t% J! [# p) n4 wCode:
$ A [6 o" j: Q1 E/ u#ifdef __QUGET_SWAP_FIX
* i h: H1 w; M/ ?' B9 N
# ?( t: ?' @* i o1 ]4 A) z if( pUser->GetHitPoint() > pUser->GetMaxHitPoint() )/ ~1 K; o* W+ {: t) M, g* b
pUser->SetHitPoint( pUser->GetMaxHitPoint());. b- i; W) A& a7 c
! M( q2 u! E6 C" u if( pUser->GetManaPoint() > pUser->GetMaxManaPoint() )# i( O) i* P7 {4 M1 G
pUser->SetManaPoint( pUser->GetMaxManaPoint() );
$ q( r8 \: ?9 t& J' p" x, E6 _4 z' U6 x: A
if( pUser->GetFatiguePoint() > pUser->GetMaxFatiguePoint() ): q6 r+ C# g* R2 F \( S" B
pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );
9 ~9 R) w/ {/ S0 W9 N( w7 u. [1 @2 f. j0 m f
#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp3 @/ T1 n/ O# B+ e. I, r, L
and add under& y7 Q) j; J, l" @9 S: Q
- ^& d4 n3 H7 [0 ?" v+ VCode:
2 ]' q% G9 @/ Z% r, o4 ]! Mif( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel )
3 D! ]$ B2 [& r8 d {
* r% R1 ?& f0 K- q5 Y# R- B 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 ~8 j6 e6 A6 _% N5 v6 R }this
0 d- l: H8 {0 Y% ]; Q# X/ s7 K# E7 S7 t4 U+ E( E7 ]* c+ i8 b
Code:
9 d- i5 e% D# E' ]4 T( l0 d- [#ifdef __QUGET_SWAP_FIX& s8 A6 t/ Y l' K/ m! V
if( pPlayer->GetHitPoint() > pPlayer->GetMaxHitPoint() )9 Q8 N# ] Y' I9 `) D! ^5 J! p
pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());
5 O: I. S- {3 `" N1 H$ P1 V9 [$ G1 K( N# j \/ `2 r& U2 E
if( pPlayer->GetManaPoint() > pPlayer->GetMaxManaPoint() )5 u: ~9 Z" \0 |6 j; j
pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );7 x, v! |* j7 G
4 ?& k# E4 \/ |; p, ]
if( pPlayer->GetFatiguePoint() > pPlayer->GetMaxFatiguePoint() )$ Z6 {1 B4 D' Z3 f6 \0 O
pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );5 d" ^5 U& }4 H- ?5 I. W" y
* Q" q! ^% ^0 P; r) {7 R2 L
#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver
7 S7 c5 m9 g7 w% p6 E& X
: }! M2 a$ d) X) J& J- H7 I+ O& C
6 a8 L' o1 X% q& f# \ |
|