飞飞世界论坛

 找回密码
 立即注册
搜索
热搜: 活动 交友 discuz
查看: 16674|回复: 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
) N6 h( ^( j/ R$ G+ @0 U5 c/ ^I posted this because someone kinda posted a youtube thingy about it :O.3 }& c- y) H5 E- f: ]; J* W

* w& @9 D6 L- Y% h; oFind this in DPSrv.cpp @ worldserver' H9 E* t- D: a/ w1 t% [' p. y* H# E
$ `; j- @0 k5 I2 z2 W
Code:
- \3 x( u+ D) n$ f$ x& qvoid CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize ), T+ z! p* v4 W: N5 A
{
7 _. S' i( x3 Z" I, B+ M# E  x' l        DWORD nId;, C8 P" p; {! e( O
        int nPart;5 N; R- _9 X9 [+ `. @
& I2 F5 f- t# z( p- @+ J9 y
        ar >> nId;
8 L4 u1 s+ s! F$ f- l8 g" A        ar >> nPart;               
3 u, e1 K% x7 o  o. u4 f       
+ Q8 R% x3 M. ^! N        if( nPart >= MAX_HUMAN_PARTS )        " ]( E3 M* {, q( u  l
                return;# p7 s. Z* c/ [% \8 U
7 d) A, o" ]4 ?% m9 ?
        CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it
, X) G$ B- `! {0 e! y4 F% b9 R3 g  \/ n" l
7 M! a: y  i# I8 M
Code:
* w5 H9 S6 z% U9 f#ifdef __QUGET_SWAP_FIX
4 W6 w# K1 M- e% T3 m; W
5 S( C, G% m$ J/ ]                                if( pUser->GetHitPoint() >  pUser->GetMaxHitPoint() )" K6 `: I. J9 q, T+ _/ w
                                         pUser->SetHitPoint( pUser->GetMaxHitPoint());
8 N& ~4 g3 L9 Q+ S5 K) y1 d6 s+ O; _# b$ u0 K
                                if( pUser->GetManaPoint() >  pUser->GetMaxManaPoint() )
0 P. \: F" F; m  P                                         pUser->SetManaPoint( pUser->GetMaxManaPoint() );
6 }3 w" s. h/ w  x! f7 `/ h3 }# Y) Z6 s
                                if( pUser->GetFatiguePoint() >  pUser->GetMaxFatiguePoint() )
& V: J+ |8 q9 i# d$ S9 M' _; S                                         pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );# Q5 ?) ?0 Y, [+ O3 J; t$ K

" c" F. {/ v) C1 s' V; p#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp
/ ^5 L. g' I) Z% E' Iand add under
; L/ y5 _% p5 ]! N2 ]0 [% @- ^; o
: {9 l4 L* N. {- J7 y, o2 u; kCode:  {3 [' i: A" e1 r- }: ~
if( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel )
: n  {1 F; G  K6 d0 D                        {% `; U' Z/ |+ N  H- X7 y3 {
                                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 V# P+ U* J' x1 T3 F4 u$ a
                        }this
3 Y3 ^6 p' x; p/ ]6 X/ v: j. S& I5 k3 k' j$ R
Code:; ~0 e( H7 {- i( D( k
#ifdef __QUGET_SWAP_FIX2 P5 O8 F2 H0 z) G+ G: M, ~1 ]
                                if( pPlayer->GetHitPoint() >  pPlayer->GetMaxHitPoint() )7 R2 A! w( E" A/ ^8 ^- D
                                         pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());
0 b. |1 W9 S2 B- `
; g+ q5 t/ {+ y% E                                if( pPlayer->GetManaPoint() >  pPlayer->GetMaxManaPoint() )' Y# R; N2 i  m5 i' X1 Z1 j9 R# G7 ~
                                         pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );, S1 Z& m! a, W

5 ?% y( z$ M: B* E5 O  }9 \                                if( pPlayer->GetFatiguePoint() >  pPlayer->GetMaxFatiguePoint() )
/ e. W( [4 w/ i8 ^                                         pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );
. z# e' z+ x2 w' l) e: ^
% D, H  l' T9 o5 m" l# x#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver " i% S) m. V: g% _/ @# v0 O

6 q0 {5 C- i8 h) a  F/ D
- y/ b; B3 I* {: P! x# l

相关帖子

回复

使用道具 举报

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

本版积分规则

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

GMT+8, 2025-12-25 13:54 , Processed in 0.064524 second(s), 23 queries , Gzip On.

Powered by Discuz! X3.2

© 2001-2013 Comsenz Inc.

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