MQ2TimerType methods

Moderator: MacroQuest Developers

onetimehero
a ghoul
a ghoul
Posts: 105
Joined: Fri Sep 05, 2003 2:42 pm

MQ2TimerType methods

Post by onetimehero » Wed Jul 20, 2005 10:33 am

ISXEQDataTypes.cpp

Code: Select all

bool MQ2TimerType::GETMETHOD()
{
#define pPtr ((PMQTIMER)VarPtr.Ptr)
	if (!VarPtr.Ptr)
		return false;
	PMQ2TYPEMETHOD pMethod=MQ2TimerType::FindMethod(Method);
	if (!pMethod)
	{
		return false;
	}
	switch((TimerMethods)pMethod->ID)
	{
	case Reset:
		pPtr->Current=pPtr->Original;
		return true;
	case Expire:
		pPtr->Current=1;  // Will expire in a 10th of a second
		return true;
	case Set:
		if (argc)
		{
			MQ2TimerType::FromString(VarPtr,argv[0]);
			return true;
		}
	}
	return false;
#undef pPtr
}
MQ2DataTypes.h

Code: Select all

   static enum TimerMembers
   {
	   Value=1,
	   OriginalValue=2,
   };
	static enum TimerMethods
	{
		Reset=1,
		Expire=2,
		Set=3,
	};
   MQ2TimerType():MQ2Type("timer")
   {
	  TypeMember(Value);
	  TypeMember(OriginalValue);

	  TypeMethod(Reset);
	  TypeMethod(Expire);
	  TypeMethod(Set);
   }
Hmm. That's odd.

Lax
We're not worthy!
We're not worthy!
Posts: 3524
Joined: Thu Oct 17, 2002 1:01 pm
Location: ISBoxer
Contact:

Post by Lax » Wed Jul 20, 2005 1:26 pm

cvsed
Lax Lacks
Master of MQ2 Disaster
Purveyor of premium, EULA-safe MMORPG Multiboxing Software
* Multiboxing with ISBoxer: Quick Start Video
* EQPlayNice, WinEQ 2.0