|
|
Hi I fixed the swap bug a long time ago it got tested on my server and it worked 4 p& I) h8 Q! W/ Y2 _
I posted this because someone kinda posted a youtube thingy about it :O.
8 j( v0 z5 o" H( `; h+ j! Q" z% y4 ]( |8 J7 z7 A3 x
Find this in DPSrv.cpp @ worldserver
: R& g5 ?' u# V( s5 z+ \7 k9 s
! J+ k Q" \+ V2 lCode:
3 g5 U+ q" Y+ Z2 H( V6 p" T# xvoid CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize )
2 q' t/ v2 C6 M9 {{: t" N! ?2 J2 s" z% S2 W6 ~
DWORD nId;0 U" d) d1 E$ \. C
int nPart;! b0 F5 r& O! y
9 \$ Y/ S) n% k" n' C
ar >> nId;
/ _- }+ k0 }# f( s) L) Q ar >> nPart;
t' u: [* B, C% Q9 ]
# U6 M, L N4 y9 P% ^+ H1 }' u if( nPart >= MAX_HUMAN_PARTS )
% k" R1 B' R9 X4 F+ I! Y! h \ return;
; n7 p8 L ^$ t8 Q. {' i% s. Z6 e4 }- a& B! ?! Z5 s
CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it
, T f, |2 F( f- z: W& Q5 M$ b" y) s6 z0 F. W" A9 Q, s
+ a7 @) u/ Z8 P6 b) M. b6 `! w8 sCode:
# E h$ @9 `2 y4 @6 P9 n9 D7 T% Y. V#ifdef __QUGET_SWAP_FIX, z# w( H9 ~( D O* U: G
, I0 l" z5 [7 u$ u
if( pUser->GetHitPoint() > pUser->GetMaxHitPoint() )
8 ~" t8 |# V8 v2 J# t$ P& E1 A# D pUser->SetHitPoint( pUser->GetMaxHitPoint());) Z+ [: k0 r, p6 B X0 q
7 D x! R# B- H; R( f" J if( pUser->GetManaPoint() > pUser->GetMaxManaPoint() )
/ F: a1 N/ `1 I pUser->SetManaPoint( pUser->GetMaxManaPoint() );' T$ |, }1 ~( @/ d. r! a
: }7 ?" y. I! w6 z9 ?. a
if( pUser->GetFatiguePoint() > pUser->GetMaxFatiguePoint() )
* D% t: Q& d3 Y# e: W' r. {# f pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );
Q+ k0 ]' g' P* {
( t2 [( H* B3 O3 t" W6 x2 T#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp
, o" B6 e1 C) C0 Wand add under
p- T# G5 k% z3 Y1 p {# o7 e1 D
+ S l: c1 |% sCode:8 q) ]# K8 u, o: N
if( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel )
. ^2 C. g( [7 {1 B, T. y# \ {: ?& \- f) A# C& a3 q: t* j' U) _9 v
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 );
. c" f6 k2 C; m2 x9 D: C# `# x }this
5 P: b; w" }5 S' Q* G: O! a: ~
7 x' L( C4 X6 {7 f: N1 H |; Z( bCode:
" K7 h2 I& s6 i9 v2 j \#ifdef __QUGET_SWAP_FIX' {4 o" c6 `2 c1 c! Q
if( pPlayer->GetHitPoint() > pPlayer->GetMaxHitPoint() ). @7 U2 ]; E4 H2 e. b) |
pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());9 q% @/ ^6 q% s. b) a2 V! c
: ?$ z7 d" y \2 Z8 Y if( pPlayer->GetManaPoint() > pPlayer->GetMaxManaPoint() )) D; A( G# d! `+ Y/ n
pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );
; P$ U" ^' m6 v4 w" Q, Q! b2 n, B$ i8 w/ T2 j5 g1 T+ D
if( pPlayer->GetFatiguePoint() > pPlayer->GetMaxFatiguePoint() )2 Q/ U5 A# O8 J8 E
pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );8 O3 U- F2 v2 A6 U3 L
; C/ t/ ]8 \7 g& [& z#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver
6 T {/ x6 Z+ @* C4 `$ o7 V+ \: S/ Z9 o. }, }4 ^) B
- {' y! I# d2 n) X! V5 F |
|