飞飞世界论坛

 找回密码
 立即注册
搜索
热搜: 活动 交友 discuz
查看: 16224|回复: 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 / q3 u. f2 u" d$ C5 R) l/ N: b8 v
I posted this because someone kinda posted a youtube thingy about it :O.
: x+ l$ X# a5 M# _8 K1 _" M2 I% j  b; z! c; b  Z2 N( X
Find this in DPSrv.cpp @ worldserver9 H! q" K+ W5 I# P! K1 L

- [$ q& n3 \7 j2 V! _Code:
8 @4 p( S- w, A7 R8 S* ivoid CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize ). R$ h+ D2 H; |3 l3 H7 U
{
! }- F- P. e/ a& v        DWORD nId;
0 \& y; i  t1 M        int nPart;
0 L$ T: {8 I# W; F0 I2 u4 I! `
2 x* ]$ a* j! O6 D        ar >> nId;
/ i' r# L: V8 ?3 |# ?        ar >> nPart;               
7 Q6 j4 X  S$ _. t( h$ J        $ H8 B: m8 K7 \/ ~: J" A2 L4 m
        if( nPart >= MAX_HUMAN_PARTS )        9 |! L/ x) U2 M6 e, [9 P0 l% E7 i4 d/ O
                return;
4 e7 @* W$ }; k9 {& H$ N  `4 u& P# W2 p
        CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it
; c- L; C8 G% N. t8 A: f: F, u! ]/ I! c# [; z' k( h

5 q! K3 b  h1 Q$ c0 o- `( C0 Q* PCode:. y6 m' b3 D# I" V
#ifdef __QUGET_SWAP_FIX  A& q3 t; i( n1 B7 T$ P% I  T

" |% Z  {2 J& O6 w0 A                                if( pUser->GetHitPoint() >  pUser->GetMaxHitPoint() )
0 B- U" u" p" {( V7 ~5 ~1 i) u7 q                                         pUser->SetHitPoint( pUser->GetMaxHitPoint());! g& r6 N8 L$ Q" v9 A) u: ~
" J% S) a( s) u
                                if( pUser->GetManaPoint() >  pUser->GetMaxManaPoint() )
/ I- o" P6 h) K% ^/ v/ S& U4 j                                         pUser->SetManaPoint( pUser->GetMaxManaPoint() );/ ]% S2 Z1 v* A* b* o

# c0 S, C9 d% J3 ^+ w9 m: P6 e                                if( pUser->GetFatiguePoint() >  pUser->GetMaxFatiguePoint() )
6 q2 a' T" I$ p4 I- s, u. f                                         pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );0 g2 E2 P' _6 ~1 z+ M
/ e; c2 N; N/ T+ U' d3 v/ p
#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp
9 F& i( B8 A" j3 W4 A( L/ Yand add under* P* T- {+ o8 j, i
; {8 d) B: g2 U8 M9 H( T- P
Code:
# Y/ Z2 w5 a, D. Vif( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel )- n9 ^9 W. j$ H5 L7 m, [( v
                        {
- C; M, `& @* n% |* m# t+ N$ i) J                                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 );4 o( H- E/ Y1 @# s: W
                        }this
0 J+ o0 a3 _$ ~8 ^; M  O1 W
. H- u2 K3 g9 L9 l1 W7 }Code:
' s' Q* A+ @; m8 T* _6 P#ifdef __QUGET_SWAP_FIX
" c. J8 H' N8 u$ F$ W                                if( pPlayer->GetHitPoint() >  pPlayer->GetMaxHitPoint() )# R) ^- x" X3 P0 k7 h
                                         pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());
5 z( V" s  p. `% M8 y. E* K* {. Q3 o8 [9 ^: L3 J
                                if( pPlayer->GetManaPoint() >  pPlayer->GetMaxManaPoint() )
0 m4 Z5 }5 W: q8 S! u5 J                                         pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );* v! Z; q+ b& B3 f" h& T" \

0 O3 Q4 A9 Q% k) O9 E                                if( pPlayer->GetFatiguePoint() >  pPlayer->GetMaxFatiguePoint() )
' t; S0 d9 _1 \5 Q, }- n+ E" H) h                                         pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );
) U: x+ M4 Q: ?, _. H
/ ]" B: a$ o8 g" k#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver
9 P+ H' e. W/ N
$ s$ A( X" N4 I$ _; X
; G# W& i. R* B! e, i* b) l9 A

相关帖子

回复

使用道具 举报

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

本版积分规则

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

GMT+8, 2025-11-27 12:40 , Processed in 0.063044 second(s), 26 queries , Gzip On.

Powered by Discuz! X3.2

© 2001-2013 Comsenz Inc.

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