CmdEatAndDrink.cpp
上传用户:garry_shen
上传日期:2015-04-15
资源大小:45647k
文件大小:12k
- #include "stdafx.h"
- #include "XMudClient.h"
- #include "CommandCheck.h"
- #include "MenuCreateNew.h"
- #include "CommunicateMsg.h"
- #include "midi.h"
- #include "faceplate.h"
- #include "CmdFunction.h"
- #include "FileFunctionItem.h"
- #include "D3DRMScreen.h"
- #include "MainScreen.h"
- extern rmfullglobals myglobs;
- extern int g_nGameState;
- extern CMenuCreateNew m_MenuCreateNew;
- extern SOCKET hLCltForRSvrSock;
- extern BOOL g_bGetInputMessage;
- extern CStringList g_strlistChannel;
- extern CStringList g_strlistSelfMsg;
- extern CStringList g_strlistMesssage;
- extern CStringList g_strlistPlayerOnline;
- extern CList<CPlayerInfo*,CPlayerInfo*>playerlist;
- extern CList <CSkillInfo *, CSkillInfo *> skilllist;
- extern CList<CEquipInfo*,CEquipInfo*>equiplist;
- extern CList<CEquipInfo*,CEquipInfo*>equiprentlist;
- extern CList <CItemInfo *, CItemInfo *> itemlist;
- extern CRITICAL_SECTION csAnimation;
- extern CList <animationCallbackArgs *, animationCallbackArgs *> animationlist;
- extern CMainScreen m_MainScreen;
- void CmdUseProc(char *szItem ,char * Usenum)
- {
- CEquipInfo * lpEquipInfo;
- CString strtmp;
- int i,j,uNum=0;
- uNum = atoi( Usenum);
- if( uNum > 1000 || uNum < 0 )
- strcpy(Usenum,"1");
- BOOL bFindItem = FALSE;
- j = equiplist.GetCount();
- for( i=0 ; i<j ; i++ ) {
- lpEquipInfo = equiplist.GetAt(equiplist.FindIndex(i));
- if( !stricmp(lpEquipInfo->m_sCNAME,szItem) ) {
- bFindItem = TRUE;
- break;
- }
- }
- if(!bFindItem) {
- strtmp = szGreenLow;
- strtmp += CString("