|
|
Hi I fixed the swap bug a long time ago it got tested on my server and it worked
% T k4 D( d3 Q sI posted this because someone kinda posted a youtube thingy about it :O.- v- U8 I$ n3 O, U. s) j$ r
- R. L% {+ w1 ]; s# rFind this in DPSrv.cpp @ worldserver
$ ]& b8 k) ^) ^- o; @5 Q k" X) W2 t+ `0 I# U: s
Code:) O/ V! L+ V" U3 a6 [
void CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize )
6 X7 G7 |8 ]7 R' N7 t9 c" }2 K{; X# u3 ]3 ]# T6 I
DWORD nId;
2 Z% M i9 M% W% B3 T) u6 k int nPart;2 \7 X* K5 X9 ^4 T* B, E( ]! _
4 t# f) Z4 v3 a ar >> nId;
& y) m z. \; D" {+ ]9 }# R ar >> nPart;
. K& p3 A1 I \
8 q0 o& j8 q) O" y; v$ B+ k6 u if( nPart >= MAX_HUMAN_PARTS )
7 |; N$ \) u( j1 s return;' J& I" q2 R+ d w% W7 q
2 s8 u; b) x: R! V1 v CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it/ ~1 `+ j) L( d1 h0 s$ A7 M/ s$ z
7 R1 r0 U0 }/ p: n* K7 ~9 A. G# X
8 ~' Q/ T9 v3 O+ tCode:
! I0 d+ e; i% Z! l#ifdef __QUGET_SWAP_FIX
4 K, o. U) e, F' F* U i% b, H/ X2 s* C
if( pUser->GetHitPoint() > pUser->GetMaxHitPoint() )) z# f% a4 I/ z; W3 L$ p
pUser->SetHitPoint( pUser->GetMaxHitPoint());* M" c j* }' I' E0 W% [# b
1 G* W" s' x, |* b: v if( pUser->GetManaPoint() > pUser->GetMaxManaPoint() )2 ]6 Q' }6 K; Y9 X
pUser->SetManaPoint( pUser->GetMaxManaPoint() );3 K/ m4 ~/ q5 f% J) ]9 w
8 |& v8 C, p) F$ S+ S. Y6 @
if( pUser->GetFatiguePoint() > pUser->GetMaxFatiguePoint() )( X4 ?9 @6 b; _( s5 B
pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );2 ^+ f6 `1 W: s9 a( K9 I+ a
; d$ M* q( K2 x; O8 ~( F
#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp
% r5 j7 D! b/ x7 X$ W8 ^( s+ @and add under
* W8 D' d- u" r8 i
8 A6 v# [3 u HCode:
o% a: W0 V* v# h9 ~& _if( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel )/ @7 w5 N0 T q
{
2 a9 ]3 Q2 O4 {* w+ W. P 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 );0 Z4 c+ ]$ e9 k( U* u {
}this
0 A9 z9 v% y* O& y. w0 t
5 ?. `( i3 N4 `9 T4 a& ^Code:, j' w* B- g6 C3 a
#ifdef __QUGET_SWAP_FIX
" F& s3 h5 j8 ^1 g$ X% T; K9 J+ W0 n if( pPlayer->GetHitPoint() > pPlayer->GetMaxHitPoint() )
& T* ?1 q# F0 @3 c3 S1 i pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());
0 e$ [# k4 E3 i+ Y& ^8 g0 G
3 v {; S# g! Y" d4 ]( o5 y if( pPlayer->GetManaPoint() > pPlayer->GetMaxManaPoint() )8 }8 h1 Y' X+ P" \
pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );. N( ]6 W# `$ F' F
& }2 F2 M1 y8 p+ L3 K+ i$ {2 z9 e, W! J
if( pPlayer->GetFatiguePoint() > pPlayer->GetMaxFatiguePoint() )4 L C! m5 f9 V' D9 b* v9 b( ^% g; F
pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );
/ ` N% K* R! ^% E( g6 @! s$ P7 R' `- w, a+ m
#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver 8 ~5 t7 M X0 H8 A. w" p: A& K$ N
9 Q' d7 ? o4 c9 d
: D' y+ j+ e0 s% J( v6 E |
|