delay with initial condition passing still delays (+fix)

A forum for reporting bugs NOT related to custom plugins.

Moderator: MacroQuest Developers

silverj
orc pawn
orc pawn
Posts: 11
Joined: Mon Sep 25, 2017 2:49 am

delay with initial condition passing still delays (+fix)

Post by silverj » Mon Sep 25, 2017 2:58 am

To fix this, I checked for the initial delay condition already in MQ2MacroCommands.cpp:Delay,
by adding to the end of the function:

Code: Select all

	if (gDelayCondition[0]) {
		CHAR szCond[MAX_STRING];
		strcpy_s(szCond, gDelayCondition);
		ParseMacroParameter(GetCharInfo()->pSpawn, szCond);
		DOUBLE Result;
		if (!Calculate(szCond, Result)) {
			FatalError("Failed to parse /delay condition '%s', non-numeric encountered", szCond);
			return;
		}
		if (Result != 0) {
			// DebugSpewNoFile("/delay ending early, conditions met");
			gDelay = 0;
			bRunNextCommand = true;
		}
	}
It would be nice to integrate this, or any similar fix - when I do not have good fps, and my casting macros check for multiple delay conditions that mostly pass for each spell, without this my casting can easily get up to 0.5s unintended delays.

EqMule
Developer
Developer
Posts: 2697
Joined: Fri Jan 03, 2003 9:57 pm
Contact:

Re: delay with initial condition passing still delays (+fix)

Post by EqMule » Mon Sep 25, 2017 6:52 am

Thanks I can add this
My status o/
If you like MQ2 and would like to contribute, please do. My goal is 25 donations per month.
So far I've received Image donations for this month's patches.

Bitcoin: 1Aq8ackjQ4f7AUvbUL7BE6oPfT8PmNP4Zq
Krono: PM me.
I can always use characters for testing, PM me if you can donate one.