飞飞世界论坛

 找回密码
 立即注册
搜索
热搜: 活动 交友 discuz
查看: 17031|回复: 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
* s5 r) ?. n6 d3 S3 WI posted this because someone kinda posted a youtube thingy about it :O.
  N+ w( a* B: i/ O1 v) ~
% y% D. r# S0 y& sFind this in DPSrv.cpp @ worldserver, _! W' C% U7 e; l
: V5 W: [0 Z/ E* I: ?! j+ u
Code:
0 }7 b/ r( j8 ?; dvoid CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize )
# ]! |1 R1 f9 g: A* w{9 f9 i$ L3 D* k% r
        DWORD nId;
$ y* Q$ ~" a7 A' j        int nPart;' _9 U# \  _) V7 U+ U
9 w$ j7 |: m8 v/ ~
        ar >> nId;
# A$ ?$ D/ _( k. M% y; A7 p        ar >> nPart;               
! s1 g( R9 L; }- q2 w9 [! B       
- [+ a: m3 d5 V        if( nPart >= MAX_HUMAN_PARTS )       
9 q6 v6 m' Q' }4 j/ B                return;
" y+ q! e6 }, N6 V1 H/ P8 U0 t& ^0 {+ [9 `8 b
        CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it' a- U( _; q) w' }! j/ }, J. ?

6 p" o" Y2 ^) {, q5 a) U, C/ K; S8 B+ J6 o$ C, \4 J+ T, `
Code:. h+ q  v2 n. d* S0 k4 \8 n: _
#ifdef __QUGET_SWAP_FIX
3 E: H2 z, k; Z0 s: m# q% |2 D% R6 ~( X3 b0 m- l( ?# b+ u+ |
                                if( pUser->GetHitPoint() >  pUser->GetMaxHitPoint() )$ W) A- n3 x# _! W3 Y* f
                                         pUser->SetHitPoint( pUser->GetMaxHitPoint());; Q* U2 }  ]$ {( D! F0 l

5 ?5 d- o8 j, ?& I) ]                                if( pUser->GetManaPoint() >  pUser->GetMaxManaPoint() )& E, W7 Y9 o3 l. @7 X. v
                                         pUser->SetManaPoint( pUser->GetMaxManaPoint() );
3 |, Y! o) H% I' o9 `* t5 i$ e$ P8 S6 K: G4 o" }
                                if( pUser->GetFatiguePoint() >  pUser->GetMaxFatiguePoint() )" D- I* ]5 q( Z
                                         pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );) V1 w% M& R+ y) z( I' ^6 ?
7 L7 o: r  T/ c9 j$ ~+ q
#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp
$ k4 @- E6 |; r' [; C3 |" I5 s- s. qand add under
* M- q  I8 V* _- ]
% T- J9 @- ?+ b: H, P1 b  v8 u% nCode:& T0 ~* w6 N% F+ ]" L, @1 V# H1 c
if( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel )
% c# \% `/ w! f8 h2 U& c) N; V  i                        {% _3 C5 G' J' ^9 V% e
                                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 );
! Q; C2 S) @5 k                        }this+ C8 V) \2 X( L! n8 h) X- j/ N
4 E1 h5 q& y  l* J# r: a2 ]+ b: [8 b
Code:" `0 w: z8 W) Y# d0 _
#ifdef __QUGET_SWAP_FIX
, e% c/ F: ^# i4 Q                                if( pPlayer->GetHitPoint() >  pPlayer->GetMaxHitPoint() )% [; W' n1 _* K0 f. R
                                         pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());& e, p2 X# o  d

- w/ y! n" p/ q; d- r: k2 G                                if( pPlayer->GetManaPoint() >  pPlayer->GetMaxManaPoint() )! p0 _! z) {7 {) l
                                         pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );
1 u# X8 I+ O3 a! M
+ _2 \+ k2 v3 P7 J5 y# [' b" m                                if( pPlayer->GetFatiguePoint() >  pPlayer->GetMaxFatiguePoint() ): D9 `8 K2 D  q. \
                                         pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );
$ L: k2 |. J9 s# o. U* Y: A: d
: j6 r: j% f: @6 ?) O$ K8 S#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver ! H6 L: e( o6 Z- d, `2 p& C; ~

5 T% \  O/ h  |; A/ }4 D. n
# n% V# r- E# y3 j' A1 ?  H

相关帖子

回复

使用道具 举报

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

本版积分规则

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

GMT+8, 2026-1-18 21:07 , Processed in 0.086522 second(s), 26 queries , Gzip On.

Powered by Discuz! X3.2

© 2001-2013 Comsenz Inc.

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