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
52 lines
1.7 KiB
C++
52 lines
1.7 KiB
C++
#ifndef __TEFFECT_H__
|
|
#define __TEFFECT_H__
|
|
|
|
class CTEffect
|
|
{
|
|
private:
|
|
SERIAL source;
|
|
SERIAL dest;
|
|
TIMERVAL expiretime;
|
|
UI08 num;
|
|
UI16 more1;
|
|
UI16 more2;
|
|
UI16 more3;
|
|
bool dispellable;
|
|
CBaseObject * objptr;
|
|
UI16 assocScript;
|
|
TIMERVAL pauseTime;
|
|
|
|
public:
|
|
CTEffect() : source( INVALIDSERIAL ), dest( INVALIDSERIAL ), expiretime( 0 ), pauseTime( 0 ), num( 0 ), more1( 0 ), more2( 0 ), more3( 0 ), dispellable( false ), objptr( nullptr ), assocScript( 0xFFFF )
|
|
{
|
|
}
|
|
|
|
UI16 AssocScript( void ) const { return assocScript; }
|
|
CBaseObject *ObjPtr( void ) const { return objptr; }
|
|
bool Dispellable( void ) const { return dispellable; }
|
|
TIMERVAL ExpireTime( void ) const { return expiretime; }
|
|
TIMERVAL PauseTime( void ) const { return pauseTime; }
|
|
SERIAL Source( void ) const { return source; }
|
|
SERIAL Destination( void ) const { return dest; }
|
|
UI08 Number( void ) const { return num; }
|
|
UI16 More1( void ) const { return more1; }
|
|
UI16 More2( void ) const { return more2; }
|
|
UI16 More3( void ) const { return more3; }
|
|
|
|
void Source( SERIAL value ) { source = value; }
|
|
void Destination( SERIAL value ) { dest = value; }
|
|
void ExpireTime( TIMERVAL value ) { expiretime = value; }
|
|
void Number( UI08 value ) { num = value; }
|
|
void More1( UI16 value ) { more1 = value; }
|
|
void More2( UI16 value ) { more2 = value; }
|
|
void More3( UI16 value ) { more3 = value; }
|
|
void Dispellable( bool value ) { dispellable = value; }
|
|
void ObjPtr( CBaseObject *value ) { objptr = value; }
|
|
void AssocScript( UI16 value ) { assocScript = value; }
|
|
void PauseTime( TIMERVAL value ) { pauseTime = value; }
|
|
|
|
bool Save( std::ostream &effectDestination ) const; // saves the current effect
|
|
};
|
|
|
|
#endif
|
|
|