飞飞世界论坛

 找回密码
 立即注册
搜索
热搜: 活动 交友 discuz
查看: 16756|回复: 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 * ?+ s+ U$ e9 n
I posted this because someone kinda posted a youtube thingy about it :O.
9 I" E' y4 f/ R2 h/ o
8 w$ u0 z$ a) l7 W: w: b6 yFind this in DPSrv.cpp @ worldserver
; k* U1 O' z0 i" p: L2 m4 @: F& W/ U" {2 |6 n$ p" i& t
Code:# [; ~5 p% _9 u& e8 M
void CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize )8 ?+ s, h  x  v# q. m
{  `2 Z% U" w% S2 q3 v# q
        DWORD nId;; v' ]% g. _2 u" P3 Y  X. s
        int nPart;
% i" ~$ x. ]* c: O/ U, p5 y# l2 Z; `4 f" d
        ar >> nId;
1 t6 j# h1 ]. Y( @1 J) U        ar >> nPart;               
0 i$ ?1 ?/ j3 }' ~# f        $ ?2 F9 R( O; e1 a' }& y2 n$ o
        if( nPart >= MAX_HUMAN_PARTS )       
2 U7 t! ?# Y% N. ^                return;
; g: U- y' t7 U7 R9 @# s
- y; J0 G8 B. o0 b# M5 d% F        CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it! p" h/ E6 [9 j2 I& _7 Z5 _4 a
9 }  u% K6 d9 E7 J/ e1 [6 w
) K% N# a' H- Q4 w
Code:! i& U- e, t0 I! h
#ifdef __QUGET_SWAP_FIX
* _" z! R5 p8 ?: x! `
0 i; p9 U5 c) F% g* [, Z                                if( pUser->GetHitPoint() >  pUser->GetMaxHitPoint() )" H( ~+ y' {$ Z1 D
                                         pUser->SetHitPoint( pUser->GetMaxHitPoint());
, R( o& \" e5 ]% D; O9 D0 }4 Y. g3 Z1 l1 [6 I" I) b* K
                                if( pUser->GetManaPoint() >  pUser->GetMaxManaPoint() )
  `# c' d5 B/ X& Q( w% l                                         pUser->SetManaPoint( pUser->GetMaxManaPoint() );8 _0 R/ |1 S# y. a5 W

) `* H2 L" j1 d3 T$ r                                if( pUser->GetFatiguePoint() >  pUser->GetMaxFatiguePoint() )
/ p; z- Y/ c$ ^/ y" `7 Q                                         pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );+ a( O5 s" ^) b
7 E0 K7 y+ m0 P2 n
#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp- _4 K" J" R5 A6 p$ @
and add under3 E- Y/ I7 \) L$ [4 o) r% k
" S  v$ F6 `7 u: M( M5 E
Code:+ d; `; y2 p% ?% y' e
if( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel )9 ^1 Z1 ]5 U$ y8 ^& V
                        {0 @, O# F* S4 U5 P0 E8 ~" [
                                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 );
# j5 M5 g% @/ {                        }this2 W: X% j# M6 K- Z4 t3 b5 b2 t

5 {/ a  w; P/ }* ^0 H% VCode:+ }- R6 Y0 |5 A3 t& `( r9 ~$ Z
#ifdef __QUGET_SWAP_FIX$ G( D6 O& e( g7 J: [) B0 H4 {: |. @# n
                                if( pPlayer->GetHitPoint() >  pPlayer->GetMaxHitPoint() )
! J7 x5 J+ ~* a) L" [' a7 }                                         pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());
: x1 w2 O; T+ Z
7 D; q# K$ D1 W                                if( pPlayer->GetManaPoint() >  pPlayer->GetMaxManaPoint() )
" k! C8 l" d( E+ ]" a6 W" s: _                                         pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );- f2 J$ u! c& T$ H

  M% L& l0 \" B1 i                                if( pPlayer->GetFatiguePoint() >  pPlayer->GetMaxFatiguePoint() )( z7 s( g. B/ I- P# {7 S
                                         pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );
) _7 O5 \% @! W) O
. a4 E  I$ w  u, G3 x* ^# |' }3 V8 k: H#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver
! c1 i# C6 ]" d2 M- ]" J9 k
  @0 {3 _. f) f3 \( o- a+ G" q0 R! Q& y# z- I

相关帖子

回复

使用道具 举报

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

本版积分规则

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

GMT+8, 2025-12-28 22:21 , Processed in 0.064898 second(s), 26 queries , Gzip On.

Powered by Discuz! X3.2

© 2001-2013 Comsenz Inc.

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