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

📄 eventkick.cpp

📁 天之炼狱1服务器端源文件游戏服务端不完整
💻 CPP
字号:
//////////////////////////////////////////////////////////////////////////////// Filename    : EventKick.cpp// Written by  : Reiot// Description : //////////////////////////////////////////////////////////////////////////////#include "EventKick.h"#include "GamePlayer.h"#include "StringPool.h"	#include "Gpackets/GCSystemMessage.h"#include <stdio.h>//////////////////////////////////////////////////////////////////////////////// class EventKick member methods//////////////////////////////////////////////////////////////////////////////EventKick::EventKick(GamePlayer* pGamePlayer) 	throw(): Event(pGamePlayer){//	m_pKickZone = NULL;//	m_X = m_Y = 0;}EventKick::~EventKick() 	throw(){}//----------------------------------------------------------------------// affect//----------------------------------------------------------------------void EventKick::sendMessage()	throw(Error){	__BEGIN_TRY	Assert(m_pGamePlayer != NULL);	Creature * pCreature = m_pGamePlayer->getCreature();	Timeval currentTime;	getCurrentTime(currentTime);	Turn_t       RemainTime = max(0, (int)(m_Deadline.tv_sec-currentTime.tv_sec));    char msg[50];    sprintf( msg, g_pStringPool->c_str( STRID_DISCONNECT_COUNT_DOWN ),                    (int)RemainTime );    string sMsg( msg );	/*	StringStream msg;	if (m_Message.size() > 0)	{		msg << m_Message;	}	msg << " " << (int)RemainTime << "檬 饶俊 立加捞 谗绢笼聪促.";	*/	GCSystemMessage gcSystemMessage;	gcSystemMessage.setMessage(sMsg);	pCreature->getPlayer()->sendPacket( &gcSystemMessage );	//setNextTime( m_MessageTick );	__END_CATCH}void EventKick::activate () 	throw (Error){	__BEGIN_TRY	__BEGIN_DEBUG	Assert(m_pGamePlayer != NULL);	m_pGamePlayer->setPenaltyFlag(PENALTY_TYPE_KICKED);	m_pGamePlayer->setItemRatioBonusPoint(5);	__END_DEBUG	__END_CATCH}string EventKick::toString () const 	throw (){	StringStream msg;	msg << "EventKick("		<< ")";	return msg.toString();}

⌨️ 快捷键说明

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