|
|
Hi I fixed the swap bug a long time ago it got tested on my server and it worked
' I, J' M/ |' q+ j" C% {/ y) \! ?I posted this because someone kinda posted a youtube thingy about it :O.
: g C+ T8 w D( |. Q) n' Y& n$ C
Find this in DPSrv.cpp @ worldserver2 ]8 J# Z4 ?) V0 L& o6 {9 @- i
Y! h# P' _/ E- xCode:0 a8 ~1 q# D1 X- R3 B. I( I
void CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize )
v a2 _0 i1 H3 c2 o$ k6 O3 A{9 Z& d& A. w/ q$ b- {
DWORD nId;; ]) E, @3 }, u; @2 j$ {
int nPart;
1 ]) C, v; G% U
( X3 }. ?2 E/ _0 L3 p ar >> nId;
t, T8 u4 e$ L& n ar >> nPart; & \8 `8 w$ Z- ~- g4 N% `# d6 g' p
8 o; M9 z/ Z2 @, N+ R9 j$ j if( nPart >= MAX_HUMAN_PARTS )
% [5 z L" u7 j2 Q return;& c; Y* c+ y0 B" S' p
3 z6 ?+ V# R2 _- Y' e9 D* d- P5 h CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it
9 l/ {7 F) |8 J- q2 ?! o! H( M: ^3 y
3 ?# n! C8 B0 @# MCode:8 w h, _: E k) _9 Q8 X3 o
#ifdef __QUGET_SWAP_FIX7 q/ Y$ K- H5 r! e7 m
7 {9 h" D0 C6 @4 N0 F7 B% U if( pUser->GetHitPoint() > pUser->GetMaxHitPoint() )
1 F5 r2 f, ^& B pUser->SetHitPoint( pUser->GetMaxHitPoint());, j% ~# n9 ^# r* |0 u
$ w" c$ @# d" J' J4 i6 d* X
if( pUser->GetManaPoint() > pUser->GetMaxManaPoint() )
# D% M/ \; ~$ z7 g pUser->SetManaPoint( pUser->GetMaxManaPoint() );
& t. \2 |! \5 Y- ^4 B. ^5 }6 y# p( J8 t# M: n
if( pUser->GetFatiguePoint() > pUser->GetMaxFatiguePoint() ), h4 q1 {! \' A0 b& V
pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );( v! A' W) A7 h0 B7 e
1 E7 O/ E1 R# U# x5 q7 A#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp
& a2 o% g; q( |( @2 u9 e* mand add under
* r' M2 x* B" O. I: ~; a D3 V) O/ T
# X6 K& }# `+ ~: i, q+ i8 iCode:) ^" @8 p' W, v& }: R7 y
if( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel )* ?+ V5 M" J7 a: s" ^7 B
{# `% ?) v- J5 M+ G( H( u, K+ L5 Q
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 );
2 L5 N" |* U# C0 C. } }this. P# D1 t n* o# W. D7 e/ Q$ {/ Z
7 j3 }& i% ~' [) `8 c% ]1 D4 P
Code:
4 h* L% ~! P: \' d& @#ifdef __QUGET_SWAP_FIX l' m" u1 G9 I3 v0 r* v1 j$ b
if( pPlayer->GetHitPoint() > pPlayer->GetMaxHitPoint() )& e- D' `. `3 b* U
pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());
! \1 B3 _! {# Y& V' \/ b/ K- l2 ^& A' o8 H4 m
if( pPlayer->GetManaPoint() > pPlayer->GetMaxManaPoint() )
9 e( \ |6 I) b( ^ A pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );
% p+ W. s) t4 a7 h9 c
$ |$ R# E* h) Z. f if( pPlayer->GetFatiguePoint() > pPlayer->GetMaxFatiguePoint() )
6 {% f: W/ f' x/ c# h: i7 K: i pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );9 L: E, Z2 U+ y5 z0 V+ ~5 P+ F: |
% l: Q5 [8 o# t; i- s#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver 9 R3 q. E; o# z6 V$ F
4 S4 h' h9 T) p7 s) k# r
, H ~5 B- p% t9 }# R' P+ n9 o9 F( X
|
|