|
|
Hi I fixed the swap bug a long time ago it got tested on my server and it worked + p) [8 |5 I+ m3 y4 L
I posted this because someone kinda posted a youtube thingy about it :O.
# j1 L" T4 `. B. X( M: K4 R9 `4 [2 c6 @; U
Find this in DPSrv.cpp @ worldserver
3 ^' Z% n3 e1 t, R, @$ ^5 M: R" x6 }1 C
. I2 H g- E& ]Code:
/ |! ?6 c' A% y. } f o: N. Yvoid CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize ) b4 R+ w3 ]8 E/ e
{
6 }9 v( X2 B! c0 ]) F6 q DWORD nId;
" w* {, e" C3 I1 k7 R4 g. Z int nPart;
/ D3 {) V4 G2 y% F; U" q' @1 ], b. M' m9 B4 n
ar >> nId;
5 L9 c2 h: t* S; h ar >> nPart; q; R% r3 v- d* U+ c- e: {
/ B; q) L3 m6 n
if( nPart >= MAX_HUMAN_PARTS )
; s% O9 `9 `" c8 }) H return;
5 p9 m& L0 M! G: Z9 i: h& o* |1 I3 p# O+ R6 `2 M" U1 u
CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it5 Y) r% q x5 B8 s; c# g8 i
6 X# q1 U+ m; X2 G/ M0 u' m: [' {7 u4 [ y& J ~" o# H
Code:
; ]4 ]3 k6 j R* F7 v#ifdef __QUGET_SWAP_FIX. S5 ?9 W0 Q2 G* R$ a
" Z2 |2 x, }6 v: v' a0 Q- c) ?
if( pUser->GetHitPoint() > pUser->GetMaxHitPoint() )$ j) @0 F' }# w2 B+ u
pUser->SetHitPoint( pUser->GetMaxHitPoint());
7 F3 A+ n6 {1 q K h
, Y. P& h8 K, |3 b h% i% j if( pUser->GetManaPoint() > pUser->GetMaxManaPoint() )
2 d9 o$ p) {7 g, i$ t pUser->SetManaPoint( pUser->GetMaxManaPoint() );
. I7 j6 h3 |! t$ N. N2 I: T
" u/ A; @; ^, L. X5 w8 P/ g if( pUser->GetFatiguePoint() > pUser->GetMaxFatiguePoint() )
$ r V* j# C$ q8 s( g pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );& r+ J/ D; J; t0 ?- q+ L; ?
Q; F: j# [0 B% F' |9 t#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp0 @9 w s# F$ C
and add under3 k" Z' F$ }. Z6 h+ i# f- L A: m
* _* R4 H' M. z
Code:
# k6 _+ H4 K& u. R. l5 ~% Y' Mif( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel )) j8 M3 W v4 b! I2 g- K- q3 r7 X. D! R4 T
{4 x3 z* `: \1 u' r9 {
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 );& S# V9 V, _- L$ b
}this
/ z; ?* b( j( ?/ ?0 W& z% z1 x1 r4 c5 A @3 ^: Z
Code:
6 E6 H- ^) J R3 W$ y% i- q#ifdef __QUGET_SWAP_FIX, d" ]( l6 R4 d
if( pPlayer->GetHitPoint() > pPlayer->GetMaxHitPoint() )
1 u, [- S" r; K3 H1 d6 s$ ? pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());
3 P/ u& o$ f6 H" [$ B2 l$ `% f5 }. B
if( pPlayer->GetManaPoint() > pPlayer->GetMaxManaPoint() )* Y* e0 T' a! Z2 J3 _: o4 Y
pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );; E; N% j) `( V8 n7 G
$ w+ G7 H# c7 [9 f if( pPlayer->GetFatiguePoint() > pPlayer->GetMaxFatiguePoint() )$ a$ A7 |. m5 e' e5 {
pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );
2 V4 `; a- d; q! `. P7 Y
) H6 b# q1 h9 s6 O1 H7 P#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver
8 y" r5 O2 V1 l$ N' \& B: g3 I& q4 l: v
6 j% x# P6 u# {9 [: G |
|