飞飞世界论坛

 找回密码
 立即注册
搜索
热搜: 活动 交友 discuz
查看: 16481|回复: 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 - E1 o& b$ \  P7 |$ f, T9 t
I posted this because someone kinda posted a youtube thingy about it :O.0 a9 g3 |9 q0 @2 l
$ Q& E* H6 W, v
Find this in DPSrv.cpp @ worldserver3 \$ k. @4 s( O2 T& o+ L
# E7 E/ i, @. k7 N$ A5 F0 K; r
Code:
8 Y& ?$ `) k! V; Kvoid CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize )( p" [, U2 `! O
{
4 T+ g2 P1 T8 M/ [; I5 z        DWORD nId;" y) ^: n8 ]' K
        int nPart;; D$ c3 v5 k% T$ r

! `* i! f7 X; q% l. J! X        ar >> nId;$ t9 W* f$ ^8 ^0 I
        ar >> nPart;               
0 d* R! X3 N1 r2 y9 A        4 X3 W; Z; E$ _, S0 L
        if( nPart >= MAX_HUMAN_PARTS )       
/ R* g0 y! ~. G, C2 M                return;1 ~5 ]8 f6 H4 O7 M2 g1 m/ P4 c
/ o& P( n" N( T4 w" d
        CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it
& \' v3 s! Y7 M' `( j$ l3 v9 ~
' A5 h& w$ k. |4 P7 k- [8 Q
; s3 |2 W/ ^" {+ H7 b, f7 o4 yCode:% t" n6 n$ y  W# o4 F8 b& a" G3 u, a
#ifdef __QUGET_SWAP_FIX" G( b; Q$ Y# V! f% S# T! ?
2 f. S4 q& S. @$ j% O
                                if( pUser->GetHitPoint() >  pUser->GetMaxHitPoint() )
) h* f2 f2 D. L  O# D                                         pUser->SetHitPoint( pUser->GetMaxHitPoint());
! B# k0 i8 p' J
6 c4 z* k5 G, f4 @* t" r                                if( pUser->GetManaPoint() >  pUser->GetMaxManaPoint() )
+ q$ n1 c+ D6 X3 D) {                                         pUser->SetManaPoint( pUser->GetMaxManaPoint() );1 x; B! Z/ ?' i$ Y' `& z  y

- v* s( ?; K" r$ P- _1 D, V                                if( pUser->GetFatiguePoint() >  pUser->GetMaxFatiguePoint() )3 ~3 W2 p$ t- w0 c  K( B
                                         pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );% o) ]* ?6 Q- w) f, ]4 i* \8 I; N
" H, W6 o' Q/ A$ O" J6 o
#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp) Z+ z) k- y2 r$ U& d
and add under4 e% v2 T6 [; e! V

' K2 u. }. t4 B7 uCode:
/ M: L! r4 d8 W0 P  ]' wif( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel )
9 u% S0 q2 T( ?: V% w                        {
, `7 K( K& O  L3 x5 M                                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 C9 I; T! H, v1 Z! {( r& C                        }this8 r" S/ t3 i! C
# M" \( C" P8 M
Code:
6 Z8 D0 o6 N  l#ifdef __QUGET_SWAP_FIX
. s* g) ^; y5 a4 @) T: o                                if( pPlayer->GetHitPoint() >  pPlayer->GetMaxHitPoint() )
& `( I: B2 G* {. z                                         pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());
5 h. A4 X: L" w5 x
1 c" I! S: M8 p5 m8 |, I                                if( pPlayer->GetManaPoint() >  pPlayer->GetMaxManaPoint() )0 W- ]4 ?0 ]; c  ^* R4 Y  [8 H
                                         pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );5 t3 m# Y  I4 c7 S5 a0 a% \
! u# F$ ]7 G# G
                                if( pPlayer->GetFatiguePoint() >  pPlayer->GetMaxFatiguePoint() )4 R" j/ p8 ]- v, L9 D4 M4 i; R( i8 g
                                         pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );. q# L: ]4 x$ h5 W/ B5 j  ]
9 V- W; j2 l- c
#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver . f8 y5 h* w1 O: H

6 s) y* F- X( Z4 H
& p  k3 @  @  ?

相关帖子

回复

使用道具 举报

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

本版积分规则

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

GMT+8, 2025-12-13 23:30 , Processed in 0.081584 second(s), 33 queries , Gzip On.

Powered by Discuz! X3.2

© 2001-2013 Comsenz Inc.

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