|
Hi I fixed the swap bug a long time ago it got tested on my server and it worked
) R7 h5 l' b& ^I posted this because someone kinda posted a youtube thingy about it :O.
0 t4 |" p1 r( [$ x' U) Z1 b3 {
* `. G% [8 i5 A0 B1 iFind this in DPSrv.cpp @ worldserver3 E7 h0 F8 z; B1 H
1 E9 B, `; Z# c6 y+ P9 U
Code:
7 c1 q% x7 E$ f+ R y* Bvoid CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize )- T9 ^4 a( T2 [. `. Z
{
/ f$ H' X) u& w" V DWORD nId;3 z, i9 c; k: b) P
int nPart;- ]$ d1 Q/ |2 E: k# }) r9 c2 e
+ V4 H7 E7 d; @3 u9 u) X
ar >> nId;+ j0 I6 _6 K- s- u% V3 ?0 i0 i& g
ar >> nPart;
$ j: J' R- B1 w. F$ {
O$ H! @ h, D A* U, ~ if( nPart >= MAX_HUMAN_PARTS ) - h7 I5 J, g; v- H' W* O6 C* j& o
return;9 j' O* S9 g% u" j; ? v
( _' M0 A- @" Y CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it" U& v" C1 Y! u8 h9 @
+ c" A1 x: |6 A5 a9 c' T4 o7 Y( [7 J
Code:
3 H( ?! F2 e" g* r. J! z#ifdef __QUGET_SWAP_FIX
7 {5 `% {, w7 q4 ^9 k# q
9 k7 b% M6 N9 g; ? if( pUser->GetHitPoint() > pUser->GetMaxHitPoint() )
; w" a/ ^/ F4 M& U. ]& h% a pUser->SetHitPoint( pUser->GetMaxHitPoint());
9 B7 t; o+ j& y# U5 C2 h$ F$ V$ N( e0 Z, I
if( pUser->GetManaPoint() > pUser->GetMaxManaPoint() )
, E* J! _+ s" d pUser->SetManaPoint( pUser->GetMaxManaPoint() );3 b# ~6 } l( t( b
& e, d! Z* q2 O9 o7 }
if( pUser->GetFatiguePoint() > pUser->GetMaxFatiguePoint() )
h8 N& W T) J0 l, _ pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );
6 }! g) Z& u/ \' d- Z v
7 p' }7 H" K1 z5 D# x#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp
/ ]# o) w h( m1 }6 Wand add under: V. j1 x4 t$ `5 R5 U# U6 q
5 m1 I$ i2 N2 T6 }; U7 D* V" C
Code:
. r8 v0 o/ L8 V$ Bif( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel ) A9 v3 h; Z# W- j' t
{' c+ e* F3 m/ A! P' ^5 a
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 );
+ h- D+ ^" L$ i, T2 ?: Q% x9 i }this
! l5 J8 V* z# W$ M$ l0 s; v4 J& o, R1 O
Code:4 l* F# x l. H
#ifdef __QUGET_SWAP_FIX$ K: v2 U) @( [# g1 Z
if( pPlayer->GetHitPoint() > pPlayer->GetMaxHitPoint() )
9 [+ o( ]- u$ g& e2 J pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());3 c% W+ ?, v* d9 A. X: Z+ m5 M
$ B; D2 f0 a0 X- @, J3 E4 _7 H if( pPlayer->GetManaPoint() > pPlayer->GetMaxManaPoint() )! Z! m8 S. ?9 F: t1 Q1 u7 u" |
pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );# `- a; Z, V3 T4 R$ s+ c! U/ r
! ^8 k+ p2 p# j0 I9 {: y* W5 W6 P if( pPlayer->GetFatiguePoint() > pPlayer->GetMaxFatiguePoint() )0 I; z$ ^1 @: H+ L9 ?
pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );
7 O! P: R, p( {3 g( F
9 W' Q, i8 w. b% r6 |3 u#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver ; L6 x2 i; w0 v: i8 Y1 c
( j/ {% q8 N& l3 h! @2 g l
U, s: l6 H( z8 I |
|