飞飞世界论坛

 找回密码
 立即注册
搜索
热搜: 活动 交友 discuz
查看: 16958|回复: 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 0 d* U1 i* ?  q9 x( P5 J3 {6 |- b
I posted this because someone kinda posted a youtube thingy about it :O.
- F9 v0 j  j2 ^$ @2 G* b7 a2 N
9 i* w2 A' `! k5 R, o1 G: }5 fFind this in DPSrv.cpp @ worldserver
1 c  s' }) y: e  Y* V* i+ D* g' ?" t' f3 J: ]4 N
Code:% t7 Y4 ~$ N: ~! Y% D& \: t
void CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize )
$ }  {8 m- [. q6 D. [{
+ r: i7 H1 X7 I: d        DWORD nId;( X" S% U' i( A9 \" `' U
        int nPart;, G, R6 P: Z- z
4 s$ Z5 K3 H( G3 X* I
        ar >> nId;
" j* S+ e8 |4 N5 u        ar >> nPart;                5 i8 d' u% f$ R6 H* ?1 }
       
1 y% ^/ t, W2 w' Q7 Q7 a, k        if( nPart >= MAX_HUMAN_PARTS )       
4 c/ m; W  m9 l, Q" ]3 H( c8 y                return;
$ l' K3 p6 k* y+ i7 \9 m9 p5 y4 e& c5 A: }
        CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it! o& m2 ?7 S6 R$ Q
: |+ z, X4 K0 @  q/ d& S3 n
2 }4 H- T' L0 S
Code:/ Y6 {- a* s) f2 Y
#ifdef __QUGET_SWAP_FIX
2 ?' ?3 N$ \9 O* }) t3 V
! h. u/ |& w4 F8 @                                if( pUser->GetHitPoint() >  pUser->GetMaxHitPoint() )
$ Y) x0 X0 u/ ?' @5 w- m                                         pUser->SetHitPoint( pUser->GetMaxHitPoint());$ j, n- }0 O; F
) b' K7 _7 L. Q3 B3 z
                                if( pUser->GetManaPoint() >  pUser->GetMaxManaPoint() )3 ~+ L2 l/ u- q; q5 i0 s) h
                                         pUser->SetManaPoint( pUser->GetMaxManaPoint() );
$ C6 ]8 x! u- }* d! D; S/ \4 q4 e; O9 V. x0 L( H8 ]: ]
                                if( pUser->GetFatiguePoint() >  pUser->GetMaxFatiguePoint() )
$ }, x3 h" G% w                                         pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );
' r, i% I+ E8 }$ `) a
$ I6 R# V$ t9 y" L+ n$ r#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp
3 a! J2 w* f/ F# p) r* j" uand add under: \9 a9 _  W4 _3 i

+ r/ ~3 @  }: |9 ~0 SCode:% t& D2 B1 U% p* c  }. t
if( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel )
; A) ^- w: a% c$ t% p! [' E& t% [                        {5 s% }6 s/ r* {! [+ z
                                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 );# v7 E* g. N( B/ y. l
                        }this
; W6 {7 t+ c) n
$ j8 V5 l  t+ q1 }, p3 {Code:8 {3 [) l# R9 F/ N0 P" p3 B4 |
#ifdef __QUGET_SWAP_FIX$ t8 n) R7 |- h/ A- o- o
                                if( pPlayer->GetHitPoint() >  pPlayer->GetMaxHitPoint() )- d  J* d, u$ ^8 v9 x. a" j8 @
                                         pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());
1 I7 B2 U* q0 e: P% E  W
/ r" \) i) Z* e+ m2 w+ v  [& {                                if( pPlayer->GetManaPoint() >  pPlayer->GetMaxManaPoint() )
" _* I4 p* i$ W+ q! S1 x. U4 S                                         pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );
4 P" z5 `/ J! u+ M
& \* J+ D% b, ?! @! L1 k% k# c                                if( pPlayer->GetFatiguePoint() >  pPlayer->GetMaxFatiguePoint() )5 f( o  T* M: Z
                                         pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );
  a9 R/ Y, B9 Q( A- o6 d; [2 t
#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver
0 M5 Z) k8 J, F, a3 o6 ]9 u3 T/ v* i5 s$ P# X8 z

! P7 N/ l1 Q! K* m

相关帖子

回复

使用道具 举报

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

本版积分规则

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

GMT+8, 2026-1-14 22:19 , Processed in 0.062352 second(s), 25 queries , Gzip On.

Powered by Discuz! X3.2

© 2001-2013 Comsenz Inc.

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