CmdApprentice.cpp
上传用户:garry_shen
上传日期:2015-04-15
资源大小:45647k
文件大小:10k
- #include "stdafx.h"
- #include "XMudClient.h"
- #include "MenuCreateNew.h"
- #include "MapInfo.h"
- #include "NpcInfo.h"
- #include "D3DRMScreen.h"
- #include "CommandCheck.h"
- #include "MainScreen.h"
- #include "CmdFunction.h"
- #ifdef _DEBUG
- #undef THIS_FILE
- static char THIS_FILE[]=__FILE__;
- #define new DEBUG_NEW
- #endif
- extern rmfullglobals myglobs;
- extern int g_nGameState;
- extern SOCKET hLCltForRSvrSock;
- extern CList<CPlayerInfo*,CPlayerInfo*>playerlist;
- extern CRITICAL_SECTION csMaplist;
- extern CList <CMapInfo *, CMapInfo *> maplist;
- extern CList <CSkillInfo *, CSkillInfo *> skilllist;
- extern CList <animationCallbackArgs *, animationCallbackArgs *> animationlist;
- extern CList <CNpcSkillInfo *, CNpcSkillInfo* >npcskilllist;
- extern CList <CSkillDefine *,CSkillDefine *> skilltypelist;
- extern int g_playerState;
- extern char g_tszPathName[256];
- extern CMainScreen m_MainScreen;
- CComApprentice::CComApprentice()
- {
- }
- CComApprentice::~CComApprentice()
- {
- }
- void CComApprentice::DoApprenticeProc()
- {
- CPlayerInfo *lpPlayerInfo;
- CMapInfo *lpMapInfo;
- animationCallbackArgs *cb;
- int i,j;
- BOOL bFindPerson = FALSE;
- CString strtmp;
- lpPlayerInfo = playerlist.GetHead();
- EnterCriticalSection(&csMaplist);
- j = maplist.GetCount();
- for(i=0;i<j;i++){
- lpMapInfo = maplist.GetAt(maplist.FindIndex(i));
- if(lpMapInfo->m_sENAME == lpPlayerInfo->m_sPERSONA){
- bFindPerson = TRUE;
- break;
- }
- }
- LeaveCriticalSection(&csMaplist);
- if(!bFindPerson){
- strtmp = szGreenLow;
- strtmp += CString("硂