mirror of
https://github.com/UOX3DevTeam/UOX3
synced 2026-08-13 12:27:04 -04:00
Got rid of the Overflow() function, which no longer serves a purpose after timers have been upgraded from uint32_t to uint64_t Unified usage of TIMERVAL (UI64) and TVAL (also UI64) across code base; now only TIMERVAL is used Updated BuildTimeValue() function parameter from R32 to R64 Updated casting of values passed into BuildTimeValue() across source base Updated JS Timers and Temp Effects to support starting, saving and loading very long term effect timers; no more 49 days upper limit Ninja fix for new items added to a container appearing underneath other items in the container instead of over
74 lines
1.6 KiB
C++
74 lines
1.6 KiB
C++
//o-------------------------------------------------------------------------------------------------o
|
|
//| File - cHTMLSystem.h
|
|
//o-------------------------------------------------------------------------------------------------o
|
|
//| Purpose - Interface for the cHTMLSystem class
|
|
//o-------------------------------------------------------------------------------------------------o
|
|
|
|
#ifndef __CHTMLSYSTEM_H__
|
|
#define __CHTMLSYSTEM_H__
|
|
|
|
#if defined(_MSC_VER)
|
|
#if _MSC_VER > 1000
|
|
#pragma once
|
|
#endif // _MSC_VER > 1000
|
|
#endif
|
|
|
|
enum ETemplateType
|
|
{
|
|
ETT_ALLTEMPLATES = -1,
|
|
ETT_GMSTATUS =0 ,
|
|
ETT_GUILD,
|
|
ETT_OFFLINE,
|
|
ETT_PLAYER,
|
|
ETT_ONLINE,
|
|
ETT_INVALIDTEMPLATE = 0xFF
|
|
};
|
|
|
|
class cHTMLTemplate
|
|
{
|
|
private:
|
|
TIMERVAL updateTimer;
|
|
std::string inputFile;
|
|
bool loaded;
|
|
ETemplateType type;
|
|
std::string content;
|
|
std::string outputFile;
|
|
std::string name;
|
|
TIMERVAL scheduledUpdate;
|
|
|
|
public:
|
|
cHTMLTemplate();
|
|
~cHTMLTemplate();
|
|
void Process( void );
|
|
void Poll( void );
|
|
void LoadTemplate( void );
|
|
void UnloadTemplate( void );
|
|
void Load( CScriptSection *found );
|
|
|
|
// Some Getters
|
|
std::string GetName( void ) const;
|
|
std::string GetOutput( void ) const;
|
|
std::string GetInput( void ) const;
|
|
ETemplateType GetTemplateType( void ) const;
|
|
TIMERVAL GetScheduledUpdate( void ) const;
|
|
TIMERVAL GetUpdateTimer( void ) const;
|
|
};
|
|
|
|
class cHTMLTemplates
|
|
{
|
|
private:
|
|
std::vector<cHTMLTemplate*> Templates;
|
|
|
|
public:
|
|
cHTMLTemplates() = default;
|
|
~cHTMLTemplates();
|
|
|
|
void Load( void );
|
|
void Unload( void );
|
|
void Poll( ETemplateType nTemplateId = ETT_ALLTEMPLATES );
|
|
void TemplateInfoGump( CSocket *mySocket );
|
|
};
|
|
|
|
extern cHTMLTemplates *HTMLTemplates;
|
|
|
|
#endif
|