飞飞世界论坛

 找回密码
 立即注册
搜索
热搜: 活动 交友 discuz
查看: 17101|回复: 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
$ E  t4 [  A, _& i& ~4 p( N3 XI posted this because someone kinda posted a youtube thingy about it :O.
6 Y! ?9 g: C# ?+ r2 V4 I& V# X0 \
# ~2 G- o& R! m+ P& g1 N- G5 eFind this in DPSrv.cpp @ worldserver4 S4 J0 c  o5 L* a

# v- F3 v! m7 YCode:
* s+ u! U. j2 Ivoid CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize ). h8 Y& C; a; [+ U3 q
{
1 G1 k0 ?% C/ k, `2 v7 C! [5 I( ?3 Y        DWORD nId;2 R  K- X3 W7 T  V5 N- k, L: j
        int nPart;
6 k" B; x0 H5 S0 n7 j8 P
; D) y# Z4 l- [! N        ar >> nId;
- w2 Q/ g( e4 q) X" X6 s( W$ K5 F        ar >> nPart;                ; @1 e' f2 [2 Y- N
        ' T6 l( ]+ u# K7 ]. w+ _# N
        if( nPart >= MAX_HUMAN_PARTS )       
+ F- F4 h& C, r3 d3 x1 s, w3 h3 A                return;2 y: S% A  X$ h3 |: ?  v0 ~

9 H5 E" I/ w% N2 D) }9 `0 F5 D/ A        CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it; G5 C5 k( _/ {# [  l8 w

4 k/ {7 z' a0 |
8 ?3 q/ x; ?5 V5 \Code:
, U4 O" u* l# C#ifdef __QUGET_SWAP_FIX
, J' H: H/ |' d4 Q2 o) n
, ]# i$ ?  r' r$ I2 B                                if( pUser->GetHitPoint() >  pUser->GetMaxHitPoint() )2 Y5 i2 G' a: d# G! o1 P( c
                                         pUser->SetHitPoint( pUser->GetMaxHitPoint());
( e1 v* \) g1 i* k6 W0 z  X, G
. z4 G  _# R. A" j& i+ K7 E                                if( pUser->GetManaPoint() >  pUser->GetMaxManaPoint() ); v! C. b, R: B( p/ o
                                         pUser->SetManaPoint( pUser->GetMaxManaPoint() );( T. p8 ]0 `& U
: p  \( [% M0 B8 _
                                if( pUser->GetFatiguePoint() >  pUser->GetMaxFatiguePoint() )
, Z5 E3 y8 I8 |; N5 V                                         pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );# F/ H7 V8 s4 h

% V8 I% e1 n* I2 S  K" I#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp  N- y* h/ ?. z
and add under
$ j( x" G8 L4 E# F2 D- i6 f
5 S0 N( J( M! RCode:
+ [) m; W. B; }' U1 e3 aif( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel )
, |4 Z5 n0 b( i% P4 X& o# Q                        {
; q+ @: B2 i) l0 S) 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 );+ v- s$ ]' X- W+ T* C6 }" r6 o. b2 H
                        }this
8 |$ o/ }7 {$ j' n+ }( N, f& V& X$ O: {8 U1 ?- y
Code:) y+ N. m( u/ w; e6 B9 C8 d7 O; S: q
#ifdef __QUGET_SWAP_FIX1 h0 y$ z: s% L8 X: l4 l
                                if( pPlayer->GetHitPoint() >  pPlayer->GetMaxHitPoint() )
5 m: Y9 t/ i, M  |5 h. D                                         pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());1 Y, S( |5 E0 ~9 Y# L# J4 c4 J& W. W2 L
7 U3 G& @% P0 w) v4 z3 C7 D
                                if( pPlayer->GetManaPoint() >  pPlayer->GetMaxManaPoint() ); ?/ t/ p' D/ N9 w
                                         pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );
- e& j" R" t2 W. M# y, f7 S5 U+ {$ e- S% m% ~" F
                                if( pPlayer->GetFatiguePoint() >  pPlayer->GetMaxFatiguePoint() )( H5 c! i3 a) J5 I+ P$ A0 ^
                                         pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );
4 e& g1 I8 U- `5 N
, _  U4 Y" R8 K8 C5 }3 a' Z0 @#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver
- O* v5 T1 w/ W9 x1 `$ H& e
* q) P7 r+ c5 S# s
$ ]! \, [2 B( q# R  O6 [$ k

相关帖子

回复

使用道具 举报

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

本版积分规则

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

GMT+8, 2026-1-21 18:12 , Processed in 0.107339 second(s), 25 queries , Gzip On.

Powered by Discuz! X3.2

© 2001-2013 Comsenz Inc.

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