Merge branch 'feature/clean-deprecated' into kaetemi-develop
This commit is contained in:
commit
bd7418e484
9 changed files with 0 additions and 1402 deletions
|
@ -25,7 +25,6 @@
|
|||
#include "game_share/generic_xml_msg_mngr.h"
|
||||
#include "game_share/msg_client_server.h"
|
||||
#include "game_share/bot_chat_types.h"
|
||||
#include "game_share/news_types.h"
|
||||
#include "game_share/mode_and_behaviour.h"
|
||||
#include "game_share/chat_group.h"
|
||||
#include "game_share/character_summary.h"
|
||||
|
|
|
@ -1,36 +0,0 @@
|
|||
// 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_NEWS_TYPES_H
|
||||
#define RY_NEWS_TYPES_H
|
||||
|
||||
namespace NEWSTYPE
|
||||
{
|
||||
enum TNewsType
|
||||
{
|
||||
Unknown,
|
||||
General,
|
||||
FyrosWorker,
|
||||
FyrosTrainer,
|
||||
FyrosGeneral,
|
||||
};
|
||||
};
|
||||
|
||||
#endif // RY_NEWS_TYPES_H
|
||||
|
||||
/* End of news_types.h */
|
|
@ -23,7 +23,6 @@
|
|||
// 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
|
||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -1,58 +0,0 @@
|
|||
// 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
|
|
@ -21,7 +21,6 @@
|
|||
#include "game_share/tick_event_handler.h"
|
||||
#include "game_share/msg_client_server.h"
|
||||
#include "game_share/mode_and_behaviour.h" //TEMP!!!
|
||||
#include "game_share/news_types.h"
|
||||
#include "game_share/bot_chat_types.h"
|
||||
#include "game_share/brick_types.h"
|
||||
#include "game_share/loot_harvest_state.h"
|
||||
|
@ -35,7 +34,6 @@
|
|||
#include "nel/misc/command.h"
|
||||
#include "nel/net/message.h"
|
||||
|
||||
#include "news_manager.h"
|
||||
#include "string_manager.h"
|
||||
#include "messages.h"
|
||||
//#include "ios_pd.h"
|
||||
|
|
|
@ -1,83 +0,0 @@
|
|||
// 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/>.
|
||||
|
||||
|
||||
#include "stdpch.h"
|
||||
#include "news_manager.h"
|
||||
#include "input_output_service.h"
|
||||
|
||||
//#include "game_share/generic_msg_mngr.h"
|
||||
#include "game_share/msg_client_server.h"
|
||||
#include "game_share/news_types.h"
|
||||
|
||||
using namespace std;
|
||||
using namespace NLMISC;
|
||||
using namespace NLNET;
|
||||
|
||||
class CNewsEntry
|
||||
{
|
||||
public:
|
||||
CNewsEntry () : Type(NEWSTYPE::Unknown) { }
|
||||
CNewsEntry (NEWSTYPE::TNewsType type, const string &stringId, const vector<uint64> &args) : Type(type), StringId(StringId), Args(args) { }
|
||||
|
||||
NEWSTYPE::TNewsType Type;
|
||||
string StringId;
|
||||
vector<uint64> Args;
|
||||
};
|
||||
|
||||
deque<CNewsEntry> News;
|
||||
|
||||
static void cbAddNews (CMessage& msgin, const std::string &serviceName, TServiceId serviceId )
|
||||
{
|
||||
NEWSTYPE::TNewsType type = NEWSTYPE::Unknown;
|
||||
string stringId;
|
||||
vector<uint64> args;
|
||||
|
||||
msgin.serialEnum (type);
|
||||
msgin.serial (stringId);
|
||||
msgin.serialCont (args);
|
||||
|
||||
News.push_back(CNewsEntry(type, stringId, args));
|
||||
|
||||
nlinfo ("added news %s for type %d from service %s", stringId.c_str(), type, serviceName.c_str());
|
||||
}
|
||||
|
||||
|
||||
static TUnifiedCallbackItem CbArray[]=
|
||||
{
|
||||
{ "ADD_NEWS", cbAddNews },
|
||||
};
|
||||
|
||||
|
||||
void CNewsManager::init()
|
||||
{
|
||||
CUnifiedNetwork::getInstance()->addCallbackArray(CbArray, sizeof (CbArray) / sizeof (CbArray[0]));
|
||||
}
|
||||
|
||||
|
||||
void CNewsManager::getNews (NEWSTYPE::TNewsType type, CBitMemStream &bms)
|
||||
{
|
||||
nlassert (type != NEWSTYPE::Unknown);
|
||||
|
||||
sint val = (sint)frand ((float)News.size());
|
||||
|
||||
string res;
|
||||
//CChatManager::getStaticDB ().getInfos (News[val].stringId, res, bms);
|
||||
nlinfo ("sending news '%s' '%s' with %d args", News[val].StringId.c_str(), res.c_str(), News[val].Args.size());
|
||||
|
||||
//bms.serial (News[val].stringId);
|
||||
bms.serialCont (News[val].Args);
|
||||
}
|
|
@ -1,60 +0,0 @@
|
|||
// 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 NEWS_MANAGER_H
|
||||
#define NEWS_MANAGER_H
|
||||
|
||||
|
||||
// misc
|
||||
#include "nel/misc/types_nl.h"
|
||||
#include "nel/misc/bit_mem_stream.h"
|
||||
|
||||
// game share
|
||||
#include "game_share/ryzom_entity_id.h"
|
||||
//#include "game_share/chat_static_database.h"
|
||||
//#include "game_share/chat_dynamic_database.h"
|
||||
#include "game_share/news_types.h"
|
||||
|
||||
// std
|
||||
#include <map>
|
||||
#include <string>
|
||||
|
||||
|
||||
/**
|
||||
* CNewsManager
|
||||
* \author Vianney Lecroart
|
||||
* \author Nevrax France
|
||||
* \date 2002
|
||||
*/
|
||||
class CNewsManager
|
||||
{
|
||||
public :
|
||||
|
||||
/**
|
||||
* Init the manager.
|
||||
*/
|
||||
static void init ();
|
||||
|
||||
/// return a news of a given type
|
||||
static void getNews (NEWSTYPE::TNewsType type, NLMISC::CBitMemStream &bms);
|
||||
};
|
||||
|
||||
|
||||
#endif // NEWS_MANAGER_H
|
||||
|
||||
/* End of news_manager.h */
|
|
@ -74,7 +74,6 @@
|
|||
#include "game_share/mirror_prop_value.h"
|
||||
#include "game_share/mode_and_behaviour.h"
|
||||
#include "game_share/msg_client_server.h"
|
||||
#include "game_share/news_types.h"
|
||||
#include "game_share/people.h"
|
||||
#include "game_share/player_visual_properties.h"
|
||||
#include "game_share/power_types.h"
|
||||
|
|
Loading…
Reference in a new issue