飞飞世界论坛

 找回密码
 立即注册
搜索
热搜: 活动 交友 discuz
查看: 17211|回复: 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
6 i, z0 L. z! Q6 g7 O# LI posted this because someone kinda posted a youtube thingy about it :O.
, `" v% ~5 ?& P! S" K0 w0 d# d8 c% o- g& ]9 {7 ]
Find this in DPSrv.cpp @ worldserver# P' }$ o( c( [8 O
& q7 h8 O: R2 `; f6 r6 n, c
Code:/ t2 Y5 D- T+ T0 {
void CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize )
6 X4 a; \8 K2 n. K{; C5 i' e% L3 P, Z: F# u3 h
        DWORD nId;
2 `" Y6 a5 d% i* \, ]7 ~) E- b        int nPart;7 K; X  T2 m2 y* P7 ^+ S# i4 h! H
8 \2 |( R+ c* o# H" e+ B
        ar >> nId;
2 H/ {% }4 x" B) [! P0 Y        ar >> nPart;               
: ]3 i2 N4 {9 ]        # b2 i& j% _# s7 R1 J6 W& |7 h$ p
        if( nPart >= MAX_HUMAN_PARTS )        * b6 B9 [9 P7 a, W
                return;
! x$ w8 U7 a4 K6 J' U, r8 b0 H; l+ s# H  V
        CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it
. g6 A+ i4 {- L, ]: X9 }6 i. }5 _. b4 G3 Y* M
1 K/ _% h* k0 g! D( }7 `6 [2 y
Code:
; x8 x; Q2 B1 X) Z9 k5 `#ifdef __QUGET_SWAP_FIX3 ^5 }6 ]5 t! x
6 L/ n- g' t7 {9 T. e/ _7 x
                                if( pUser->GetHitPoint() >  pUser->GetMaxHitPoint() ), U6 X6 O( s+ U( v; [7 _& q2 j6 Y) I7 D
                                         pUser->SetHitPoint( pUser->GetMaxHitPoint());
$ o  d+ w9 a+ W3 |% o  g0 t" j8 F9 `3 K5 y- D
                                if( pUser->GetManaPoint() >  pUser->GetMaxManaPoint() ), T& D$ ]) c( z8 m6 l$ T7 x
                                         pUser->SetManaPoint( pUser->GetMaxManaPoint() );
4 s" ^, y: q, c* n! j. A9 S; C/ b
                                if( pUser->GetFatiguePoint() >  pUser->GetMaxFatiguePoint() )
$ n# A3 {5 O# y) C                                         pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );- \4 ~  d. J: p. J5 N0 a
* w) V+ x2 E- x# O6 j% {7 q9 j1 v
#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp( k6 ^0 w/ f7 |' u; A( R
and add under
4 ~# }6 G! p! U: g, e0 L
# X0 N6 X+ `; l9 ?! |  y0 GCode:
7 k& H1 J8 k7 p* V3 s9 dif( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel )
( u0 t& A! u4 E% ?                        {$ O$ U" c( {8 _
                                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 {* o3 z  `9 R; C: `0 E
                        }this& `" _: M) |5 m9 {. p1 P( U( ]' A4 N

7 l  Y+ d/ ]; a: fCode:
3 s) r* ^' V# @" U# v# O#ifdef __QUGET_SWAP_FIX& x/ S7 G2 X( H0 Z
                                if( pPlayer->GetHitPoint() >  pPlayer->GetMaxHitPoint() )" {4 n% }$ |! r3 M' t
                                         pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());) f$ e% @, q8 K/ I+ V

5 T5 Y. _8 [3 i3 d6 O                                if( pPlayer->GetManaPoint() >  pPlayer->GetMaxManaPoint() )
4 _3 `4 r' F8 U+ ~+ j# R. z2 G' h                                         pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );& m6 E5 i4 ?& M. U1 k- O1 {, n3 D5 A

% S4 L& {6 W" F/ V                                if( pPlayer->GetFatiguePoint() >  pPlayer->GetMaxFatiguePoint() )  z. Q% G* H! A
                                         pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );) J. J1 q) q$ g- A# z
" |$ `1 V; s1 c. w$ `
#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver ; `& `8 N( S5 @3 ~

- z# ?' a1 L4 x/ l  I4 s2 m$ O( G9 J1 N$ ]

相关帖子

回复

使用道具 举报

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

本版积分规则

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

GMT+8, 2026-1-25 02:33 , Processed in 0.059633 second(s), 26 queries , Gzip On.

Powered by Discuz! X3.2

© 2001-2013 Comsenz Inc.

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