飞飞世界论坛

 找回密码
 立即注册
搜索
热搜: 活动 交友 discuz
查看: 16679|回复: 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
( u' |0 z2 s$ Z) ~% I5 ^% z: }I posted this because someone kinda posted a youtube thingy about it :O.; ]6 t+ I; N$ |* ~7 w" [/ S7 U
1 q0 w+ g" ~3 B% M1 j; s2 r! |6 e/ T$ f
Find this in DPSrv.cpp @ worldserver
; I  T5 ]+ f8 I8 M1 Q! w1 m) e0 n' ]; \% l, l9 d: ~
Code:
& b( F" _- a( g& G) nvoid CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize )
# k3 L+ u, D$ a! B, x1 F% P0 z{
* X8 S. |' V* g        DWORD nId;2 C# B  \: R4 V* ?8 _: ?* U9 m: x
        int nPart;
) w4 z7 |8 k, ?' i+ l9 V
$ W+ L$ |/ |7 M. W$ E1 [6 i6 Z        ar >> nId;8 U: B7 U5 O+ X8 a2 M
        ar >> nPart;                ( v# ~/ z/ @. }0 U0 c
        . d/ B: h: \: v/ {
        if( nPart >= MAX_HUMAN_PARTS )        2 y. @/ |8 W' n& d+ q
                return;
9 r* V9 N" r8 p- I& m, F5 u' D, v
; _- x: G$ e% g3 Q+ c3 E8 \& e        CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it; X& P3 P* y" n- V( D; ~/ b

; [, o9 @; ]9 C' F' t
1 j! @! D4 w+ T- iCode:
( q, k3 Z. g+ ?1 r5 x#ifdef __QUGET_SWAP_FIX
$ t" Z( E9 V% n& N* @) I  ~% S3 f& ?+ }; B) {/ U
                                if( pUser->GetHitPoint() >  pUser->GetMaxHitPoint() )9 U2 y9 _3 P0 t* q' h
                                         pUser->SetHitPoint( pUser->GetMaxHitPoint());
8 ^& q/ j/ i! |4 z8 ^2 z  M! v% D5 p6 g: f
                                if( pUser->GetManaPoint() >  pUser->GetMaxManaPoint() )
. X, K) Y) i& s2 ~  p$ t8 ?; ?                                         pUser->SetManaPoint( pUser->GetMaxManaPoint() );: C% R7 y% s4 |/ ^( N& ^$ g
) I1 k$ V' v8 ^
                                if( pUser->GetFatiguePoint() >  pUser->GetMaxFatiguePoint() )9 S2 {8 D7 c0 C0 A- D+ R! n, @" e
                                         pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );$ u0 \% V6 l5 N) G/ ?% `) d& k- I7 ]

7 E4 q) q: H# a- b. s' k& E7 R#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp
5 B/ K" P8 ^; ^6 Yand add under8 u$ H5 ?" _( U9 I! `. L  r$ D

3 A: k. V$ p- _  l: JCode:, l9 c" f1 A7 i1 ]! n) b- J3 J6 _
if( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel )' t6 W+ {) N( h4 ^
                        {* t8 u/ u# |, E1 n; x1 e
                                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 );, ^# L2 K; c% g9 `1 U
                        }this
8 t1 u4 P6 P! l6 I% E4 b
6 c! J! j: @* _) ]Code:
( P, k9 ^( K. W' z9 c- l# A7 z- y#ifdef __QUGET_SWAP_FIX1 i" N+ D" O& x
                                if( pPlayer->GetHitPoint() >  pPlayer->GetMaxHitPoint() )9 y1 j4 d. B- H, w& ~
                                         pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());. o$ U, W# R# f) |3 t; \

) v+ i9 L+ V( B9 {& u2 D                                if( pPlayer->GetManaPoint() >  pPlayer->GetMaxManaPoint() )( {% ^3 r. h  h- D6 N$ Q3 c5 e# p; U; }. O
                                         pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );
1 d; R+ w* v# u# E% ?( J' ^3 j
, D4 b1 ?+ {* L& Q, z! K/ K( h% k- ^                                if( pPlayer->GetFatiguePoint() >  pPlayer->GetMaxFatiguePoint() )& w* S; ]2 B& h5 a1 l* r
                                         pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );
/ |, }; i7 y* L; c/ ?, f$ x' c  N' `3 y& `* n2 O% P# O( _
#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver 8 u) D- P  ?( ^3 j% S

  Q/ H. I7 t- J3 r1 P4 w# H% r
, }; j9 h  ^( j# i* i: x# r' t

相关帖子

回复

使用道具 举报

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

本版积分规则

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

GMT+8, 2025-12-26 01:05 , Processed in 0.065484 second(s), 26 queries , Gzip On.

Powered by Discuz! X3.2

© 2001-2013 Comsenz Inc.

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