飞飞世界论坛

 找回密码
 立即注册
搜索
热搜: 活动 交友 discuz
查看: 16936|回复: 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
/ A9 H' s: |. B4 `& e- @5 J/ hI posted this because someone kinda posted a youtube thingy about it :O.
; b" j' j! u7 |# G1 ^& I  S+ y
2 ]: m4 Q$ o- P0 ]Find this in DPSrv.cpp @ worldserver
1 U& a2 c, `0 S' s# F% a: A6 u% z1 ?) n
Code:
3 v8 g$ K2 X8 S/ x  rvoid CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize )
1 e/ d8 E  h* y) m/ t{. E* n3 E" b# m7 c/ F1 C8 b
        DWORD nId;. s2 h( a: n' v5 J7 W" L9 u
        int nPart;  w0 k( ^. b$ E' r3 ]0 Z/ t9 X( B

8 L7 Y+ l5 `9 W' ?- k        ar >> nId;6 V2 |: Y+ a7 ]  }! e. T. D  V
        ar >> nPart;               
6 v- J* j: D: X8 q4 @" Z, R5 h7 S        ; n9 _3 ]2 X4 V$ |& p4 E
        if( nPart >= MAX_HUMAN_PARTS )       
" u8 }( E6 X9 G- H3 L3 d                return;
! D+ {0 [* P1 K( d
6 k& D& q5 ?& N7 N        CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it
( D1 K+ V9 h# ]) B9 b! B4 `  I' B& h: N7 d
6 I9 |. K. A. x0 P3 D
Code:
' J5 ?8 G1 x  b: S- ~+ o: o#ifdef __QUGET_SWAP_FIX% o+ k/ o0 R: q* W$ s! N; O. K

9 {. a7 V; E  \: S* m( ]                                if( pUser->GetHitPoint() >  pUser->GetMaxHitPoint() )8 J1 t9 I7 ~6 w9 V
                                         pUser->SetHitPoint( pUser->GetMaxHitPoint());
8 ~) t1 _# }" y4 F: Q
8 e# M. h' A5 G4 {                                if( pUser->GetManaPoint() >  pUser->GetMaxManaPoint() )
8 I6 v- `$ P, v) s6 {                                         pUser->SetManaPoint( pUser->GetMaxManaPoint() );
& L1 v' L) q) }6 Y
' n& e, R5 g: C( A/ J+ u; B                                if( pUser->GetFatiguePoint() >  pUser->GetMaxFatiguePoint() )
2 Y6 k2 R# s1 I; Y, t4 W) k3 P7 O                                         pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );
5 \+ i" c# X8 Q4 e+ X0 b" q; R, m: y2 k5 N
#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp
: ^. Z. m, k2 w8 l7 u. i4 `and add under
$ |4 D4 K& X3 b8 L, V
. T) w! e1 ]( K, j! ICode:
/ x. H# j( P9 ?3 @; V/ Aif( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel )4 d5 [  ?6 m% E, r0 Y! {/ I
                        {4 K" m6 @5 I6 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 );
( v  u/ e2 q2 d0 U5 i+ p- A                        }this1 t1 B2 u5 y: k* ^; l4 N

  y7 ^! S( _/ N6 a% K1 s5 l" _Code:& t# s5 p1 G/ w: t5 M- g
#ifdef __QUGET_SWAP_FIX. ~: U- _( R8 l* U7 J- k
                                if( pPlayer->GetHitPoint() >  pPlayer->GetMaxHitPoint() )
! l! X4 k: |( C, b                                         pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());' j; O" ^! V+ h0 g* j1 a2 ~! e
+ x) `& q2 f8 |: |- e! Z% g
                                if( pPlayer->GetManaPoint() >  pPlayer->GetMaxManaPoint() )
. V+ U% `/ I- o2 f4 d                                         pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );5 x2 V$ |7 U7 _4 H& c8 A3 D0 Z
2 s: [* k$ P- A, M
                                if( pPlayer->GetFatiguePoint() >  pPlayer->GetMaxFatiguePoint() )
9 p: a" S! a! H* Y- _6 S: M) w                                         pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );
. M) u" W% C7 j5 ]& p
0 x$ Z' `0 i7 a8 [' `# ~) j( Z' u#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver
* O; p9 z' x3 \
; K/ e7 K) D; T' o: Q5 A2 [* |: x# \6 n

相关帖子

回复

使用道具 举报

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

本版积分规则

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

GMT+8, 2026-1-13 17:36 , Processed in 0.057720 second(s), 24 queries , Gzip On.

Powered by Discuz! X3.2

© 2001-2013 Comsenz Inc.

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