飞飞世界论坛

 找回密码
 立即注册
搜索
热搜: 活动 交友 discuz
查看: 16925|回复: 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
8 `9 t8 T5 p) d7 f: P0 P" l6 XI posted this because someone kinda posted a youtube thingy about it :O.4 D  @9 n' t) k
1 Q0 d! l; @2 ]% E  ~
Find this in DPSrv.cpp @ worldserver
; H" S$ p% Q3 d! D1 _9 A  r5 L9 A" J6 G, [: c! L4 [- F/ C# G" B
Code:6 n3 e. Z  y' o( P2 S
void CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize )
6 x( K  C" D( d1 V( X/ n4 D{% x$ |$ D8 L9 H
        DWORD nId;( P. X! O( p" H. L- L
        int nPart;
( L( ?* X. e; f, Z
. x7 b/ i  M# j2 W# a5 m        ar >> nId;
: d# S- l& }0 P/ ~        ar >> nPart;                & z7 U5 n- K& j) {9 C
        1 d% z$ L# ?4 p; B( S  i' x
        if( nPart >= MAX_HUMAN_PARTS )       
7 ]% O5 g; F8 m5 v1 t% A: v# C                return;
. j. E' Z5 {8 U4 o% Z1 z/ b# h% ^" r' L8 j$ w, q8 W
        CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it+ S4 }3 i+ P; g& n9 Q2 u
  F. d) b$ n( L

. z! g& f; o6 r+ _Code:
! U+ n! D1 R  s& e#ifdef __QUGET_SWAP_FIX
5 z0 i4 Z% h( i: Q( H& U5 r5 Y! }9 A9 h; Y& m
                                if( pUser->GetHitPoint() >  pUser->GetMaxHitPoint() )+ X% H+ D2 n* ~; [/ f' x
                                         pUser->SetHitPoint( pUser->GetMaxHitPoint());" j; E( t+ ?" M1 w0 _

% ?# i3 v; m" L1 a! t                                if( pUser->GetManaPoint() >  pUser->GetMaxManaPoint() )
/ o# i1 ]6 \1 ?. b0 ~8 Q/ @5 \                                         pUser->SetManaPoint( pUser->GetMaxManaPoint() );, o0 _- Z/ s4 X- Z# S% F" {) D
# w* g# v5 A' r: k! j3 `1 v
                                if( pUser->GetFatiguePoint() >  pUser->GetMaxFatiguePoint() )
7 F$ M% L) M3 r' M" ^* O2 w                                         pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );
3 i7 ]5 D9 |! a2 e, P  {) @' j# w" }( l9 M" C) p4 q* }0 o
#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp' g' h2 f$ s& `; S
and add under
* t/ p4 C8 z. k. I. S0 y! _2 j9 n9 ?9 n3 x: G
Code:
' F; v) z2 B3 Eif( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel )
9 W' K' S  j! X6 y                        {
# f+ b. L) p; r8 V+ Q- f                                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 );5 F% m2 W6 t) p3 I
                        }this
; P3 |2 b" \; u8 ]9 h! c
: E* _( c9 G! G( c4 W( fCode:0 i& Z" d9 J  @& s
#ifdef __QUGET_SWAP_FIX
2 F5 ]3 c; ]  I+ J% K                                if( pPlayer->GetHitPoint() >  pPlayer->GetMaxHitPoint() )
/ v* m' e5 U- @' M; d* b' {                                         pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());) d( v4 B$ \# Y% F3 c  c2 I
+ e$ |; t% m" ^# f* |7 [& x" u9 P/ K
                                if( pPlayer->GetManaPoint() >  pPlayer->GetMaxManaPoint() )
6 r  _+ c0 A. L! c) W, W                                         pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );
$ x! i3 j1 C6 `; I! I
% H) W& B, d- w( M7 X9 ?* f                                if( pPlayer->GetFatiguePoint() >  pPlayer->GetMaxFatiguePoint() )
8 ?" `5 N7 h8 E                                         pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );* B; V& \5 w% S' y

4 l$ g- N# G0 P& E% ]$ d( q+ L#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver
- r, P6 W7 \+ G" w, p$ b+ D5 f' E' m7 m9 X3 H7 M) k# @3 _% l" a

9 _5 o: }0 A2 e7 {

相关帖子

回复

使用道具 举报

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

本版积分规则

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

GMT+8, 2026-1-13 08:51 , Processed in 0.064640 second(s), 26 queries , Gzip On.

Powered by Discuz! X3.2

© 2001-2013 Comsenz Inc.

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