|
|
Hi I fixed the swap bug a long time ago it got tested on my server and it worked
- [0 Z; u! n' h. Z) m$ i' }I posted this because someone kinda posted a youtube thingy about it :O.* L' R# ^% E5 Y" ^* \, v2 w. V8 q
7 ^+ e; \- c( e" n; O" _& A* KFind this in DPSrv.cpp @ worldserver
' {; C& Y) U" m* L$ B8 h; \' ]" t3 u* p. G3 t2 b6 m$ G
Code:
- A% L: `- l7 |2 f2 ~- f$ v. Cvoid CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize )0 ~) m9 I" o0 k* Z1 e
{
. | }0 g' i1 |( q DWORD nId;% x( R$ m' s5 Y/ y& i
int nPart;
n6 i9 v$ u: `8 Y# g" a9 Y( N7 ~% p H
ar >> nId;
3 @, U: ^2 {0 w5 q# G* Q ar >> nPart;
$ O- }* s: p; q) K: ~ 7 z4 q- g! _! E# E3 |4 k
if( nPart >= MAX_HUMAN_PARTS )
/ c* o) m0 P: } return;
- g% D$ X2 ]- F( J3 h" q Q* w& M8 K' e" j; S( M
CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it
. q' x- [, z E2 b
9 H5 I4 B0 g: b4 R m% g- Z% i! }* B, L. t! ~1 @- V r! y4 A& b
Code:# \; E4 N4 t% S4 y# N
#ifdef __QUGET_SWAP_FIX
; b& L7 x) @$ d1 p' h! {; u& c) N) D: m& f8 }4 A
if( pUser->GetHitPoint() > pUser->GetMaxHitPoint() )' \1 T; ? ^! }, n
pUser->SetHitPoint( pUser->GetMaxHitPoint());) h% d- J. y8 Y x( U
, [5 U& [' X. [% O3 ^ if( pUser->GetManaPoint() > pUser->GetMaxManaPoint() )8 w" y p6 W$ }8 m+ c% Y- a% c- H% V9 J
pUser->SetManaPoint( pUser->GetMaxManaPoint() );9 y W: t% T8 Q6 P2 }( \$ w
0 K4 a6 q/ {1 i
if( pUser->GetFatiguePoint() > pUser->GetMaxFatiguePoint() )% c% S6 Q- o, T2 A- a; S
pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );0 p C/ b% E: O0 R2 N8 w9 B
/ m8 P9 n. ~5 @9 e5 [" D8 Z
#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp
$ h$ U/ s/ G: m4 `, F, Cand add under8 C ^6 F; m4 l R' i8 d, T8 z4 c/ H
8 A8 B: J- V1 \. f( L9 g2 |- K; k
Code:
7 E7 L" \$ b: z$ a) Vif( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel )
' M+ k- a! y7 S7 W$ @. @( A {: i: e. x2 ~+ J `( F; R7 T/ m
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 );
( \% f1 o0 c4 a& x9 T- `9 N }this5 K0 V+ d* Z& y/ R
5 m+ F4 i% p; P' }Code:
/ `3 s4 c1 \+ E; ?; M. u( x7 A#ifdef __QUGET_SWAP_FIX
9 L- U+ r8 B: ~! _2 h, X. n if( pPlayer->GetHitPoint() > pPlayer->GetMaxHitPoint() )" `7 G. c: o5 L: y9 Q- ?7 V
pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());6 b# V ~5 K0 b7 J4 t) c0 p
1 t% Q2 f% N" W" P! f* d* u
if( pPlayer->GetManaPoint() > pPlayer->GetMaxManaPoint() )
; \7 f! f) T$ B5 [0 ~ pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );
$ U; x4 m1 `4 z% Q- I t% ~5 C3 L; R; ]2 f! t3 w
if( pPlayer->GetFatiguePoint() > pPlayer->GetMaxFatiguePoint() )
* j. T. l/ W$ V+ Q9 y8 H pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );
; L2 `0 Z" a) _8 A% o+ [* M
2 A5 d, y6 m$ g7 |#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver 5 b1 y( Q0 L# x1 z/ {7 e
9 A+ A+ n1 [8 [% P" O4 D- w: A) h; E$ J7 s1 l: G6 W9 A& H p
|
|