//==================================================================================
//
//      Wolfpack Emu (WP)
//	UO Server Emulation Program
//
//	Copyright 1997, 98 by Marcus Rating (Cironian)
//  Copyright 2001 by holders identified in authors.txt
//	This program is free software; you can redistribute it and/or modify
//	it under the terms of the GNU General Public License as published by
//	the Free Software Foundation; either version 2 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 General Public License for more details.
//
//	You should have received a copy of the GNU General Public License
//	along with this program; if not, write to the Free Software
//	Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
//
//	* In addition to that license, if you are running this program or modified
//	* versions of it on a public system you HAVE TO make the complete source of
//	* the version used by you available or provide people with a location to
//	* download it.
//
//
//
//	Wolfpack Homepage: http://wpdev.sf.net/
//========================================================================================

// msgboard.h
//

#if defined(__unix__)
#include <dirent.h>

#include <string>
#include <vector>
using namespace std ;
#endif


// Maximum number of posts per board
// BUFFER SIZE = 2560 
// Therefore 0x3c max size = 2560 - 5 ( 0x3c header info ) 
//                         = 2550 
//
//                           2550 / 19 ( item segment size per msg ) 
//                         = 134 
// Round down to 128 Messages allowable on a message board (better safe than sorry)
// MAXPOSTS = 128 
#define MAXPOSTS        128

// Maximum number of entries in a ESCORTS list in the MSGBOARD.SCP file
#define MAXENTRIES      256

// Different types of user posts
#define LOCALPOST       0
#define REGIONALPOST    1
#define GLOBALPOST      2

// Different types of QUESTS (nQuestType)
// Added for Quests (ESCORTS)
// Reason for starting high and counting down, is that I store the entire user
// posted message as is (which includes the message type).  The message type
// for a user post is 0x05 and I also use this field to determine whether the
// post is marked for deletion (0x00).  In order to allow for the maximum number
// of different quest types, I opted to start high and count down.
#define ESCORTQUEST 0xFF
#define BOUNTYQUEST 0xFE
#define ITEMQUEST   0xFD


// Function Prototypes 
void    MsgBoardEvent( int nSerial );
void    MsgBoardSetPostType( int nSerial, int nPostType );
void    MsgBoardGetPostType( int nSerial );
int     MsgBoardPostQuest( int nSerial, int nQuestType );
void    MsgBoardQuestEscortCreate( P_CHAR pc_npc );
void    MsgBoardQuestEscortArrive( P_CHAR pc_npc, int nPCIndex );
void    MsgBoardQuestEscortDelete( P_CHAR pc_npc );
void    MsgBoardQuestEscortRemovePost( P_CHAR pc_npc );
void    MsgBoardMaintenance( void );
bool    MsgBoardRemoveGlobalPostBySerial( int nPostSerial );
#if defined(__unix__)
std::vector<std::string> MsgBoardGetFile( char* pattern, char* path) ;
#endif
