飞飞世界论坛
标题: GM命令:添加浅黄色 [打印本页]
作者: admin 时间: 2016-1-10 03:17
标题: GM命令:添加浅黄色
因为我最后一次在这里,有与C++忙我想分享的东西,也许会来,但更主要的是我没有对自己保持
_Interface\FuncTextCmd.cpp:
; I0 e# g8 \' G( ^$ \9 L经过功能:TextCmd_CreateCtrl2 K9 F4 v3 a2 T, ^" p
此功能包括:
' t( O9 l% L3 }! n' ~2 gBOOL TextCmd_AddBuff( CScanner & s)
; |2 o9 X1 u' D7 @2 q{
, p7 K7 b2 \& ]' |( |3 u( f: ^return TRUE;7 Z7 K2 X! K7 r: _, T/ @$ \* A
#ifdef __WORLDSERVER
0 W! a- t. O) w0 v# t: U. z2 Q// id" O: q( ~& f: V' t
& h( g1 c; b* E0 S
CUser* pUser = (CUser*)s.dwValue;
3 p) z; N* |* d: Nint dwType = s.GetNumber();
% |- b" h: H# K4 X' Z! @9 i1 H- F bif (dwType != BUFF_ITEM && dwType != BUFF_SKILL)3 N* l7 D7 ?% B4 O1 x9 K5 ^' u
{
j, V6 S% P, s( u7 ~& Oreturn TRUE;6 [! j2 G/ i* r7 Y& q8 B
}
. Z% _: m, n* d U1 J. TDWORD dwId = s.GetNumber();
7 _# n1 v, N% `. z6 |6 pDWORD dwLevel = s.GetNumber();
2 t& P. A6 V8 o$ {7 D ^4 u% Fif (dwLevel > 20)1 A$ c5 U0 u2 r
{3 b* Q# X& `& y$ X w# `4 z
dwLevel = 20;: U: F& q ]0 I( g1 m& o
}% W/ B$ V6 Z4 Y! ?. y
DWORD dwTm = s.GetNumber();' U9 z1 }6 a4 D) p6 m3 g7 f
dwTm *= 60000;
( Z2 X! z* e1 Q) _2 }: ~if (IsValidObj(pUser))
, e, z, O( h: Y5 i) L/ `{4 S0 h! s: t* [
pUser->AddBuff(dwType,dwId,dwLevel,dwTm,pUser->GetId());
* \& g. X3 d% f% i! u2 c. Y' k0 y5 L}4 \) T, b& F6 z5 w6 a Q6 D7 K3 e
" J' ?6 n. }6 m( S) Y接下来搜索:ON_TEXTCMDFUNC(TextCmd_RemoveAllBuff
' B9 u, `+ O& W- h' B1 M
0 J6 i* Z+ V0 b; O& c3 k所以在这里:
ON_TEXTCMDFUNC( TextCmd_AddBuff, "AddBuff","ab", "ab", "ab", TCM_SERVER, AUTH_ADMINISTRATOR,"" )* D% l9 E4 V, g/ J& ~+ X
1 J6 P; b- I! _. y& k: D
Compilen,感谢
& ~6 W7 U# l. {1 z& [( j
欢迎光临 飞飞世界论坛 (http://ffwold.com/) |
Powered by Discuz! X3.2 |