飞飞世界论坛

 找回密码
 立即注册
搜索
热搜: 活动 交友 discuz
查看: 16250|回复: 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
! |9 q, }  L" I  M0 B5 yI posted this because someone kinda posted a youtube thingy about it :O.
1 P, M: L* S! m" g
& ~" G/ u. D: [1 h' [Find this in DPSrv.cpp @ worldserver# `- W) L& B3 M2 f

4 t/ z# Z) P6 [. ~Code:( z) h0 x) w6 N" v  Y% L$ Q: P. D
void CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize ), p4 q/ U5 w3 @. a( f
{
0 K( ~3 ?$ y+ c; o3 R        DWORD nId;
8 N8 l* \0 i; G# E$ M        int nPart;
/ O( k& _! m% B* `1 O. X( Y3 _
: {; |! A+ |2 `* O        ar >> nId;
7 v, ^! i1 O7 M; x5 X) c. w        ar >> nPart;               
" ~8 \4 k9 Y$ h) Q0 _0 B       
! S. Z: \- g6 `9 K$ h        if( nPart >= MAX_HUMAN_PARTS )        3 o* I* W0 J2 g/ p, Y3 @
                return;% h1 t2 R4 Z  O- }

  H$ s' C# G& F/ k        CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it4 I. b: p0 _7 r7 R6 v6 M; X+ i  K
7 s" ^5 X% Y+ c% {7 n
2 ?: H" `" a0 z1 f, B: V
Code:
, e/ o7 N3 {3 W" ~7 N#ifdef __QUGET_SWAP_FIX- Q2 n. E" A% W

5 L- s  B) U- V8 G                                if( pUser->GetHitPoint() >  pUser->GetMaxHitPoint() )
# ]9 {4 n, B9 D) n) U2 C                                         pUser->SetHitPoint( pUser->GetMaxHitPoint());
% @/ V1 P! k( Q7 l5 \; R
6 g" i. b% ?4 q& u: M  q                                if( pUser->GetManaPoint() >  pUser->GetMaxManaPoint() )
+ n: J  r: i8 J7 {                                         pUser->SetManaPoint( pUser->GetMaxManaPoint() );) P2 s+ V5 f0 G9 T* z- E% S5 c

( d) W$ C) A& F  p! b                                if( pUser->GetFatiguePoint() >  pUser->GetMaxFatiguePoint() )" G4 }4 z) m& F) l6 M4 [7 w. N
                                         pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );
4 P& j8 }6 P" Y* z/ N$ U+ y1 ~0 t. P) _& W: ~% s. d) g! F
#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp
9 ~  ?1 S( T+ S* |! y( Y4 W3 _and add under1 v: W" s$ w7 |; d3 j3 t: U2 }0 H& n6 q

, B3 J4 O  g" V* }$ i, VCode:
8 f# G% j4 o+ |' mif( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel )
; R' E2 A4 N0 d: w2 U0 E; q1 g                        {
  A0 n* b; z9 d" r# i                                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 );
# @3 N; K9 j" p, D) o* V6 t2 f                        }this3 ^; N# R1 B& g5 q$ Y
% H! Z- H* n8 |8 k
Code:
# Z9 e* T) F& Y) D6 j#ifdef __QUGET_SWAP_FIX
- j9 O; |  |9 t1 D. E" D* W1 {& u" f                                if( pPlayer->GetHitPoint() >  pPlayer->GetMaxHitPoint() )" f: ~0 y/ L# t+ z) d% S! Z
                                         pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());% j; k( {! T7 {. f6 A$ U  `; u$ x

$ g/ X- o0 r: z+ A2 R                                if( pPlayer->GetManaPoint() >  pPlayer->GetMaxManaPoint() ); M8 V" |1 }! E/ M6 f# [
                                         pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );
: W# v( Z- G1 E2 S2 }# l5 m6 |0 f2 |
                                if( pPlayer->GetFatiguePoint() >  pPlayer->GetMaxFatiguePoint() )
* K/ K- j0 H4 w& e* B" z                                         pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );
$ c  u: f' {3 s5 F* {
: Y# V3 h- s+ y9 ]! Y1 H' o#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver   F; g' \/ r; ^8 ~. V; O

6 |: L! B4 n2 ^0 f! m: ]1 C+ N; O+ \2 ?0 j, z9 }" r

相关帖子

回复

使用道具 举报

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

本版积分规则

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

GMT+8, 2025-11-30 16:19 , Processed in 0.091888 second(s), 26 queries , Gzip On.

Powered by Discuz! X3.2

© 2001-2013 Comsenz Inc.

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