飞飞世界论坛

 找回密码
 立即注册
搜索
热搜: 活动 交友 discuz
查看: 16412|回复: 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
! I* t5 s, U0 H' y3 B8 Z# RI posted this because someone kinda posted a youtube thingy about it :O.2 q4 a( m: N* E' L

$ s  ]9 H7 b) hFind this in DPSrv.cpp @ worldserver% n/ l9 q1 M1 T! f: R6 C& o
+ N/ P' Y; {9 D2 c, X3 }, z
Code:; o% a( f1 C  Z* @
void CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize )
3 ^. L* n" O$ N{
( ~# C- ~0 C6 V+ Z# r# N8 W* L        DWORD nId;- @9 I8 ?3 b4 J1 K
        int nPart;
$ J2 Y( [3 Q. x& o; \3 ~5 W$ W" _* S$ E$ W# E: E
        ar >> nId;
6 h6 V9 q" r( D; e5 H/ D) J        ar >> nPart;               
4 L! V5 H  E0 `0 K8 o1 `       
2 L4 X6 {/ I" `2 ]        if( nPart >= MAX_HUMAN_PARTS )        ' _, [% A# J1 K: C  H/ r
                return;
& k9 P1 m9 [# m1 F4 F( n7 V
2 X/ P# g! g' f. D' P7 D+ u4 N        CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it
4 e6 T) B8 E; [% {* d8 e; f4 K# T; w0 D
8 c( N6 S% J8 K1 l; _/ O* {
Code:' q+ F( h" i/ L, e0 t% z
#ifdef __QUGET_SWAP_FIX
1 D; R) `  k9 G' L, f6 i; M5 n" U, f6 s$ b! D8 Y0 c8 p
                                if( pUser->GetHitPoint() >  pUser->GetMaxHitPoint() )
- }, b1 t( l% t# `8 r                                         pUser->SetHitPoint( pUser->GetMaxHitPoint());
) |' U/ ]% b7 k
  F2 q% j. `/ X+ E  A                                if( pUser->GetManaPoint() >  pUser->GetMaxManaPoint() )+ B5 ]7 }( i- Q$ v; {
                                         pUser->SetManaPoint( pUser->GetMaxManaPoint() );
& n+ l  A' ]' U7 u' |, D$ H" ?5 J/ f# W
                                if( pUser->GetFatiguePoint() >  pUser->GetMaxFatiguePoint() )  ]- p  O4 U- r$ W6 |" V% E
                                         pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );
: l" w7 F( `: D6 v3 z
8 M3 I$ [. S  ~#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp- T% p, u8 ?( U+ V! [
and add under+ [- |  P+ S, S- F: R4 F

0 D. t" z  U$ m( b/ K9 MCode:. ^. h4 A' @( ]
if( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel )2 _4 c" o* |) u. o1 R/ ?0 \; v" Y
                        {) Z# U9 N4 a8 U
                                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 );
% W3 P0 |% Y; c6 v% S7 T1 }+ X                        }this
. M0 F9 B0 Z9 l, _# T& M) D$ z1 Y. Y, B6 k
Code:: o( @7 i7 u+ P9 E
#ifdef __QUGET_SWAP_FIX. `( @4 |* u6 o# _
                                if( pPlayer->GetHitPoint() >  pPlayer->GetMaxHitPoint() )
) U0 h# K3 Q, N( ^- X# M# j                                         pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());+ T5 a. W! j0 q0 q5 A
( T/ Y" B. n) G9 m3 ?9 k8 }! \
                                if( pPlayer->GetManaPoint() >  pPlayer->GetMaxManaPoint() )8 P& w  S* }8 Y: Z) w  K" `
                                         pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );, A/ j4 o; v' O6 J0 l$ r* y+ r6 `
$ D9 W: h* Z" p+ p& Z- c/ i3 z
                                if( pPlayer->GetFatiguePoint() >  pPlayer->GetMaxFatiguePoint() )/ c- E; l0 H' v( V% }( }0 y
                                         pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );; o' h8 b6 a" w9 ?  |; K

4 F8 p9 @( V7 F, b2 y7 f#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver
5 P2 x5 M0 e. p3 Y6 D5 ~" a8 J& W9 M6 y2 Z: L6 _
# |3 R9 |$ [5 B# w8 j* p; V

相关帖子

回复

使用道具 举报

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

本版积分规则

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

GMT+8, 2025-12-10 04:20 , Processed in 0.065528 second(s), 25 queries , Gzip On.

Powered by Discuz! X3.2

© 2001-2013 Comsenz Inc.

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