标题: 自动饮血和登录视频 [打印本页] 作者: admin 时间: 2016-1-10 03:46 标题: 自动饮血和登录视频 食品车:% T# K$ c. y) L, E
尾翼: + T0 S8 J2 n. A0 P; _9 d" C' y, W4 M. b& s) n: G
代码:( m6 }6 s4 F2 q& F! k
CWndAutoFood::CWndAutoFood()4 D! U. K% W/ X& V
{ 8 G& ]! A! {0 b* P5 O3 v& S m_pItemElem = NULL;! l4 | g C# k
m_pTexture = NULL;9 W( v3 P, V8 s {$ j
bStart = FALSE;; q8 E1 k/ |+ E7 a( l* J
}, d4 _8 L% Z1 {# @
5 i, k, @/ ?) i3 R. W3 A- i; C! _CWndAutoFood::~CWndAutoFood()! Y( o! u8 l1 H( r6 a, O
{3 G8 c6 D& M* [3 `. R9 J" Y: |9 T" C
AfxMessageBox( "AutoFood ist gestorben " ); . I7 E- c8 ?, x* V0 A}: D) ~( p5 _3 e7 _: _; q6 `: E
BOOL CWndAutoFood::Initialize( CWndBase* pWndParent, DWORD nType ) 7 m8 |: }/ l% F4 y{* c& z6 R. s# Q6 M( Q7 s G
return InitDialog( g_Neuz.GetSafeHwnd(), APP_AUTOFEED, WBS_MODAL, CPoint( 0, 0 ), pWndParent );0 |! b# Q% o! O# z2 H' u1 G, B
}3 x. U/ N! j0 r `! {2 Z. q8 [1 w
6 N l" s* X4 }1 w4 D @, A! CBOOL CWndAutoFood::OnDropIcon( LPSHORTCUT pShortcut, CPoint point ) % c! L( [3 t" ]1 Z: d: n/ R) h- W- |{ ) g( n* i2 J1 H, X2 J/ K6 D LPWNDCTRL pWndCtrl = GetWndCtrl( WIDC_CUSTOM1 ); 5 f6 k% L2 s* X# B8 u- ] CRect rect = pWndCtrl->rect; ( c. h( X T: F0 q) p/ ? if( rect && rect.PtInRect( point ) ) m6 U b9 Z1 t0 x3 ] {' p0 g! k; [' o$ N( o/ E, V |
CItemElem *pItemElem = (CItemElem*)g_pPlayer->GetItemId( pShortcut->m_dwId ); 6 p! }4 h% J7 N1 o7 N if( pItemElem && pItemElem->GetProp() && pItemElem->GetProp()->dwItemKind2 == IK2_FOOD ) 3 X4 p/ c& e! [5 a7 R/ U { 5 _( o$ k1 d0 F if( m_pItemElem ) ( L, H1 A( F! m {3 y1 I0 G1 r+ h: M
m_pItemElem = NULL;: T7 S: o2 V8 k& D5 _' C
}9 O; Q* s' h* }* W( I
m_pItemElem = pItemElem; 0 O* C. L' c# f' v7 f m_pTexture = CWndBase::m_textureMng.AddTexture( D3DDEVICE, MakePath( DIR_ITEM, m_pItemElem->GetProp()->szIcon ), 0xffff00ff );& Q: O9 V! l$ a, T/ a8 ?- Q" w* Z
}else{0 ^1 F" b" e! G& r8 _9 o
SetForbid( TRUE ); 2 n* @' v) s4 X+ `9 ]- w } # b4 c4 k7 [! \! e }else{ & g" t; a ?/ d8 K0 \ SetForbid( TRUE );5 K6 Q0 z/ ~2 q+ u6 p& c# X
} + W5 R- P2 J6 X return TRUE; 5 G/ y; L" i, A7 c9 C}- u# _$ T- ?/ e* D" H. [
1 D+ T. P* q; }: q+ bBOOL CWndAutoFood::OnChildNotify( UINT message, UINT nID, LRESULT* pLResult ) # N' I, K t, N d7 i# K2 b{ ! f! }, { U- |' e3 H G switch( nID ) / B5 d0 @$ B8 K8 w" I& I6 P& G { : D! j& \% L* ?9 o0 V' } case WIDC_BUTTON3:5 d: R4 o8 p/ W/ o: ?: W
{* D. _" I" X( F0 i: K4 X6 \7 q+ p6 v
bStart = TRUE;& N8 M+ i; N$ H" B& R
break; / n! d/ j( |3 k2 r! S4 o4 |. O } 2 I* z) {- A p9 |3 F/ o case WIDC_BUTTON4: - T) H1 p% V3 U. S6 ?' ~( ^ {% k+ M* W2 l; w6 U" c
bStart = FALSE; , L n S. D% y A break; 0 O! j$ a4 f3 S/ z4 U5 X0 _' m } " v6 H0 K, T) f6 N% V0 V } " W+ a: v8 \8 Z1 Z h return CWndNeuz::OnChildNotify( message, nID, pLResult );$ q' @: y5 Q# K% @8 X% l
} 4 T% ?6 z& J) w- c& ovoid CWndAutoFood::OnDraw( C2DRender* p2DRender )6 q( x/ `. |6 O3 a: y8 B5 T' b+ W$ f
{ " z+ J# O/ s8 M. t, }! m- Y$ t CWndButton* pBtn = (CWndButton*)GetDlgItem( WIDC_BUTTON3 );1 U4 @, Y; P0 s- ^3 P
if( bStart || !m_pItemElem )+ L Y2 T' K: Z
{ " Y* f/ r* y, H: U pBtn->EnableWindow( FALSE ); , o+ p" c8 f: E I: w }else* }) S0 ?) ^, @
pBtn->EnableWindow( TRUE );8 c) g( z" n3 g! h( W6 g7 \
if( m_pTexture )+ @/ k! [% X! q
{ 1 l# y$ j4 g& v LPWNDCTRL wndCtrl = GetWndCtrl( WIDC_CUSTOM1 ); ]2 h& M0 Z( [, h- l$ ] if( wndCtrl && wndCtrl->rect ) 3 n; [! [% [7 V' @6 `; h5 M { + S9 f2 b3 k4 o( r* h4 e1 d; ] m_pTexture->Render( p2DRender, CPoint( wndCtrl->rect.left, wndCtrl->rect.top ) ); 4 d% ?8 a! N, b } 9 d) e! B; q, t0 d c5 D' w3 b } 8 d" R. }0 _* B5 ~% q/ L2 Q% `& C}/ _1 m5 F# L! `+ |0 j
/ t1 s+ d# c# q) S
BOOL CWndAutoFood:rocess() . T" C& W; C! h5 Z{ ( Q3 @: N; u# ~: a2 l( y if( bStart ) ) x% t* F5 \4 n/ m" L" ~; |# { {+ j# v6 }, {1 A# O/ n: b
if( m_pItemElem && m_pItemElem->GetProp() && m_pItemElem->m_nItemNum > 0 ) . T/ L8 x# ~- m; L2 U$ Q a4 W {9 i0 G5 X5 h3 {. N5 }, i, Z4 c0 L
if( g_pPlayer->m_cooltimeMgr.CanUse(g_pPlayer->m_cooltimeMgr.GetGroup( m_pItemElem->GetProp() ) ) && m_pItemElem->GetProp()->nAdjParamVal1 + g_pPlayer->GetHitPoint() <= g_pPlayer->GetMaxHitPoint() )% ^' z; C) N1 {8 d6 K0 X" u
g_DPlay.SendDoUseItem( MAKELONG( ITYPE_ITEM, m_pItemElem->m_dwObjId ), NULL_ID, m_pItemElem->GetProp()->dwParts );9 D1 o: v2 Z# V7 @9 H
}else{) O* b z7 v+ s1 v3 B. Z* Q
bStart = FALSE;$ a9 @ L* X" i+ a. [4 Y& k
m_pItemElem = NULL; 5 n4 T4 n; _: Q$ h }# f' @$ o0 B! Y. W0 Z
} $ v" T ?% Y0 `2 D return TRUE; ) F$ b+ P1 o4 u7 h" ?1 @! k}1 \& b& K2 P1 o# Y. P* M
% C, o1 a7 v( F. i4 }$ M+ H q登录视频废话:1 o% X; M, H5 Y5 l% Z" E
尾翼:: V8 F: z% R+ N
* ^* {/ ]% ?# q代码:4 r6 r u! q! ?
5 L$ l& k; C+ A7 a
void CWorld::SetLight( BOOL bLight )& ~2 ]- T6 M* B& O
durch 9 I) O2 [0 l, l7 E- XCode:; r9 f! _5 [/ k. L9 ]
void CWorld::SetLight( BOOL bLight ) t' q9 j$ j$ n; C{+ g% h% @* j( _
//ACE("SetLight %d \n", bLight); . s- _2 M6 E5 s$ U - x# I- q8 `2 ^4 p. l
#ifndef __WORLDSERVER 7 a5 h' i, |' t$ r5 x$ \* A DWORD dwAmbient = D3DCOLOR_ARGB( 0,0,0,0);- t2 |% c8 O& m9 z% `) P h
CLight* pLight = NULL; + T7 V) d( W; f; z: @: k4 H! `# U' w; b+ l' Q$ p
D3DXVECTOR3 vPos = ( CObj::GetActiveObj() != NULL ? CObj::GetActiveObj()->GetPos() : D3DXVECTOR3( 0, 0, 0 ) ); 6 ]+ h( U! e5 g+ w$ b3 w& I5 i v0 N9 H' I5 o+ R; x
pLight = GetLight( "direction" );8 @7 _7 h2 U8 H3 d. f) X8 B. X
& k* [4 y, \% u" D1 n! I" {
#if __VER >= 15 // __BS_CHANGING_ENVIR ; J% k* X* e& n& _" H. E if( g_pPlayer ){ ' B$ l9 K' s) a% i ENVIR_INFO* pInfo = GetInContinent( g_pPlayer->GetPos( ) ); ( U6 s, i) e G6 h; K) ] u if( pInfo && m_kCurContinent._bUseEnvir ) // ′??ú ?èàì°í ′??úá¤o??| àì???ò °??ì?? !!4 \6 X8 a0 _5 ]9 \' k6 A i1 ~
{6 j5 Q2 \ o% w7 c
if( pLight ); u" Q! k& p: _& n) n
{ , v+ L3 p7 C3 g pLight->Ambient.r = pInfo->_fAmbient[ 0 ];- q2 Y, Z4 j6 s0 q( Y+ Y
pLight->Ambient.g = pInfo->_fAmbient[ 1 ]; 0 H7 P* @) p2 D+ S4 {$ Y pLight->Ambient.b = pInfo->_fAmbient[ 2 ];! P/ Q. u7 |4 w/ A/ P, ^
/ g( e& X( |: X
pLight->Specular.r = 2.0f;/ d6 ~5 ^0 _& U5 t; A/ I
pLight->Specular.g = 2.0f;: U) l6 e3 |% o$ v) R
pLight->Specular.b = 2.0f; - n4 ^" ]6 ~5 U0 O8 C. W( Y M & C. W5 t! k- B* E
pLight->Diffuse.r = pInfo->_fDiffuse[ 0 ]; - F/ S: A) M/ }! V% O* | pLight->Diffuse.g = pInfo->_fDiffuse[ 1 ];; l" U+ G9 C1 u% J+ ?
pLight->Diffuse.b = pInfo->_fDiffuse[ 2 ];% u0 ~/ u4 Y- Q4 r1 t- }, z: k
3 l& P7 ?& R4 A$ w6 ~; P9 w HookUpdateLight( pLight ); ( r5 O. T9 p8 ] ( s6 @$ T; F! X memcpy( &m_lightFogSky, pLight, sizeof( m_lightFogSky ) ); 7 W& T1 w+ v, M - n& `4 R8 I. e* J5 M5 N
pLight->Diffuse.r *= 1.2f; * @" d; g: \7 E o pLight->Diffuse.g *= 1.2f; 4 z0 k2 ^" N9 J+ l% x pLight->Diffuse.b *= 1.2f;- G' k4 N X: o$ k6 ?) l
: N' y% l. T% u. Y pLight->Ambient.r *= 0.8f; 3 O6 c# H- u8 ]% E5 r pLight->Ambient.g *= 0.8f;& B9 g' y, b. K. ]
pLight->Ambient.b *= 0.8f; . g4 O c; [+ w& w* G5 A/ o$ Z) i " b' m2 J+ g* r. U1 m
memcpy( &m_light, pLight, sizeof( m_light ) );9 w# _5 y x! j+ W K/ t: Y( l