飞飞世界论坛

 找回密码
 立即注册
搜索
热搜: 活动 交友 discuz
查看: 17242|回复: 0
打印 上一主题 下一主题

修复交换错误

[复制链接]

197

主题

203

帖子

1088

积分

管理员

Rank: 9Rank: 9Rank: 9

积分
1088
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
) |% K1 i$ p5 _: g7 b1 {. II posted this because someone kinda posted a youtube thingy about it :O.
) D+ f! B+ Y: ~0 N+ T- `! T# [: S% |# B8 p, H( A3 h  ?4 ~) S
Find this in DPSrv.cpp @ worldserver2 {& v, y$ O1 a$ ~

6 g) a% X2 N1 U0 {" PCode:
- {# _. m  z/ cvoid CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize )0 K# r" T2 W. k# L# `/ }$ H
{: K& n( x- @) p
        DWORD nId;$ F/ j  {4 S  \6 z* `4 O
        int nPart;9 O* S& j) W* a, Y1 k* }

; K; ]! w  L9 c( b8 F( {        ar >> nId;
5 A' P! c/ r5 l! P, k" J        ar >> nPart;                / R% i& B+ J. \3 {0 ^+ Y: v
       
  j5 U* w7 ^- ~& U* _  U, W7 R        if( nPart >= MAX_HUMAN_PARTS )        8 ?2 M' t+ R# m8 `. r  s
                return;
1 U+ A2 e6 |" x) d% u7 j, s' X
' @* Z, j% [' t! U' @/ G        CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it
% o7 I4 F7 I% G  z4 h
- i, }) C. O# P9 a
4 _# v% h  O8 d" C* C' ~Code:5 f6 s8 P% g1 O) B& ]
#ifdef __QUGET_SWAP_FIX! a- i$ h- n7 v% A: ^# Y
! h1 w6 d/ S: d. ?* {
                                if( pUser->GetHitPoint() >  pUser->GetMaxHitPoint() )6 f: f2 {# L, |* `) i& ~, t  C/ S
                                         pUser->SetHitPoint( pUser->GetMaxHitPoint());
6 `- s5 D. ~; M
$ j: i; @7 K4 z1 `$ t7 t3 e  S3 O                                if( pUser->GetManaPoint() >  pUser->GetMaxManaPoint() )
. s# c8 J, z/ H/ e8 O8 W                                         pUser->SetManaPoint( pUser->GetMaxManaPoint() );( c4 T. l) l8 h. \4 g
$ [% S* H+ A# s  r7 h
                                if( pUser->GetFatiguePoint() >  pUser->GetMaxFatiguePoint() )
# s3 \- A7 G9 ^! U5 _4 m% b$ b; s. a                                         pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );2 n& e7 S9 f( p6 |/ f7 O3 a
( Y6 x3 [! Y. O, i1 P$ s
#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp
/ \: ~( j$ m- {* ]. r: d% Jand add under
* f5 m& i, m: ^. Y: J, b- m* h9 g6 R+ t! h: A3 ^/ W$ W5 ~* o
Code:; T1 K4 z# C5 N% U# s) n) H, s* z
if( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel ). x4 a( t( A# _, u) V- W3 J+ g
                        {  f: w9 j& T6 Z8 q" P0 F
                                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 );
) A$ C2 P% a: @% l& H4 ~& X( B% X                        }this+ ?7 d% @4 K7 j" M( y

! M- B0 X* ^4 q- o. _Code:
* x/ W% c, ]2 R* T#ifdef __QUGET_SWAP_FIX
5 L  Y; t; w: z) }3 V% f9 Z/ B2 p                                if( pPlayer->GetHitPoint() >  pPlayer->GetMaxHitPoint() )
& Z( {: y! S0 D. p. G4 y                                         pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());# y3 x; g8 p' W' Z

: l" Z( k$ U9 f0 V# P                                if( pPlayer->GetManaPoint() >  pPlayer->GetMaxManaPoint() )5 x; _8 t' C( U- I0 F1 f" T
                                         pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );% t3 f4 ~( q; p6 d

' Y/ o* K1 ]# v% V0 s                                if( pPlayer->GetFatiguePoint() >  pPlayer->GetMaxFatiguePoint() )
8 ^/ Q4 q# q: @, M) w2 a# d                                         pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );* d& n- N" {6 U4 o% ]1 W' L6 y) b

1 E; o' a2 o# |1 ]6 ^#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver
0 L. U! |0 v: f0 J
$ {# W: y, K0 p. v3 {
. N  k, Q+ G2 }  J) `# [9 ~

相关帖子

回复

使用道具 举报

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

本版积分规则

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

GMT+8, 2026-1-26 01:19 , Processed in 0.057410 second(s), 24 queries , Gzip On.

Powered by Discuz! X3.2

© 2001-2013 Comsenz Inc.

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