飞飞世界论坛

 找回密码
 立即注册
搜索
热搜: 活动 交友 discuz
查看: 16950|回复: 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 4 G$ |0 p; S2 _  T
I posted this because someone kinda posted a youtube thingy about it :O.
8 I6 K6 z5 e2 d4 _4 k" k( g% }0 S1 _% o. t
Find this in DPSrv.cpp @ worldserver; J- `+ p. w  X- b8 g, n. F
. r& s  E3 x/ w. m; Q
Code:5 s4 D. z# W: u3 j
void CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize )! J6 X' N5 K+ N" u- o
{
! d1 O7 H& }" y: H5 k, p/ s        DWORD nId;% g, n1 l9 Y5 G& `/ j
        int nPart;
* C) F) C' c' T( ^& e9 @- n$ k7 H0 V( s( p
        ar >> nId;. B" a/ W7 B+ f+ O2 C0 M  d7 Z$ |
        ar >> nPart;               
, t! x# A6 ~1 _7 {       
, r1 G2 b4 P, A6 B        if( nPart >= MAX_HUMAN_PARTS )        - j. V; {% D( F% c5 Z
                return;
: g( ~4 @: z& n8 s! J# q5 H' V
5 E: l6 y1 O; C5 V3 l" J        CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it. c- M6 V2 |, m, y
9 q# W3 J- {' _2 R3 J4 X7 ]  g

0 \" h- Y- w  y7 f& m3 `* H3 y+ XCode:' m2 d" W4 w9 C/ ~- B0 X+ Y: P
#ifdef __QUGET_SWAP_FIX4 a* |/ O* t# p8 }5 X4 R$ x
' {7 d" s( \- N$ U' E# \. w1 K
                                if( pUser->GetHitPoint() >  pUser->GetMaxHitPoint() )! S- t3 \8 F; B0 B
                                         pUser->SetHitPoint( pUser->GetMaxHitPoint());- o( p# }* p: h  X; t
6 d3 @& R0 _3 B
                                if( pUser->GetManaPoint() >  pUser->GetMaxManaPoint() )
' o5 a" k: y- n4 ?" l                                         pUser->SetManaPoint( pUser->GetMaxManaPoint() );! V# @' s) ~& u0 O8 J

% \- M2 g/ ^3 c8 ]                                if( pUser->GetFatiguePoint() >  pUser->GetMaxFatiguePoint() )1 I& r* _) c( k! ^: X" X( ^+ j
                                         pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );
7 z  ]: _! ~) p5 }) ?/ O0 }+ t8 ~: k
#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp
/ [8 }. R! L  P& j% Mand add under
. ], j( S# f7 ^1 l
' [1 a3 Y# s+ ]* V  }4 BCode:8 g8 u0 h; h9 P8 w
if( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel )! ^2 x' {. n- }$ S* l
                        {
7 q+ z3 x& N! Z                                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 );" _+ p4 J. S$ ?+ L. Q4 W! k2 u
                        }this
! B! Q2 i4 d& t& k' U& P, h( p. u/ v1 {2 a& y4 M* p+ @) B( a
Code:
" o/ `% R6 ]& Z  _9 v) K1 D( B#ifdef __QUGET_SWAP_FIX4 u# [  Y2 ]6 d+ B8 `
                                if( pPlayer->GetHitPoint() >  pPlayer->GetMaxHitPoint() )9 s4 A4 A* m* K2 z' x
                                         pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());. A! n/ E2 B8 T9 A: m

) K6 D+ t. V8 i. \                                if( pPlayer->GetManaPoint() >  pPlayer->GetMaxManaPoint() )
; U8 E% N. }. ^$ k0 w- U                                         pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );
! p1 Y, q' K2 a: N4 o2 g* N0 ^% z8 r/ H5 c
                                if( pPlayer->GetFatiguePoint() >  pPlayer->GetMaxFatiguePoint() )
! u8 T/ \: U$ u                                         pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );
) n5 M8 Z3 O9 a% o9 f" Q, R' j" F9 g6 T# g+ M6 Z
#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver
% p# K7 P+ d9 C0 J+ E" A7 g& D( a" E1 E0 K& e0 h, q) C0 P
+ c  M( V/ C, C' w, g

相关帖子

回复

使用道具 举报

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

本版积分规则

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

GMT+8, 2026-1-14 10:59 , Processed in 0.060608 second(s), 24 queries , Gzip On.

Powered by Discuz! X3.2

© 2001-2013 Comsenz Inc.

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