飞飞世界论坛

 找回密码
 立即注册
搜索
热搜: 活动 交友 discuz
查看: 17233|回复: 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
! J# i' K! _: II posted this because someone kinda posted a youtube thingy about it :O.. b$ }, V* Y/ z$ {4 r

, b+ }# u6 \& ~# g2 K7 D+ _, fFind this in DPSrv.cpp @ worldserver
7 ?( l7 m6 C( e& c( }8 r* k8 T; P- G* I4 L: A
Code:0 Z2 v5 w7 F' R+ i$ l4 [2 D
void CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize )
2 H3 C6 s+ Z0 ^; J' P% v' H{
; w4 n" y' o7 X$ l) r) p2 y4 Z        DWORD nId;% V+ q- N8 P3 H$ P& D8 }
        int nPart;5 n5 }, p. `& x3 P; j

6 \4 Y8 Y3 b& s        ar >> nId;9 C  w$ \. V3 H. x
        ar >> nPart;                5 ^7 ~) K/ W5 `3 Y( ^
       
7 `( {, I$ y) a. M3 @7 l        if( nPart >= MAX_HUMAN_PARTS )        , `; U+ U& ]' m3 S, r9 D
                return;
7 \5 a2 n& v& I1 {9 \) w$ A2 h, |( k- U4 E4 H, l% r
        CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it; ~" D# w1 o6 f! c+ L$ I# D
. i& ?; b' ]" K$ r2 A. d! l# c
9 u6 f- i8 t. B* w- w
Code:. o( ~. Z. K/ r8 ~- f6 Q; _
#ifdef __QUGET_SWAP_FIX
) p& d3 I7 @) W, h; `4 Q7 e' Q2 B4 Q0 o
                                if( pUser->GetHitPoint() >  pUser->GetMaxHitPoint() )
0 d% N; J( v" c* b$ T' \                                         pUser->SetHitPoint( pUser->GetMaxHitPoint());
5 ]4 g5 t( x- j. @& K* _  ^4 C  J  z9 g# r  K' I
                                if( pUser->GetManaPoint() >  pUser->GetMaxManaPoint() )% v, Q, R5 J- `
                                         pUser->SetManaPoint( pUser->GetMaxManaPoint() );' \) M& K  ]. s% |! T

& P) E3 ~) @/ c, o                                if( pUser->GetFatiguePoint() >  pUser->GetMaxFatiguePoint() )
; @3 H/ Z  E* O5 O                                         pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );
$ O; K3 V; E' c5 x
( |! o, C+ Z7 h+ U7 N1 A1 O! b#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp0 A& e+ [) @- y9 q) K
and add under; M/ C' @- L* e+ ]" j
$ Z7 a& a0 v8 [. c  ]7 w' L  T$ r% u$ R
Code:" b* k8 b5 e' R9 Y- z9 S5 g
if( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel ), g" {3 {6 d0 Z" U
                        {% O/ [! z( E9 v' a. Q. L/ y# p( {
                                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 );, P/ a9 k6 t0 Q& H+ N3 e
                        }this
" l0 d1 K% W4 L( p9 ~% m9 d* l+ E$ r7 P# V
Code:" ]8 c. Q7 B) t/ M' k
#ifdef __QUGET_SWAP_FIX5 @0 L+ W7 O. [; Q
                                if( pPlayer->GetHitPoint() >  pPlayer->GetMaxHitPoint() )
3 A: w  k- a( m! d* [1 Y2 S" O                                         pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());
, `% o% e" T6 l8 J! {4 K
  E7 M3 W9 ~+ H' Z- U0 H, V: l4 T                                if( pPlayer->GetManaPoint() >  pPlayer->GetMaxManaPoint() )
. h0 P% F# {. a+ `                                         pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );
  {1 O; O4 i+ g1 Z5 Z
3 L1 j  a! }. f+ f                                if( pPlayer->GetFatiguePoint() >  pPlayer->GetMaxFatiguePoint() )
( e) k0 h/ e% V7 I2 g" v2 K, V                                         pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );: \1 p9 S6 t7 k, G- Y* Y6 r
/ t, f) K. k* D0 U/ B
#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver 6 p- E) b7 f) [
. y+ y# M: j' z2 [

1 S0 U2 T: s4 ?2 G

相关帖子

回复

使用道具 举报

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

本版积分规则

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

GMT+8, 2026-1-25 19:10 , Processed in 0.059485 second(s), 24 queries , Gzip On.

Powered by Discuz! X3.2

© 2001-2013 Comsenz Inc.

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