|
|
Hi I fixed the swap bug a long time ago it got tested on my server and it worked 9 q: H9 L! u/ D
I posted this because someone kinda posted a youtube thingy about it :O.. D* I6 U( T0 @& N, ?" d
; o* {9 K6 C* K) e0 C4 V2 A
Find this in DPSrv.cpp @ worldserver* U) j/ i8 f7 Q% P, J% r
7 j; D( q% }6 A# v" q# g
Code:
6 I- i5 o4 a8 {5 N, k0 L" m' v3 ~void CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize )! I4 {9 O C% W" f) J1 j
{2 ^' i- A! g% ^/ o' v, g
DWORD nId;2 W3 {( j& k/ U- n% [
int nPart;, G0 ?$ w) }3 X2 z
6 r, Y; v$ n2 T# w; U# G ar >> nId;
$ m0 ?) K2 ^6 A+ q8 w$ L# a ar >> nPart;
& J2 E5 j, ^6 n* ]5 z9 G; [( F2 B( b7 ` 9 x" ?, F/ U l3 M2 B% j
if( nPart >= MAX_HUMAN_PARTS )
6 G2 c. V$ `$ g- S# n7 m return;) h4 k% ^: i+ t; d1 t2 z
% i8 i) y: D; B4 v& L/ T
CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it
2 ^4 t2 ~$ D5 Z) z3 x; z8 Z; }! J3 a% y/ D6 H! i& l
6 D) T3 L- k3 S0 P5 nCode:% ]( X9 z! ?* j% {0 d! C' @- V
#ifdef __QUGET_SWAP_FIX
+ Z9 n4 \! Z2 H6 U$ K. j
! g b; ]* o3 `3 X0 f/ u- B if( pUser->GetHitPoint() > pUser->GetMaxHitPoint() )
$ ^8 i+ T8 F& A+ s3 w- l" y1 Q pUser->SetHitPoint( pUser->GetMaxHitPoint());
9 m ^" i& d3 S2 @# m* A" A' s( r+ |, S
if( pUser->GetManaPoint() > pUser->GetMaxManaPoint() )
! P: M' T: [' n' L2 F) \ pUser->SetManaPoint( pUser->GetMaxManaPoint() );9 Q9 V1 |" M+ s: z
( ?- x S/ A, u! S9 L# q" s7 e% g if( pUser->GetFatiguePoint() > pUser->GetMaxFatiguePoint() )
( m3 Z& g1 B: \ pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );
, X: L' o" I# ]- P3 N, M; }- z2 X0 [- {) K v/ i( U% M
#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp |4 M% W0 Q ?; Y V- ~! k/ f s# Y
and add under
7 R! ` b+ Z7 s& v# h
* n4 f& }4 |9 Q2 @2 K) ACode:% z; s+ _! h8 l& Z) _
if( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel )
6 I+ O6 F) O% D0 {% x {
n3 R6 f* F0 z3 n# r 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 ); w# I1 L. l) x" V
}this% X6 ]) }2 K. z: x
* I! i: p4 Q _: ]
Code:" B% q7 L+ N0 G5 V; ~
#ifdef __QUGET_SWAP_FIX
: u: S5 z) J7 @9 D/ R9 y if( pPlayer->GetHitPoint() > pPlayer->GetMaxHitPoint() )% u- }4 m( g @% |. }$ y
pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());
- s# S' j$ n: R! a
- A Y9 G: b d4 [; v3 ^) P6 ` if( pPlayer->GetManaPoint() > pPlayer->GetMaxManaPoint() )
; {0 t' R$ }0 Y) h, R2 f9 J* e4 a pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );: G4 R' S' V* s5 g/ A5 m9 ?6 f
! U$ S T5 M2 G; T/ z if( pPlayer->GetFatiguePoint() > pPlayer->GetMaxFatiguePoint() )
x! |8 `1 @8 b/ h; P pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );2 }" u; s; Z6 p* ^, B1 E1 R6 D
/ ?! P) j* {" S, E4 U @: p
#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver . G7 n3 o1 N/ o* F0 r9 S5 J1 J
( y" R! `- z8 O) ] u% q; W9 Q+ E! F2 j, n' H, _
|
|