飞飞世界论坛

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

修复交换错误

[复制链接]

197

主题

203

帖子

1090

积分

管理员

Rank: 9Rank: 9Rank: 9

积分
1090
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 7 ]1 [$ u: t/ Y; w* Z; q
I posted this because someone kinda posted a youtube thingy about it :O.7 ^& w0 K8 \9 o( Y% j
& G6 n9 J0 w( {4 ?  E: E
Find this in DPSrv.cpp @ worldserver0 B. o( m% l- d- V- g' W
1 k/ f' C+ e# h
Code:# J5 e; n# E2 ?% v+ U% @- b9 q
void CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize )- [+ V6 {! {+ Q3 [! V; ^+ k7 D8 ]$ p
{
6 P$ @; Y& o: d. l$ S8 P        DWORD nId;7 r4 N! q( z* [) o/ f+ K6 e
        int nPart;/ X# `. h& u% Y0 E* C: N5 z
0 N" ], E, S, T' |9 L1 b5 @
        ar >> nId;% L& h" Y* P; `
        ar >> nPart;               
, i8 W( c7 ~! b+ k9 A        1 E2 y2 P1 U# p7 b3 n" V! q' Z
        if( nPart >= MAX_HUMAN_PARTS )       
7 T" ^2 X  {2 k  z                return;3 K' Z( e0 B/ h2 H

. p. k& [2 W) ~- d# g" j' b        CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it
. M7 n# R  u+ `( x7 V; `! W9 f7 z8 R/ ?. Q( B7 n: x

! R0 m9 `/ S( p2 @# x+ _% vCode:( ?4 a$ q- g' k+ b4 q" T) W
#ifdef __QUGET_SWAP_FIX
0 G( z6 ?/ t: ?' D( Q# ]0 l+ C1 `% s. ]' G) e4 h! V8 s
                                if( pUser->GetHitPoint() >  pUser->GetMaxHitPoint() )
8 }0 w/ X0 o5 l) F: }                                         pUser->SetHitPoint( pUser->GetMaxHitPoint());  M1 w6 `. J8 C
! P& v8 Y8 u. K3 F, |) G
                                if( pUser->GetManaPoint() >  pUser->GetMaxManaPoint() )
# P9 p- v! I2 B5 P" H/ x! M  `- A                                         pUser->SetManaPoint( pUser->GetMaxManaPoint() );
/ p. s3 w* p4 Q& D$ G7 \' ]+ }* s; y: r. N3 h- Q
                                if( pUser->GetFatiguePoint() >  pUser->GetMaxFatiguePoint() )5 t: Y+ f  h: P) U' Q
                                         pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );/ p9 d& D0 }. m: W5 Q

8 q! M# a4 b. d2 x# B& c$ Q#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp
  L/ F2 v) \5 D! x/ H  ^and add under. n4 D4 Q' g7 L0 _3 Y

/ S! a$ S( Q+ F, VCode:
* z/ H: V) \+ i( f  N* h" w% Iif( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel )6 ~- p9 Y$ e2 u2 A8 |
                        {1 B) T6 d9 \' k+ `7 ?! B4 n4 M
                                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 );
2 l$ V, t0 [0 A7 ^/ H9 }                        }this+ d" S, Q2 Q2 w& X

8 b3 H( o( l, k5 h: j! G+ RCode:) y7 g  G1 Q" [3 S6 {% F) Z% u
#ifdef __QUGET_SWAP_FIX
8 K  n( C) ?3 ~; q- d" h                                if( pPlayer->GetHitPoint() >  pPlayer->GetMaxHitPoint() )! l4 n0 m$ }- \% X. H
                                         pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());
8 F( N2 F$ c2 G; d. `4 h% Y: Z8 \2 {) C% s
                                if( pPlayer->GetManaPoint() >  pPlayer->GetMaxManaPoint() )
" x/ @* r# x) o" c/ @/ C                                         pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );
! L1 M( o3 E" O1 n/ e$ }4 A! p! @  d' T( x7 [& ^  p
                                if( pPlayer->GetFatiguePoint() >  pPlayer->GetMaxFatiguePoint() )! t! d( U, x" [/ _: a' i: P+ t
                                         pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );- ?7 |' a' }" a; ~, K! K& X
" V- W* m4 W8 w. X. s, x
#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver
4 G( B/ b9 g6 S% |# ?+ z9 m, k3 P+ b
6 ~" b5 i1 R$ E1 ?1 E6 k
4 m) ~# Q: M/ k& t; q* W

相关帖子

回复

使用道具 举报

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

本版积分规则

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

GMT+8, 2026-1-28 18:03 , Processed in 0.060653 second(s), 23 queries , Gzip On.

Powered by Discuz! X3.2

© 2001-2013 Comsenz Inc.

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