飞飞世界论坛

 找回密码
 立即注册
搜索
热搜: 活动 交友 discuz
查看: 16259|回复: 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
6 S3 o- Y7 L# v5 vI posted this because someone kinda posted a youtube thingy about it :O.# A0 {6 s. x3 R1 s
3 ]/ {" V4 X. J4 ^
Find this in DPSrv.cpp @ worldserver# u6 N* A, \4 p* F
8 R5 M; p1 @9 P. f+ f: G' J
Code:
& m- _. w! u  Ovoid CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize )4 Y4 `3 p4 Y0 d9 R6 I9 K
{
: K. H. w( \2 q, z# [/ Q8 o) I        DWORD nId;' w+ y, s. I0 k8 r* b
        int nPart;3 z! u: o0 G! |7 i
+ {3 ^4 _* n. S7 [
        ar >> nId;* \5 K6 m" j; t
        ar >> nPart;                ; S/ v1 n+ r2 y+ l+ [: M! w( a0 i
       
; R2 ~0 g5 z, e        if( nPart >= MAX_HUMAN_PARTS )        $ E6 A. h2 \5 h; L2 @
                return;2 W# [/ J+ S! _% q7 R/ I/ O

! Y+ w$ i# S5 b# B        CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it( l0 ^0 }  w9 `( G# D4 Y# C; y1 g0 J
9 l( X+ }( |) J

$ S) K) w. b3 d6 u+ h5 ICode:; \% P4 n* a! S0 {1 J1 E  O
#ifdef __QUGET_SWAP_FIX
8 }$ \" e7 @7 m- }/ d/ U
& ^  p; S* X( G& l. ?" |                                if( pUser->GetHitPoint() >  pUser->GetMaxHitPoint() )7 L6 N& R) W9 z$ ?4 [' y+ v
                                         pUser->SetHitPoint( pUser->GetMaxHitPoint());
0 \" ?& M- |- h( C# k/ b
3 ]* o, f8 F0 `0 C0 ?; W                                if( pUser->GetManaPoint() >  pUser->GetMaxManaPoint() )
& X3 n  P3 Q# l1 C/ T) ]+ i                                         pUser->SetManaPoint( pUser->GetMaxManaPoint() );- C- M" c$ ?* m% y2 p
) {! t+ j% W9 L2 @, `  B  [
                                if( pUser->GetFatiguePoint() >  pUser->GetMaxFatiguePoint() )
6 g" i2 C: Z$ I: R, m. ^* F! i                                         pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );
( Q/ \+ t6 F) e. t! `
. n8 S: f0 c; M. ~#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp
. z3 C9 r4 O+ N' e) \+ }" D+ band add under
5 m# {7 B1 G5 b/ @4 ~5 m( i
# k1 e0 s+ l  h5 h$ ^, {; mCode:
' e' x( A. k* }7 T6 ]4 _if( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel )
6 i, M2 i  ]/ Q                        {6 H8 G: }3 y8 x# L3 h( [4 b
                                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 );9 f$ c. v% Q3 P- M: _* z) V
                        }this
5 s' N+ y2 d  j+ H8 N; x. \( H, b" m) m/ q
Code:
1 i& C2 \; n* E% s5 v#ifdef __QUGET_SWAP_FIX- ~! n& b6 W+ I" E! i! l$ b
                                if( pPlayer->GetHitPoint() >  pPlayer->GetMaxHitPoint() )
# W7 y- E) e5 q+ ^& u! I                                         pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());3 R! D5 d6 F/ h
5 M; r% R, o" y
                                if( pPlayer->GetManaPoint() >  pPlayer->GetMaxManaPoint() )
* [* V$ S0 Q) }' s" o                                         pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );% }4 q6 y0 c( Z3 w+ W( w

4 E- e& G9 b* v: b! Q; n' y- x                                if( pPlayer->GetFatiguePoint() >  pPlayer->GetMaxFatiguePoint() )8 j: g* ^% U' T
                                         pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );
! u) W2 K* I# ?) H  D# S
' c5 q$ z' j/ g( T( o#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver
0 ^" R! i# [% N
; [9 v7 V# ^" h4 l0 k5 a( q- {2 w( p# C  B3 T6 q5 \+ }# @+ O2 t* [

相关帖子

回复

使用道具 举报

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

本版积分规则

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

GMT+8, 2025-12-1 06:30 , Processed in 0.104982 second(s), 24 queries , Gzip On.

Powered by Discuz! X3.2

© 2001-2013 Comsenz Inc.

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