Sync with Forge server, rev fa044821f36dfdd47986c32a1357fc028984b385
parent
7873a839ef
commit
a3a074f455
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,58 @@
|
||||
// Ryzom - MMORPG Framework <http://dev.ryzom.com/projects/ryzom/>
|
||||
// Copyright (C) 2010 Winch Gate Property Limited
|
||||
//
|
||||
// This program is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU Affero General Public License as
|
||||
// published by the Free Software Foundation, either version 3 of the
|
||||
// License, or (at your option) any later version.
|
||||
//
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU Affero General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU Affero General Public License
|
||||
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
|
||||
|
||||
#error "Deprecated"
|
||||
|
||||
#ifndef RYAI_BOT_CHAT_INTERFACE_H
|
||||
#define RYAI_BOT_CHAT_INTERFACE_H
|
||||
|
||||
// Nel Misc
|
||||
#include "nel/misc/types_nl.h"
|
||||
#include "nel/misc/entity_id.h"
|
||||
#include "game_share/news_types.h"
|
||||
#include "game_share/bot_chat_types.h"
|
||||
|
||||
// the class
|
||||
class CBotChatInterface
|
||||
{
|
||||
public:
|
||||
// the callback type for user callbacks for start of bot chat
|
||||
// returns the name of the bot chat automaton to use
|
||||
// if an empty string is returned no bot chat is launched
|
||||
typedef std::string (*TCallbackBegin)(NLMISC::CEntityId player,NLMISC::CEntityId bot);
|
||||
|
||||
// the callback types for user callback for end of bot chat
|
||||
// called just after the chat session has been closed
|
||||
typedef void (*TCallbackEnd)(NLMISC::CEntityId player,NLMISC::CEntityId bot);
|
||||
|
||||
public:
|
||||
// classic init() and release()
|
||||
static void init(TCallbackBegin cbBegin=NULL,TCallbackEnd cbEnd=NULL);
|
||||
static void release();
|
||||
|
||||
// build a vector of the players currently chatting with a given bot
|
||||
// this routine may not be very fast as the entire bot chat map is
|
||||
// parsed in order to build the vector
|
||||
static void getBotChatPartners(NLMISC::CEntityId bot,std::vector<NLMISC::CEntityId> &result);
|
||||
|
||||
// routines to force the end of a bot chat
|
||||
static void endChatForPlayer(NLMISC::CEntityId player);
|
||||
static void endAllChatForBot(NLMISC::CEntityId bot);
|
||||
};
|
||||
|
||||
#endif
|
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,66 @@
|
||||
// Ryzom - MMORPG Framework <http://dev.ryzom.com/projects/ryzom/>
|
||||
// Copyright (C) 2016 Winch Gate Property Limited
|
||||
//
|
||||
// This program is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU Affero General Public License as
|
||||
// published by the Free Software Foundation, either version 3 of the
|
||||
// License, or (at your option) any later version.
|
||||
//
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU Affero General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU Affero General Public License
|
||||
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
|
||||
|
||||
#include "stdpch.h"
|
||||
#include "admin_log.h"
|
||||
#include "nel/misc/displayer.h"
|
||||
|
||||
using namespace std;
|
||||
using namespace NLMISC;
|
||||
|
||||
CAdminLog AdminLog;
|
||||
|
||||
//-----------------------------------------------
|
||||
// CAdminLog init
|
||||
//-----------------------------------------------
|
||||
void CAdminLog::init(const std::string & logFile)
|
||||
{
|
||||
_LogFile = logFile;
|
||||
if ( logFile.empty() )
|
||||
Log = NLMISC::WarningLog;
|
||||
else
|
||||
{
|
||||
Log = new NLMISC::CLog;
|
||||
_Fd.setParam ( logFile, true);
|
||||
Log->addDisplayer (&_Fd);
|
||||
}
|
||||
}// CAdminLog init
|
||||
|
||||
//-----------------------------------------------
|
||||
// CAdminLog release
|
||||
//-----------------------------------------------
|
||||
void CAdminLog::release()
|
||||
{
|
||||
if ( Log != NLMISC::WarningLog )
|
||||
delete Log;
|
||||
}// CAdminLog release
|
||||
|
||||
//-----------------------------------------------
|
||||
//-----------------------------------------------
|
||||
void CAdminLog::display(const char *format, ...)
|
||||
{
|
||||
if (Log == NULL) return;
|
||||
|
||||
char *str;
|
||||
NLMISC_CONVERT_VARGS (str, format, 256);
|
||||
|
||||
string toDisp = str;
|
||||
toDisp = string(IDisplayer::dateToHumanString()) + string(" ") + toDisp;
|
||||
|
||||
Log->displayRawNL(toDisp.c_str());
|
||||
}
|
@ -0,0 +1,82 @@
|
||||
// Ryzom - MMORPG Framework <http://dev.ryzom.com/projects/ryzom/>
|
||||
// Copyright (C) 2016 Winch Gate Property Limited
|
||||
//
|
||||
// This program is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU Affero General Public License as
|
||||
// published by the Free Software Foundation, either version 3 of the
|
||||
// License, or (at your option) any later version.
|
||||
//
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU Affero General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU Affero General Public License
|
||||
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
|
||||
|
||||
#ifndef RY_ADMIN_LOG_H
|
||||
#define RY_ADMIN_LOG_H
|
||||
|
||||
#include "nel/misc/log.h"
|
||||
#include "nel/misc/debug.h"
|
||||
#include "nel/misc/variable.h"
|
||||
|
||||
|
||||
/**
|
||||
* separate log system for admin commands. Logs are in egs_mission.log. use ADMINLOG to log in this file
|
||||
* \author Ulukyn
|
||||
* \date 2016
|
||||
*/
|
||||
class CAdminLog
|
||||
{
|
||||
public:
|
||||
/// init the log
|
||||
void init(const std::string & logFile);
|
||||
///release the log
|
||||
void release();
|
||||
///\return the name of the log file
|
||||
inline const std::string & getLogFile(){return _LogFile;}
|
||||
|
||||
void display(const char *format, ...);
|
||||
|
||||
/// the NEL log used for in the mission log
|
||||
NLMISC::CLog *Log;
|
||||
private:
|
||||
/// the file displayer used to log the mission information
|
||||
NLMISC::CFileDisplayer _Fd;
|
||||
/// log file name
|
||||
std::string _LogFile;
|
||||
};
|
||||
|
||||
/// the mission log
|
||||
extern CAdminLog AdminLog;
|
||||
|
||||
/// macro used to log missions script error
|
||||
#define ADMINLOG AdminLog.display
|
||||
|
||||
#endif // RY_ADMIN_LOG_H
|
||||
|
||||
/* End of admin_log.h */
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
@ -0,0 +1,49 @@
|
||||
// Ryzom - MMORPG Framework <http://dev.ryzom.com/projects/ryzom/>
|
||||
// Copyright (C) 2010 Winch Gate Property Limited
|
||||
//
|
||||
// This program is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU Affero General Public License as
|
||||
// published by the Free Software Foundation, either version 3 of the
|
||||
// License, or (at your option) any later version.
|
||||
//
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU Affero General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU Affero General Public License
|
||||
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
|
||||
|
||||
#ifndef RY_KNOWN_BRICK_INFO_H
|
||||
#define RY_KNOWN_BRICK_INFO_H
|
||||
|
||||
// ---------------------------------------------------------------------------
|
||||
class CStaticGameBrick;
|
||||
|
||||
// ---------------------------------------------------------------------------
|
||||
struct CKnownBrickInfo
|
||||
{
|
||||
const CStaticGameBrick* Form;
|
||||
uint32 LatencyEndDate;
|
||||
bool OldLatentState;
|
||||
|
||||
CKnownBrickInfo( const CStaticGameBrick *form = NULL ) : Form(form)
|
||||
{
|
||||
LatencyEndDate = 0;
|
||||
OldLatentState = false;
|
||||
}
|
||||
|
||||
/// Serialisation
|
||||
void serial(class NLMISC::IStream &f)
|
||||
{
|
||||
// f.serial( LatencyEndDate );
|
||||
// f.serial( OldLatentState );
|
||||
// nothing to serial here, the date are no longer meaningful, all bricks are available when the character connects to the game
|
||||
// and the Form is set while setting the databse in the setDatabase() method
|
||||
}
|
||||
};
|
||||
|
||||
#endif // RY_KNOWN_BRICK_INFO_H
|
||||
/* known_brick_info.h */
|
File diff suppressed because it is too large
Load Diff
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue