飞飞世界论坛

 找回密码
 立即注册
搜索
热搜: 活动 交友 discuz
查看: 16959|回复: 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 1 l2 d6 n1 A/ y) r6 ^) w8 I2 r
I posted this because someone kinda posted a youtube thingy about it :O.$ i7 \8 c, K; F  }& l; d- _
8 K7 D' T5 F' v7 Y/ M
Find this in DPSrv.cpp @ worldserver
2 h% f8 M1 _" P- [/ }& ^1 b3 K6 g2 u
Code:
) ~0 a6 ~5 b6 O% V6 gvoid CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize )5 e! w' _! g& A4 T6 Y9 T7 R
{) W, K& D2 K/ S) e' g
        DWORD nId;
/ h7 M+ B7 R4 E8 Y. y3 N        int nPart;
3 ^+ ]# y5 A" Z
' X' e5 h/ N2 Y3 z0 d        ar >> nId;/ T: E: ^1 m9 F2 _2 p" s% r5 K
        ar >> nPart;               
3 i& Y8 e+ ]3 K/ `# d- q       
. H; E; e7 P# q5 S$ l        if( nPart >= MAX_HUMAN_PARTS )        " s7 D; a( U7 ?1 u
                return;
4 y" n; j2 \# h) J0 W. H  ^& U5 V5 z% _* p7 ]2 k- ?
        CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it
0 g5 M' P% ]" ~" q* Y) N" m, V5 @
" t$ U! t/ {7 d( d# W
1 V3 L8 y4 k1 f8 V* WCode:
6 d$ B- Y% j, R% C#ifdef __QUGET_SWAP_FIX2 [+ p) N7 A4 K3 v9 d
) W: f% r1 v  D6 l3 i" C
                                if( pUser->GetHitPoint() >  pUser->GetMaxHitPoint() ), {3 T+ ?8 n; j$ Y2 x( s
                                         pUser->SetHitPoint( pUser->GetMaxHitPoint());  Q# V) L: U, u. G& t

% D: o2 Y! h! ~                                if( pUser->GetManaPoint() >  pUser->GetMaxManaPoint() )
3 l6 F& u' x5 H* u9 \; c& I                                         pUser->SetManaPoint( pUser->GetMaxManaPoint() );
- w; S) H2 s. A' z, I; T$ F  G+ Y0 T: ?: r6 p
                                if( pUser->GetFatiguePoint() >  pUser->GetMaxFatiguePoint() )( n' X9 v# m- h: G
                                         pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );& y. \; Q: ^0 h3 ?% w
/ z. a9 R( w5 |+ F2 ^2 m
#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp  M- g9 W8 B  x( N
and add under) G( J! ]  E1 x

8 `0 g; \1 g1 ]# a. wCode:
  {/ f2 W. ^1 E% p% }% rif( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel )$ H; n2 @" o* K" |" j; x* u
                        {
0 w" \7 \5 w+ _3 ?" ]  B                                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 );/ e! {) |% A: W$ g% O) u- g
                        }this) `- T4 S# F2 H6 z
. }7 {/ ?& A$ h- Z
Code:
0 A0 J- L! t0 M#ifdef __QUGET_SWAP_FIX
4 v% ^2 G) f7 s+ G9 U0 h                                if( pPlayer->GetHitPoint() >  pPlayer->GetMaxHitPoint() )
7 Y2 j9 N9 L3 K1 q+ n& _6 @                                         pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());
- J& D. y0 |( P' I% {! `
% V3 D% w& ?- j' \5 i% h7 E                                if( pPlayer->GetManaPoint() >  pPlayer->GetMaxManaPoint() )
1 @0 Q: ~) {. _                                         pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );
& j" r, Z' X3 K- H" M
% a- q" @. c% O4 _+ e                                if( pPlayer->GetFatiguePoint() >  pPlayer->GetMaxFatiguePoint() )
' ~5 x7 D$ B: P0 @! K; a* K                                         pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );
7 R  Z" B6 I" p+ v: d! A/ o" v
7 W% B7 i! x. \# o#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver
& k! x0 ]. t* w' h1 g
5 a% c/ S' j, ~8 I. x
; F7 {' o) o* e# t0 I8 O) g  j

相关帖子

回复

使用道具 举报

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

本版积分规则

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

GMT+8, 2026-1-14 23:48 , Processed in 0.061418 second(s), 26 queries , Gzip On.

Powered by Discuz! X3.2

© 2001-2013 Comsenz Inc.

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