飞飞世界论坛

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

修复交换错误

[复制链接]

197

主题

203

帖子

1064

积分

管理员

Rank: 9Rank: 9Rank: 9

积分
1064
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 e8 O$ f+ a2 d! yI posted this because someone kinda posted a youtube thingy about it :O.* g8 u5 Q; Q, P* c
  _! [$ y! K  h; _% e
Find this in DPSrv.cpp @ worldserver
- s/ E+ \8 j6 \
6 @' h% c, T7 ~/ f$ SCode:
+ |0 I7 [* M& c  n. q1 j6 tvoid CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize )
. T' P/ R/ `; f& e{
( h: Z5 e0 g4 E* ?, j9 H        DWORD nId;0 L2 l- r2 o& Y* \- R8 r* O9 M
        int nPart;
5 X1 f& R+ k/ Y* K2 r" B" M& T- a" ?7 f7 z# u3 q# B
        ar >> nId;3 K% I/ H8 U5 ^4 z/ R" z8 G, G
        ar >> nPart;                " ~6 e6 H. E* G# V- M
        3 b% W* f* J! x" E6 t* }* O
        if( nPart >= MAX_HUMAN_PARTS )       
" Z" W; r7 h& n& ^) d7 J. N                return;
, U: w3 E4 ^& p! j" A5 c/ L& h. `, M9 H- ^$ P6 ?4 d9 m  B; |" N
        CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it8 z" z& D& _0 o2 U1 M8 O4 Q6 x

4 g  T3 y. c/ h8 w& [
" r9 D0 X8 }4 U, V& hCode:; j& T% [3 Q4 P! U6 r
#ifdef __QUGET_SWAP_FIX
# V1 i* ^* l& J2 p0 g0 ?# D( H8 Z* l5 m: [; E
* g# Q1 U9 U5 e9 ]2 X                                if( pUser->GetHitPoint() >  pUser->GetMaxHitPoint() ), h' M% K3 e' x
                                         pUser->SetHitPoint( pUser->GetMaxHitPoint());
* z! T5 I' @  Q9 E! Z: E2 X! b" Z) g" j( w  R
                                if( pUser->GetManaPoint() >  pUser->GetMaxManaPoint() )! P3 r% M7 b3 m  ]2 z
                                         pUser->SetManaPoint( pUser->GetMaxManaPoint() );% x) _. S" q& F7 p3 Q5 p+ Y

" v4 D8 W  r  O  v+ q                                if( pUser->GetFatiguePoint() >  pUser->GetMaxFatiguePoint() )" d3 t$ G9 d' x- W
                                         pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );# A& J9 F- P! P

0 j$ B9 g( X3 S* O5 q#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp
; o" Y# [5 g4 ?% o9 w0 Fand add under5 ]* Q" s7 V- R- X" `; {9 p* l
. Y/ {# F$ _7 q$ X
Code:
1 Y) t1 @# r7 W' lif( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel )
% I6 d3 R$ b9 [% n9 e: K' o                        {
/ ]. x4 E9 n* Q1 S: N                                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 );& w; T8 g" \+ O0 W  K
                        }this
9 i# g+ `0 g/ q% D& F/ J; _/ b7 D3 L. j+ s+ K
Code:
9 c! }0 \) [9 s1 W+ j$ a8 Z#ifdef __QUGET_SWAP_FIX! W" ]6 }, [& J. `% y3 R) t
                                if( pPlayer->GetHitPoint() >  pPlayer->GetMaxHitPoint() )
! f0 T' `* v/ s/ s# L/ ^                                         pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());+ H% m* n5 y3 p. l  ?: m
/ V+ l; B) g1 Q- D& Y; _
                                if( pPlayer->GetManaPoint() >  pPlayer->GetMaxManaPoint() )
3 N; |) {: [1 c9 s& x                                         pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );; ^' H( i) G8 a3 Y! B* h

, R0 U) o/ k: Y                                if( pPlayer->GetFatiguePoint() >  pPlayer->GetMaxFatiguePoint() )
' X% C/ X% P0 _9 Z  B( c                                         pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );
$ C5 h8 r5 S$ o7 t2 F  c+ K% H- \+ S0 c3 h0 y
#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver 3 c! Z# F3 c. q; n+ @: Y
8 B3 H) Q; G9 \$ O1 c
' E4 e1 ^. T% w" D8 `0 j

相关帖子

回复

使用道具 举报

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

本版积分规则

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

GMT+8, 2025-7-1 07:43 , Processed in 0.059234 second(s), 24 queries , Gzip On.

Powered by Discuz! X3.2

© 2001-2013 Comsenz Inc.

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