|
Hi I fixed the swap bug a long time ago it got tested on my server and it worked
- D7 Y6 \8 p1 TI posted this because someone kinda posted a youtube thingy about it :O.
9 W" ^! _ R9 }, W
5 V& e$ @% s6 wFind this in DPSrv.cpp @ worldserver- d& Q. u2 \; {$ P( n
; U0 z( @7 n4 F: C1 sCode:1 t Z3 z: e) A o4 f# H1 Z
void CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize )/ s' w; ]3 I! S/ N" |; p& G% {! ^
{1 g, Q' _( I* A$ s
DWORD nId;
6 k. ] ^. W; j, N2 {! E$ K) J+ T( W) V int nPart;6 ]7 _' b \+ h* [
- ?, |3 b! k0 D. `( M* q ar >> nId;: X9 I' C' ]" C: [
ar >> nPart; 5 ]8 H; G1 b% ~" J9 Y- M
* V6 y( \; R, ~: ?: v* i a if( nPart >= MAX_HUMAN_PARTS )
/ y! C/ s4 Y# r- M: I5 P% I: ]/ J return;
, M- l$ m& B/ T4 |8 c
+ k9 r+ F7 G1 v% D/ {$ r CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it
1 s9 F6 e1 f3 z: J, h i
# O( e4 s3 f# A0 n: @
3 R, b$ E/ E6 d7 L3 h: g0 _* ]$ Y3 SCode:9 \" z( j* p: l9 N: X) J' [, j1 ^
#ifdef __QUGET_SWAP_FIX8 h5 k) L3 E. Q3 {; y+ ?
" _1 i; y( m! G* o if( pUser->GetHitPoint() > pUser->GetMaxHitPoint() )! }2 [9 {; b7 c: q9 ?7 u0 b
pUser->SetHitPoint( pUser->GetMaxHitPoint());" \* A g$ e5 _' r4 r6 R+ u
# @' I3 H& u, ~# V" P% [# B9 k7 n! m
if( pUser->GetManaPoint() > pUser->GetMaxManaPoint() )' n2 B' A2 N6 }
pUser->SetManaPoint( pUser->GetMaxManaPoint() );
% [/ D. O; @! ~9 ~: Q* n! v, i8 a0 z' a9 E* l4 F
if( pUser->GetFatiguePoint() > pUser->GetMaxFatiguePoint() )1 r+ D) A* N2 F- q$ Z' g) y F
pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );/ K0 t3 a& [2 W$ ~( O
2 ]# g/ {$ v- X5 A
#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp
, N- y% E+ I$ W9 P" E5 ]: ^and add under
# n8 O! w' Y- F: C9 K6 t1 \) N, H2 N0 l# x) J
Code:
p: |, o+ g Q! I0 P' Dif( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel )& W8 A) X" F# o$ P
{
2 @( |6 G& ~0 x7 u; y2 u" t 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/ `- ~4 `8 `* h
}this
9 [7 O: q* p! [" J
+ ~) a3 A9 A9 ]( t. b; ^ f7 G hCode:
$ W- d" S( ~& w6 T#ifdef __QUGET_SWAP_FIX
7 g+ Q- i% r- @& V if( pPlayer->GetHitPoint() > pPlayer->GetMaxHitPoint() )
5 A& }/ e) f$ P. h5 ~4 u9 k pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());7 L+ d5 f3 f+ J/ G
- Q1 [1 j. M, ~# d0 T8 U0 W
if( pPlayer->GetManaPoint() > pPlayer->GetMaxManaPoint() )/ Q9 b' C& \6 E$ R
pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );
/ y* R" @% G6 f3 i/ O k2 y; g5 O* T; b% j: m
if( pPlayer->GetFatiguePoint() > pPlayer->GetMaxFatiguePoint() )
/ R$ u$ I& R; {$ [3 l6 } pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );
- a; ~" O! x% w( A9 @) Y6 a7 L% E- R
#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver
* b1 h. M& D4 [, m/ B9 z R: }" K6 O( w# |7 h0 z
9 Z5 i* n6 q- p8 n% r# z( ~; i |
|