飞飞世界论坛

 找回密码
 立即注册
搜索
热搜: 活动 交友 discuz
查看: 17234|回复: 0
打印 上一主题 下一主题

修复交换错误

[复制链接]

197

主题

203

帖子

1088

积分

管理员

Rank: 9Rank: 9Rank: 9

积分
1088
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 4 t( k& w) ]- F3 G( r
I posted this because someone kinda posted a youtube thingy about it :O.
4 ]( S0 K8 {/ {; o& U$ `. W5 h/ D9 u% g
Find this in DPSrv.cpp @ worldserver
& k' o: m# E# i3 V6 r) B1 c0 z7 M9 h, z: W+ }
Code:
! o3 d7 y* N2 D. Svoid CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize )( n2 G8 o5 p, ^- A, _
{
5 z- E% z! Z3 S# R- F        DWORD nId;6 `! [7 S: L: U8 V; s/ O3 ]! n  ?
        int nPart;. s5 F$ S* k% E. d0 m% C
( c: O* \- z9 k
        ar >> nId;
: {6 Y6 W+ O8 E" e0 _        ar >> nPart;               
0 e* T4 x$ [9 {       
# u' Q. w) d# D8 Q        if( nPart >= MAX_HUMAN_PARTS )        ) p; }- {# m: i+ }* Q! o1 @( D
                return;5 T& z  S% z4 A* W4 ~! K: }3 Z

* Y3 N% D/ a7 [  k* M        CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it0 T0 k: x- P* x5 v" S
9 r; c3 e& A4 d4 k* F, z3 b

$ ~. ~8 `9 b5 \, Z* JCode:' f2 a3 c6 K0 u- ^& ~
#ifdef __QUGET_SWAP_FIX
+ K; A( x7 b: H
! F( Z. V- y7 b  f! Z6 M+ \' x7 w                                if( pUser->GetHitPoint() >  pUser->GetMaxHitPoint() )5 [" p# U) `1 i0 `4 {
                                         pUser->SetHitPoint( pUser->GetMaxHitPoint());  V  i8 J% y# k
6 ]# s. j% Y( m' a3 p) D
                                if( pUser->GetManaPoint() >  pUser->GetMaxManaPoint() ): l1 o. c5 l4 L" M. |5 w" c
                                         pUser->SetManaPoint( pUser->GetMaxManaPoint() );* h$ f7 ~$ o% q1 D# ]/ X& S

: M$ l5 u9 Y2 \                                if( pUser->GetFatiguePoint() >  pUser->GetMaxFatiguePoint() )
& k  s9 ?9 D+ o4 {  Z) @                                         pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );/ `: ]% {/ a. ?/ ^2 {

5 ?( C5 R1 P* W/ Z6 L: D% c$ R6 f#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp
# P2 r  j1 c8 Q; m6 h3 Vand add under
: R- A+ s3 n& U  U# t* v
( a5 k: u1 q6 E4 F* gCode:
( [7 p) ~3 c" c$ ~+ X1 q: |if( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel )7 q7 l& M% J: L' T
                        {
. a# v. q" R: y* {7 P2 q4 _                                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 );
* f3 q5 X! D- }* W) a0 Y  c# ^                        }this
( d. `4 e7 O8 L. T0 Q& z: h4 P( {8 O8 z, z! D4 U" h
Code:
- L, `# B9 f) q% p) x9 Y- U#ifdef __QUGET_SWAP_FIX
. ^, h5 h! c0 ^. I* l( X; H; Z2 k2 A                                if( pPlayer->GetHitPoint() >  pPlayer->GetMaxHitPoint() )* S6 m, I* z+ j1 C; k
                                         pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());9 e7 V- z; N2 F3 m

0 |% R$ @# O$ O/ [- S8 E. U                                if( pPlayer->GetManaPoint() >  pPlayer->GetMaxManaPoint() )& D) x3 [6 f1 D7 R8 m8 n1 `7 B
                                         pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );
$ V- X0 x8 v0 T6 g- E$ C- y
, K$ o( S) d! |, _( _                                if( pPlayer->GetFatiguePoint() >  pPlayer->GetMaxFatiguePoint() )3 z. P5 P2 d- S1 `" n  p7 B3 T4 `
                                         pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );
2 N4 j. q& k+ _( c! \8 s! C
* ~' V6 Q5 T9 L# L0 }#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver 2 I$ x- c$ U) I2 N4 d
- i+ ]" I/ [  v+ W8 g/ o

8 ?3 _& [( W7 m3 J& X

相关帖子

回复

使用道具 举报

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

本版积分规则

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

GMT+8, 2026-1-25 20:16 , Processed in 0.063084 second(s), 26 queries , Gzip On.

Powered by Discuz! X3.2

© 2001-2013 Comsenz Inc.

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