|
|
Hi I fixed the swap bug a long time ago it got tested on my server and it worked ( z) t% N% q6 n- y m
I posted this because someone kinda posted a youtube thingy about it :O.. n# a0 ?1 Q" [5 @+ z. L. e7 n* `
1 a" ]4 g8 D4 L
Find this in DPSrv.cpp @ worldserver
3 M% a" j* a1 ]$ C7 q
- Q7 h1 B$ N2 \2 i+ u% wCode:
0 O/ l1 ^) M4 T5 [ Q2 |5 V: Nvoid CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize )
$ V, K' W$ w+ E/ Q- Q4 r{
! q" K4 N& F# [$ v* B' O DWORD nId;
r* m% t. h4 B, U6 y int nPart;
' M7 f8 V7 Y0 ]! H. Y, c- |
V4 t5 G- a$ d3 A$ F7 a ar >> nId;
1 K2 ]- ]) T: C. I5 q* U ar >> nPart;
& F. X) ^3 _' P. g9 K
, v' z1 H5 f7 s4 }/ S0 p/ t& o8 G if( nPart >= MAX_HUMAN_PARTS )
+ c4 t" D0 [! G) d0 ^3 v/ W return;
9 i( r/ A2 J! h$ m6 I
{4 H* C; ~, Y+ Z CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it! z( x& c1 r% W7 t
7 W& q4 S) L) P3 H3 z
8 n6 ~8 [" z, ? e/ z- zCode:
3 e- m; h& n& p, o {! z#ifdef __QUGET_SWAP_FIX
! |# J7 a# ]& F- h" ^ e" q- z; d! E- f9 D9 B- |
if( pUser->GetHitPoint() > pUser->GetMaxHitPoint() )) ?- K% @1 r& h3 C$ z
pUser->SetHitPoint( pUser->GetMaxHitPoint());
5 b; ^# ~9 k5 ^+ A% M9 x" D% o
3 e) x% k1 B6 m) I% z+ J6 g0 [ @ if( pUser->GetManaPoint() > pUser->GetMaxManaPoint() )( h* {7 j+ }1 ?! h
pUser->SetManaPoint( pUser->GetMaxManaPoint() );$ h9 H5 b* P/ a I! L
( ]4 n9 b6 V5 |+ b/ z7 O) t if( pUser->GetFatiguePoint() > pUser->GetMaxFatiguePoint() )/ y! D" ]3 e8 S K/ J
pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() ); h6 H$ Q$ @9 Y6 Q
) Q* ], ~: i" [% L" M% U#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp
; I6 Q9 i3 I8 C3 D7 a. F, Dand add under3 ~2 u; |4 H: n6 ~# Z# h2 }
3 `! F- h2 t6 {7 @Code:0 i7 I Y, z# `0 ?) F4 w! ]# w
if( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel )
, a3 o/ G* F' i( L. W7 D {, } p+ k- _. |" E! c7 b! U' [
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 );6 V' k0 t* B4 k# S: D) j3 R- B+ u3 D
}this
( x1 G* }& |$ O0 K2 b2 i9 Z4 ^" i% b4 c/ z# z
Code:3 z3 ~: L8 o4 r* Y; l4 l
#ifdef __QUGET_SWAP_FIX- h% t# A! r6 B9 \
if( pPlayer->GetHitPoint() > pPlayer->GetMaxHitPoint() )1 N8 [6 p9 R+ Z2 @/ c
pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());
/ \* p7 _/ B1 t3 y! @
* x) J. W# T6 y if( pPlayer->GetManaPoint() > pPlayer->GetMaxManaPoint() ). N( {2 l: G4 h W' }1 l/ Z
pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );
- h$ J# c* E8 A! A3 i9 K6 z# c! I8 h
if( pPlayer->GetFatiguePoint() > pPlayer->GetMaxFatiguePoint() )
: @( f% s) P, @# C# ~ pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );. B, ~. q% g" E+ G0 `+ `
$ U4 `0 w; N. B p E8 `#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver
s0 ^( U7 ]9 T4 H% n) w4 c2 i: P- F5 V8 V% a
' }3 W' M6 ?- s
|
|