飞飞世界论坛

 找回密码
 立即注册
搜索
热搜: 活动 交友 discuz
查看: 17019|回复: 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
* B7 b' e& i! M8 xI posted this because someone kinda posted a youtube thingy about it :O.3 B5 G& H5 X  C; O" R* S

2 h& o8 T7 Q9 ~* K# v# t8 W& o3 ?Find this in DPSrv.cpp @ worldserver8 {- Y8 g* x" |
0 G; I+ w' D- M: ?, T
Code:' E! q% l) G+ B+ h* R  ]7 N7 W3 E
void CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize )9 W+ _) F& J. n( z# T% D3 v
{
. R2 X( v+ j. G; `: ]( M2 y        DWORD nId;
2 e6 j7 }% ]4 V        int nPart;' J/ A" B* f3 Y& C8 ~+ F! ?4 X

7 v. ]1 v% f, X" _/ I; X        ar >> nId;
. T/ D. O! Y5 Z7 n        ar >> nPart;               
/ m/ e9 s8 w; W5 X9 Y       
  \0 b6 s2 s% i& n9 ]        if( nPart >= MAX_HUMAN_PARTS )        ) k. n' {& p5 X% S: m
                return;
3 J3 ]9 w4 a' v" Z8 M: M
: f6 z8 h. }  [2 F8 |, g        CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it
1 G, {" M7 @# v/ \! s5 F
4 o' Y, P% {+ E0 a: S9 M( b
* s- V1 |* V! WCode:
( |$ n, y( A- K+ ]$ X#ifdef __QUGET_SWAP_FIX
5 T+ z0 y* ?* Q( {: s7 Z0 p9 k
0 k2 j# g* y& r: ~+ l$ }" i- s                                if( pUser->GetHitPoint() >  pUser->GetMaxHitPoint() )
8 f  n& E9 Y9 p9 L& v0 Z                                         pUser->SetHitPoint( pUser->GetMaxHitPoint());. }* e; r+ w" r% O+ x
- o8 h" i$ |% \$ R& ^  B( f/ O
                                if( pUser->GetManaPoint() >  pUser->GetMaxManaPoint() )2 ]; o; y: N0 r8 v
                                         pUser->SetManaPoint( pUser->GetMaxManaPoint() );
) @# e, v5 D' J$ k8 u( F2 ?" o' P7 ^/ t% \, P; ^0 b4 b+ A5 ?- ^% ^1 }7 u) s
                                if( pUser->GetFatiguePoint() >  pUser->GetMaxFatiguePoint() )) G3 O! H6 i$ k; R+ X
                                         pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );# B6 i$ ^: {) X) h% L' _  m
8 j( @, K; X9 N! l
#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp
4 k, L) R- x0 C" y' T3 N$ m! M& land add under" t2 U- t9 Z0 P
" K9 k; S! y( ~( C- |: i# F. i
Code:. X: @# y* h% |' p2 M
if( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel )
" F& Y4 I2 A2 _9 ]+ \                        {8 a0 I& z" g/ t1 w3 H8 j( }; W" J5 f
                                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 );
8 ^7 c8 y# Z$ M( x( m3 |                        }this2 ^/ g/ y; F4 H7 k4 u% A2 N. ^

& z0 J, q: K% o1 W& A, mCode:
% g. `3 D9 }: b% b  B' N: l7 q#ifdef __QUGET_SWAP_FIX+ G/ h; D/ Q' Z$ W6 o
                                if( pPlayer->GetHitPoint() >  pPlayer->GetMaxHitPoint() )
; W2 s$ V0 u8 Y( @4 S; p                                         pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());; [4 p: V) f/ K, Q+ G4 E: i
& y0 e) {; ], G% E& a, f
                                if( pPlayer->GetManaPoint() >  pPlayer->GetMaxManaPoint() )
2 p. M! M8 s6 O4 F4 {8 R# p                                         pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );' Z7 q) X' s5 @5 }
+ }- D# {' X) N4 {: t
                                if( pPlayer->GetFatiguePoint() >  pPlayer->GetMaxFatiguePoint() )2 r: G: s# q1 U2 ~% p. \5 x
                                         pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );: c; D" Y* M$ K" O6 K% c) Y

$ z$ A7 b. j2 A  V2 F#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver
2 f) S/ P, c( I1 A
5 p% J" d, R0 K. X! W% t  C
4 L/ l8 {$ Q; B& D

相关帖子

回复

使用道具 举报

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

本版积分规则

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

GMT+8, 2026-1-18 08:59 , Processed in 0.062211 second(s), 26 queries , Gzip On.

Powered by Discuz! X3.2

© 2001-2013 Comsenz Inc.

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