⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 npc.cpp

📁 墨香最新私服
💻 CPP
字号:
// Npc.cpp: implementation of the CNpc class.
//
//////////////////////////////////////////////////////////////////////

#include "stdafx.h"
#include "Npc.h"

//////////////////////////////////////////////////////////////////////
// Construction/Destruction
//////////////////////////////////////////////////////////////////////

CNpc::CNpc()
{

}

CNpc::~CNpc()
{

}


void CNpc::InitNpc(NPC_TOTALINFO* pTotalInfo)
{
	memcpy(&m_NpcInfo,pTotalInfo,sizeof(NPC_TOTALINFO));
	memset(m_QuestList, 0, 4*MAX_NPCQUEST_LIST);
	m_QuestCount = 0;
}



void CNpc::Process()
{

	CObject::Process();
}

void CNpc::SetMotionInState(BYTE State)
{
	switch(State)
	{
	case eObjectState_Move:
		{
			ASSERT(0);
		}
		break;
	case eObjectState_None:
		{
			m_ObjectState.State_Start_Motion = eMonsterMotion_Standard;
			m_ObjectState.State_Ing_Motion = eMonsterMotion_Standard;
			m_ObjectState.State_End_Motion = eMonsterMotion_Standard;
			m_ObjectState.State_End_MotionTime = 0;
		}
		break;
	default:
		{
			m_ObjectState.State_Start_Motion = -1;
			m_ObjectState.State_Ing_Motion = -1;
			m_ObjectState.State_End_Motion = -1;
			m_ObjectState.State_End_MotionTime = 0;
		}
		break;
	}
}

void CNpc::OnClicked()
{
	if( GetNpcKind() <= 5 || GetNpcKind() == 8 || GetNpcKind() == 10 || GetNpcKind() == 12 ||
	    GetNpcKind() == 13 || GetNpcKind() == 15 || GetNpcKind() == 25 ) 
	{
		ChangeBaseMotion(1);
		ChangeMotion(2,FALSE);
	}
	
	/*
	//////////////////////////////////////////////////////////////////////////
	// 烙矫 窍靛内爹 	
	// PJH2DO
	if( GetNpcKind() == 31 ||
		GetNpcKind() == 32 ||
		GetNpcKind() == 33 ||
		GetNpcKind() == 34 )
	{
		ChangeMotion(2);
	}
	*/
}


void CNpc::AddQuestIndex(int Idx)
{
	if(Idx <= 0)		return;

	m_QuestList[m_QuestCount] = Idx;
	++m_QuestCount;
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -