飞飞世界论坛

 找回密码
 立即注册
搜索
热搜: 活动 交友 discuz
查看: 16190|回复: 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 J; W0 Z! s, f3 J  V4 u! b% A. W% pI posted this because someone kinda posted a youtube thingy about it :O.
' I2 c6 V' G( {7 s0 b  n5 _: \# z8 B5 E  T* a& g* M
Find this in DPSrv.cpp @ worldserver6 V7 Y/ ^! t$ i$ E& I6 A
2 g+ r  c6 k$ l6 \! f$ ?) I% l
Code:( y  ?1 D+ `: ?6 P% j
void CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize )( W0 ?! [9 f5 I$ x2 f& L7 t4 ^+ V
{# x- P- h( u* K" ]
        DWORD nId;
  c4 O: a( X, a/ p, p        int nPart;+ X# P6 F# D1 L
0 i% H' q! ]  d+ m6 W
        ar >> nId;& s4 |! `, K/ \- H& _* m8 k
        ar >> nPart;               
1 N1 }& X( C5 E4 ?$ {) x% z       
$ [) I# l% F7 M* C) x; ]        if( nPart >= MAX_HUMAN_PARTS )       
2 D& X9 c$ u" ^+ j  c                return;
' X4 ?, ]9 X4 h% R3 [; H2 _/ J. e/ p/ T
        CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it
% P, j! P+ C6 @  \  Y" Y8 r+ F+ Q# w

, l; y0 P: L8 |2 l9 g8 UCode:
3 {+ L, `9 ~6 |) h#ifdef __QUGET_SWAP_FIX
( Y* h, ^- L1 ~2 J
% G+ d! N! S: d1 _$ p                                if( pUser->GetHitPoint() >  pUser->GetMaxHitPoint() )* G' R; _4 l$ U" R
                                         pUser->SetHitPoint( pUser->GetMaxHitPoint());) i0 i* B, b9 c- s$ i5 }

! o7 N& z! F7 C: i* p                                if( pUser->GetManaPoint() >  pUser->GetMaxManaPoint() )
* u; w% s) n  h7 |7 r                                         pUser->SetManaPoint( pUser->GetMaxManaPoint() );
  a5 ~$ ]* s9 z4 s9 O3 L9 D0 T8 u
% Z6 b; A/ ?2 U' ^                                if( pUser->GetFatiguePoint() >  pUser->GetMaxFatiguePoint() )$ _9 X3 O2 k" h7 J- @
                                         pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );
5 f  W: `" x/ z1 L& E; k" C7 n3 g# C: r( W; l0 d; L
#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp8 ^+ C- Y/ t8 K* w
and add under# E! @! E" p/ S9 G: q

  h/ s! n( r7 aCode:; V& N( i/ @% U
if( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel )
3 w3 t) ~, l2 T9 B                        {
% u% F" B7 T4 O                                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 h6 t( J' r9 {
                        }this
: n, o4 C% j7 |
5 b& }! p8 J5 V4 L" bCode:
4 n; P  \: s- z! t. a#ifdef __QUGET_SWAP_FIX+ Q- a+ g* |: h0 V% k1 Y/ p
                                if( pPlayer->GetHitPoint() >  pPlayer->GetMaxHitPoint() )& l: D( w  ]) ~; @9 [9 n
                                         pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());  ]2 q$ ~2 R4 M5 s( h. b

+ [) a" e8 p; Z& w( e- }/ p                                if( pPlayer->GetManaPoint() >  pPlayer->GetMaxManaPoint() )% d( ]& v  P& D* d) U
                                         pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );
. N- Q. D% n3 O3 M7 i0 ]5 Y# b  _
                                if( pPlayer->GetFatiguePoint() >  pPlayer->GetMaxFatiguePoint() )
2 ^, A) `0 h6 K                                         pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );. U" u; {; g3 Q7 k( Q/ }/ ?
8 F/ [6 L6 i4 a! c: K
#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver " ?5 C$ P2 z  ^% C
9 A, y" g. e/ f& o% D2 [5 P1 [1 w
' \  c( H% F; t; Z4 k

相关帖子

回复

使用道具 举报

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

本版积分规则

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

GMT+8, 2025-11-24 01:01 , Processed in 0.062843 second(s), 33 queries , Gzip On.

Powered by Discuz! X3.2

© 2001-2013 Comsenz Inc.

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