飞飞世界论坛

 找回密码
 立即注册
搜索
热搜: 活动 交友 discuz
查看: 16249|回复: 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 * t. Y' f4 F. R
I posted this because someone kinda posted a youtube thingy about it :O.
+ k5 x- }7 F/ ^* d3 V
9 [. W  k- k) b3 [Find this in DPSrv.cpp @ worldserver& |9 ]$ L9 @. F1 u; i7 `; c. t
% i$ E: V" s1 k4 v7 V3 E
Code:6 q+ E8 D- [, H* Q& G" ~
void CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize )5 {, G& C  P; C5 ~3 U
{
' a" l% z7 ]5 }8 E3 g        DWORD nId;
$ h8 ?- Z1 X. c1 u% `        int nPart;2 D4 H4 e! {& L$ H& P% v3 Z; u
! W, k# P, v5 Y$ k( h* A
        ar >> nId;
2 r) P9 R& S' R        ar >> nPart;                ( x2 n' b1 L0 V! G0 n
        * b/ p/ L/ p7 \
        if( nPart >= MAX_HUMAN_PARTS )        % n& \2 A* h( A# N0 f6 [# ]9 x4 I( H- D
                return;
2 O8 D5 r2 q, v- J# s
' \7 \5 X7 _7 R" k0 ?        CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it/ e) w0 T5 Y" D- x* \
8 B1 T" |8 p: i9 d% A0 K
, d6 t3 [8 p% P  S' w
Code:
0 ^1 ?) y$ R! s* ]& S! y3 P2 F#ifdef __QUGET_SWAP_FIX
6 r% |7 f3 Z) @! j: a
9 v) l0 f6 n8 |% K0 K                                if( pUser->GetHitPoint() >  pUser->GetMaxHitPoint() )/ ?1 V5 v7 q, v! @- j; E6 t
                                         pUser->SetHitPoint( pUser->GetMaxHitPoint());( {, x. [, k5 u) k* c. R
2 m' C" @1 C1 }2 I3 |9 l4 a1 f6 F
                                if( pUser->GetManaPoint() >  pUser->GetMaxManaPoint() )
2 n( y# ~. Y4 D9 }6 o! A                                         pUser->SetManaPoint( pUser->GetMaxManaPoint() );
3 c2 U3 o' E% p$ G' N4 `$ ]
$ t) M, U1 k% v( U                                if( pUser->GetFatiguePoint() >  pUser->GetMaxFatiguePoint() )! F" ~" c+ M5 I3 c. Q
                                         pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );* [# k$ ?- u! K% W- Q/ f0 ^
. \, h. x! L2 G% |9 @
#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp" j% S6 P6 s4 N; h% x' Z
and add under
, c% T/ Q4 U  g# T4 @2 h* |% a( \
Code:
, ~4 {  u: i8 x+ ~if( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel )) d" S9 S; s1 u0 e3 b7 J8 l$ d3 i7 P
                        {
6 Y1 k- S8 E) u' \! k                                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 );5 r. o/ R) }( s1 c% i8 [& K$ L) H/ L
                        }this$ P- s8 O% ~! _% G4 b+ c7 u) n: a
- n; Z. d' ~3 i# M( `/ t$ c
Code:$ g( x( U" `8 I; f; i2 e- l
#ifdef __QUGET_SWAP_FIX! n. E' C; s( r6 R! d
                                if( pPlayer->GetHitPoint() >  pPlayer->GetMaxHitPoint() )
, Y: q* N$ L# ]! x                                         pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());! q, d4 O1 y) r' x! E

# J4 v5 O6 S9 Z                                if( pPlayer->GetManaPoint() >  pPlayer->GetMaxManaPoint() )
/ {6 M  F$ p; y7 r                                         pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );
" o( E! p: l1 J& H* j- j
, @1 L3 L6 f2 W* M3 l* f% C. {                                if( pPlayer->GetFatiguePoint() >  pPlayer->GetMaxFatiguePoint() )
% V+ K* J' [+ ~6 ~9 Q9 h6 G                                         pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );
% G. x0 y4 F# @- y( ^2 h7 G! }  B% K3 n+ R) c
#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver
7 q* w. ~3 g, c  |! D" ]
7 S+ P7 K$ C% R$ M+ a/ G5 I$ E2 q" m: |7 d+ [

相关帖子

回复

使用道具 举报

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

本版积分规则

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

GMT+8, 2025-11-30 11:30 , Processed in 0.114476 second(s), 26 queries , Gzip On.

Powered by Discuz! X3.2

© 2001-2013 Comsenz Inc.

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