飞飞世界论坛

 找回密码
 立即注册
搜索
热搜: 活动 交友 discuz
查看: 16283|回复: 0
打印 上一主题 下一主题

修复交换错误

[复制链接]

197

主题

203

帖子

1086

积分

管理员

Rank: 9Rank: 9Rank: 9

积分
1086
QQ
跳转到指定楼层
楼主
发表于 2016-1-10 03:43:36 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
Hi I fixed the swap bug a long time ago it got tested on my server and it worked
. m) k* b8 f+ a9 Z4 q( ?I posted this because someone kinda posted a youtube thingy about it :O.% R2 i7 m1 K; {$ T
  |- o$ t) [% _2 o$ `; H
Find this in DPSrv.cpp @ worldserver
: c. I3 t- _+ l4 N  L6 i, e
( G# L" n. S( @5 p0 }Code:% d: f, C  ^- Z9 ~2 V
void CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize )
- H8 Y* n" |9 j# x# S0 q" W5 v) t{9 n1 A: s6 x- v
        DWORD nId;/ _( ^9 a7 @& Q: Y3 c6 y% x
        int nPart;
4 a: V5 N1 b, Q% L: Z8 L7 |# E9 P  r+ t$ B# Q) ?
        ar >> nId;3 g# h6 r; D6 ]
        ar >> nPart;               
" q2 M" c- h: ^) L& V8 U. q( c# E       
9 D& X% ?. x* y0 u7 v        if( nPart >= MAX_HUMAN_PARTS )        ( R- q3 a, Y6 i. @& b
                return;
" v4 a- o$ E+ f  G- k4 x! L- \
4 g8 m& j4 l( w- K: S        CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it$ l6 Z* ]  R% @: L0 W
+ }. U' A. F' W4 v) t
& a2 N( V9 g" ^5 }, I. T
Code:1 L" y0 {  f! `0 t) I0 @- z' X8 ]
#ifdef __QUGET_SWAP_FIX
6 ?# e4 g  P$ a# x: R
7 _- q# U& R6 x; B5 M3 ]1 R                                if( pUser->GetHitPoint() >  pUser->GetMaxHitPoint() )
' B2 T& _/ @6 W# W# P; v, n                                         pUser->SetHitPoint( pUser->GetMaxHitPoint());
3 y  r+ L4 k7 M* o7 ]& O6 A, g
9 }5 {7 ]7 ^# i8 }8 l  Y) f* g% M- L                                if( pUser->GetManaPoint() >  pUser->GetMaxManaPoint() )
+ u% G5 u" F2 v5 G                                         pUser->SetManaPoint( pUser->GetMaxManaPoint() );
( C% O3 K# p6 D; v2 o" o
$ q, B& Y: x; Q" y* V                                if( pUser->GetFatiguePoint() >  pUser->GetMaxFatiguePoint() )/ @$ [9 M. w1 Z" [, o! S$ J
                                         pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );; }. K/ h/ L) }) Z; Q. w2 k/ D
/ d& q+ K: j# n2 O4 r6 \6 ~
#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp: p$ n$ E0 H# t
and add under
1 l# ~, H2 d# F" n* C
1 J5 B; h$ e6 ?2 t! k* H. M. v3 K' TCode:- ~- D% M0 Y; d+ J7 P
if( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel )
. _  W5 L# i3 n( z" w4 f                        {) k3 {' w4 {% w6 F( [
                                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 );
# k# A8 U( C" N$ E' u, P                        }this
9 ?" e( ?9 M( \7 T2 y5 d% N, p* o$ w: H( _: c
Code:
& {: ?4 t  o4 q* F#ifdef __QUGET_SWAP_FIX) @; P3 @7 L( [0 A
                                if( pPlayer->GetHitPoint() >  pPlayer->GetMaxHitPoint() )& i* D( |7 y0 u- g" b7 t6 I) j8 U, G
                                         pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());
- v- m2 ?. f/ O' R2 h1 I  ?+ t9 Q2 Z  r  y# A$ J: i# l
                                if( pPlayer->GetManaPoint() >  pPlayer->GetMaxManaPoint() )
, @; N0 h) O& Z2 s) k: Q                                         pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );7 v& }$ j/ y# i" d' w

( x9 Z) j5 n! `& v7 a3 Z                                if( pPlayer->GetFatiguePoint() >  pPlayer->GetMaxFatiguePoint() )
1 X/ H- C0 [' x                                         pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );
; g+ d! ~! _) n9 u6 e1 M$ u& g: H- Y1 l! `# Z5 I0 _
#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver . O* D8 e+ @, o9 c
5 H* k) [; h" l& |( @

2 F$ Z' c: \( s; h+ c

相关帖子

回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

手机版|小黑屋|飞飞世界技术论坛  

GMT+8, 2025-12-2 13:18 , Processed in 0.062242 second(s), 25 queries , Gzip On.

Powered by Discuz! X3.2

© 2001-2013 Comsenz Inc.

快速回复 返回顶部 返回列表