|
|
Hi I fixed the swap bug a long time ago it got tested on my server and it worked O- H3 m( t9 Q' t& C- Y3 ~1 B
I posted this because someone kinda posted a youtube thingy about it :O.
+ a4 Z" G0 g& @3 s3 x. d2 S8 I+ @1 Y& W( k2 p, I/ O
Find this in DPSrv.cpp @ worldserver
! _& X2 v: U! b1 d/ e
/ u! _; y1 l, n! x) i8 r9 F5 [Code:
! l1 k4 H- C8 I* Ovoid CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize )
2 B+ ^3 O- }. p8 o; Z{) I. P/ U! [2 ` f& n- r+ W0 R. G$ i6 I
DWORD nId;8 N2 h* s- P+ c, n& i# N% s
int nPart;( i: P( d7 n+ Q7 X
" K2 ^8 J9 v% S' \
ar >> nId;5 `! M6 X! o0 S7 E2 Y3 ]. r- s6 ~
ar >> nPart;
5 F" J, }# r% [! D n5 V * b) t* l. {/ N
if( nPart >= MAX_HUMAN_PARTS )
- L/ M8 _$ Y; x return;# ]3 a ]( b2 N M9 d' F3 ]
( l2 {" _2 p% M; ~# k8 r CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it
$ _2 U8 J# |% O& x) [' Q0 A" S( M9 k! h1 o- ~8 j# @: d
' _; r6 c9 S; o% s- z/ {! T
Code:
T0 r/ P# G. K& U' p#ifdef __QUGET_SWAP_FIX
- ]( C1 E1 z, M7 p" o- K
- t1 `8 a5 _6 J: T" L7 c0 u- S if( pUser->GetHitPoint() > pUser->GetMaxHitPoint() ) D( E. y( ?: x$ P
pUser->SetHitPoint( pUser->GetMaxHitPoint());1 h9 h: ]9 I w, u6 m6 M
. Z! W; j& j [2 I
if( pUser->GetManaPoint() > pUser->GetMaxManaPoint() )! l8 E4 P) N% q+ F; I f* E9 t" z
pUser->SetManaPoint( pUser->GetMaxManaPoint() );- I7 o) E* ~' h3 r3 c, v2 W# z6 K
: O+ \) x7 z( w8 A+ ~
if( pUser->GetFatiguePoint() > pUser->GetMaxFatiguePoint() ) c6 f1 e6 a+ k" c' R2 A+ @
pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );3 O1 w2 R; `9 a
7 U$ \7 g: E) ?6 N#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp
; M. h+ U* A' tand add under" l2 A4 s; b7 r
, q# U1 U% T% X$ ~
Code:
) {$ ]/ C. p8 K2 l# E( F/ Jif( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel )0 y% q" @8 e3 m" H
{
% P6 }$ t: e& C6 w/ Z) _1 R: ~7 C 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 ); V/ h8 W( i+ u: z6 G( \. r* ?8 k
}this8 v0 D( e1 V/ [/ X1 E! Q
X# ?3 i- N* e. L+ rCode:+ f# _2 E- w* n+ i
#ifdef __QUGET_SWAP_FIX! F0 w2 h9 i% ?' {$ ?7 B+ `5 I% c
if( pPlayer->GetHitPoint() > pPlayer->GetMaxHitPoint() )6 [% G! k1 A. q' E* ]2 [2 @
pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());
) u! R: F6 \0 H/ o' L3 I: Z
g2 Z( {3 P. @6 Q if( pPlayer->GetManaPoint() > pPlayer->GetMaxManaPoint() ) b9 \% D! ^$ }4 c8 f% j
pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );
C; N! q u0 X: I- i. \+ v7 w, N( h7 i4 }6 S" h
if( pPlayer->GetFatiguePoint() > pPlayer->GetMaxFatiguePoint() )* {* z0 G- v/ i J% M
pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );
( q% g! ^* z, p, ?# f1 Z0 _! t7 i! \/ ]( B1 [6 B
#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver 4 b" o3 _! t, z5 N$ ]+ Z' t- T
8 J1 }: J$ J$ c' @# j- G
* N4 k2 U( c1 m7 H |
|