飞飞世界论坛

 找回密码
 立即注册
搜索
热搜: 活动 交友 discuz
查看: 17069|回复: 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 2 ^: z( M  x2 j. p2 p
I posted this because someone kinda posted a youtube thingy about it :O.
; \# _7 f1 R( t; I3 F( q9 `$ Q2 [( u# I
Find this in DPSrv.cpp @ worldserver
! G* P5 m: i2 \
/ n4 o' V. W+ G1 V2 z: Q7 G. [Code:9 D/ p  s+ ~: s% ]9 u6 Y  a; r) y
void CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize )
5 o! q0 W4 b) \5 q. @, R+ S{; g5 Q! _; G. a; s
        DWORD nId;
+ U# a+ M# w5 ~4 |' i. p# J        int nPart;
* N! X( w1 D( ?+ z+ z$ D3 T+ ~* n/ f2 z9 x
        ar >> nId;8 X* p1 J. R, H6 j% r: V$ O" Q
        ar >> nPart;               
7 a" |( I" T# Y        0 b: M2 f; V7 @9 B) A7 t
        if( nPart >= MAX_HUMAN_PARTS )       
4 e# g& Z0 t6 C' v* h5 o( s                return;
6 k. w! x4 b: c8 e7 x/ g. B4 `; S3 l* j0 l
        CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it5 D6 T$ X6 e9 S+ x" q  g8 _
8 G1 [" [: m" _; s! S7 n1 C6 `

5 \/ Y8 C) @1 E( x' R% P) M6 L( @Code:4 V* G. ?7 \; \$ S
#ifdef __QUGET_SWAP_FIX
  ^8 n# }+ `) G0 m5 O6 @9 w
/ s7 A+ j' J2 Z2 z- p                                if( pUser->GetHitPoint() >  pUser->GetMaxHitPoint() )
2 `8 q9 Q6 y- P3 \$ s- l                                         pUser->SetHitPoint( pUser->GetMaxHitPoint());
  V3 @4 [6 A# Z. o( V3 f5 H2 W+ F
* @; N5 T2 x; {+ }% a, ^' B  u                                if( pUser->GetManaPoint() >  pUser->GetMaxManaPoint() ), M. |5 r  |  Z8 R
                                         pUser->SetManaPoint( pUser->GetMaxManaPoint() );( A2 F' o$ j% V! R7 k$ h8 T
# F6 K$ M6 [! ?8 V5 U! v, U
                                if( pUser->GetFatiguePoint() >  pUser->GetMaxFatiguePoint() )
- k3 W) _9 x$ B- S& ?: T                                         pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );% U. i3 j0 E- t( V5 l  W1 s
* h1 [# C; C( d( m
#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp
. M7 o9 X3 R8 V  L$ T/ [" G/ I/ Xand add under
  w2 z8 ]; z/ O' b! M
$ W* \4 k% |4 w: TCode:  J" f2 {8 m4 n, W
if( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel ): R/ V6 P) J+ G2 U$ t! p
                        {
- F  T; p; R+ L6 `5 Q                                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 );6 q" s+ A4 \. _9 l5 u+ I
                        }this
8 f. ^4 J8 e1 B. n5 P  O; u! f: Y1 n/ }* U9 {9 ^$ H
Code:
/ X$ d$ O2 g% w: P# |#ifdef __QUGET_SWAP_FIX0 K% w1 [3 u6 {' Y9 o0 ?+ V5 t. I$ V% K
                                if( pPlayer->GetHitPoint() >  pPlayer->GetMaxHitPoint() )
/ c( e1 w$ o: ^0 R1 P8 A' s                                         pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());. X: M7 F2 U2 P
. s/ q& d$ I5 C# A# N2 q# U
                                if( pPlayer->GetManaPoint() >  pPlayer->GetMaxManaPoint() )
' R1 x* D* D# O, v                                         pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );
" z- j5 S$ F% O$ m# M! Z
4 M$ d8 ?" ?- }" X                                if( pPlayer->GetFatiguePoint() >  pPlayer->GetMaxFatiguePoint() )3 W/ r4 P' P5 ]+ C, F
                                         pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );
! X- y9 V1 ^1 N% N, D  z4 }" ~+ Y2 Z3 R% G! v1 a. X
#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver / l  B; a$ `# [) [" g* ^( {) H
/ O$ n. [) p0 G# e8 l
# d) ]4 D# K( d# j

相关帖子

回复

使用道具 举报

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

本版积分规则

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

GMT+8, 2026-1-20 14:43 , Processed in 0.057401 second(s), 23 queries , Gzip On.

Powered by Discuz! X3.2

© 2001-2013 Comsenz Inc.

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