|
Hi I fixed the swap bug a long time ago it got tested on my server and it worked 4 m8 c( _/ R0 {
I posted this because someone kinda posted a youtube thingy about it :O.: f$ V" W& S' Y6 z4 b% H
7 _ |# k7 A I
Find this in DPSrv.cpp @ worldserver
9 H$ }4 l" G0 v6 `; A2 ?) X7 v4 K! Z+ z, T% z
Code:
' \4 ?! x: d' e& x+ Q6 V% I* | lvoid CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize )# @# t" E; K7 ?# J. A
{
- G- ?0 n4 E/ i8 d DWORD nId;
" a3 L/ `( g4 |' [8 O int nPart;7 @' p g/ s" q* P
( K+ L% H7 z" e ar >> nId;
( S5 A$ [* d$ b1 ?0 M# h H ar >> nPart; 1 L g ?$ \- Q! u
; W) q3 B+ ?1 C% M2 D if( nPart >= MAX_HUMAN_PARTS )
0 d, {& `6 P K+ O3 g4 E& M, p8 ] return;, H3 x8 L3 _" S! Y3 c/ w& c8 N
% B9 j5 W2 a% V: S j3 F CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it
7 w3 V1 `/ @! `3 b, M% [$ N6 N. D: c; c L
5 F! Q2 q/ G C1 jCode:1 [# n: `3 y( O9 n5 r
#ifdef __QUGET_SWAP_FIX6 U. V9 m; Y0 ~: |
" y H: Y/ t R! Q! d
if( pUser->GetHitPoint() > pUser->GetMaxHitPoint() )
$ R# y1 I1 o, A pUser->SetHitPoint( pUser->GetMaxHitPoint());
2 l$ Z$ V2 x2 N1 e6 y- G- |' |6 i+ U Z
if( pUser->GetManaPoint() > pUser->GetMaxManaPoint() )
+ C4 {/ i0 }& S9 K& Y! }+ G: x4 ` pUser->SetManaPoint( pUser->GetMaxManaPoint() );
# \9 E' S( ]+ }* R( N6 `' W! Y) `) b$ r
if( pUser->GetFatiguePoint() > pUser->GetMaxFatiguePoint() )5 w3 M! H! a+ f$ r
pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );
& A: K$ F2 J$ M! Q4 J6 y" b/ [& l0 u9 X/ J+ u
#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp
8 h- E' H( P1 n4 i$ \! p! Xand add under4 ~" Q5 }3 x' w' p+ m, q3 z% a/ |
. u1 F" ^% u/ m+ |3 ?- t1 f9 n( U
Code:3 F5 a* D1 G1 d5 T2 D4 b4 c& c7 S
if( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel )
, f/ G/ }) G1 M* W9 B- h) y {5 O4 _* A1 h; |9 c' }
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 );
% g- F9 K% v" W }this
" e2 r m3 s0 B: d w0 p I
7 Y' Z! V! e3 n4 GCode:
0 H, W# U# S7 n#ifdef __QUGET_SWAP_FIX
7 j- u2 Q8 _1 M5 D6 f- T if( pPlayer->GetHitPoint() > pPlayer->GetMaxHitPoint() )% p Q, u/ J. W& e* a
pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());
- s: z. ?" n3 }( D# e' ]; c# L, M7 E3 |1 o
if( pPlayer->GetManaPoint() > pPlayer->GetMaxManaPoint() )
3 I7 H: X# u8 ~# S! T% D pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );
1 w& _( l% o4 F+ C) {) K) z# M4 Z
! E% {7 n: W8 q/ S4 J0 T/ {- B2 \% I if( pPlayer->GetFatiguePoint() > pPlayer->GetMaxFatiguePoint() )
- S& [$ n9 \$ u; G& i' |7 i3 Z pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );
( \/ \/ I- T7 f( J
, W2 e/ V) A1 G3 O#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver 2 q- {& \1 ]! U e% E. \( p
! p9 i4 F7 C8 h7 O9 v
; U' W+ e* Q- |' s3 u/ `8 A |
|