SpellReady

A forum for reporting bugs NOT related to custom plugins.

Moderator: MacroQuest Developers

Bretttido
a lesser mummy
a lesser mummy
Posts: 38
Joined: Wed Jun 23, 2004 1:57 am

SpellReady

Post by Bretttido » Fri Dec 03, 2004 6:43 pm

While not a huge bug, I think the SpellReady code should be changed a bit so SpellReady[] returns true when Gems are fading back in from the disabled state. Its pretty simple to do, just change the state check from spellstate==0 to spellstate!=1.

MQ2Main/MQ2DataTypes.cpp: Line 1988

Code: Select all

case SpellReady:
		if (pCastSpellWnd && Index[0])
		{
			if (IsNumber(Index))
			{
				// numeric
				unsigned long nGem=atoi(Index)-1;
				if (nGem<9)
				{
					if (!((PEQCASTSPELLWINDOW)pCastSpellWnd)->SpellSlots[nGem])
						Dest.DWord=0;
					else
						Dest.DWord = (((PEQCASTSPELLWINDOW)pCastSpellWnd)->SpellSlots[nGem]->spellstate!=1);
					Dest.Type=pBoolType;
					return true;
				}
			}
			else
			{
				for (unsigned long nGem=0 ; nGem < 9 ; nGem++)
				{
					if (PSPELL pSpell=GetSpellByID(pChar->MemorizedSpells[nGem]))
					{
						if (!stricmp(Index,pSpell->Name))
						{
							if (!((PEQCASTSPELLWINDOW)pCastSpellWnd)->SpellSlots[nGem])
								Dest.DWord=0;
							else
								Dest.DWord = (((PEQCASTSPELLWINDOW)pCastSpellWnd)->SpellSlots[nGem]->spellstate!=1);
							Dest.Type=pBoolType;
							return true;
						}
					}
				}
			}
		}
		return false;

frabtik
a ghoul
a ghoul
Posts: 114
Joined: Sat Feb 21, 2004 10:07 am

Post by frabtik » Fri Dec 10, 2004 12:03 pm

Have you tested this extensively? Sounds like a huge bug to me, lots of times I find myself casting by hand still when time is critical. Anyway I will definately be testing this out soon and thanks in advance if this is what I been looking for.

Bretttido
a lesser mummy
a lesser mummy
Posts: 38
Joined: Wed Jun 23, 2004 1:57 am

Post by Bretttido » Mon Dec 20, 2004 1:14 am

I've been using this for the past month. And it works flawlessly... and getting heals off a second quicker has saved me many-o-deaths im sure.

User avatar
Cr4zyb4rd
Plugins Czar
Posts: 1449
Joined: Tue Jul 20, 2004 11:46 am

Post by Cr4zyb4rd » Mon Dec 20, 2004 8:32 am

*bump*

Looks rock-solid to me.

Rusty~
a hill giant
a hill giant
Posts: 244
Joined: Wed Apr 14, 2004 2:55 pm

Post by Rusty~ » Tue Dec 21, 2004 8:29 pm

If i still played I would be really excited about this :P That "bug" in spell ready is the sole reason i wrote spell_routines.inc that used timers instead to determine if spells were ready... which is kind of sloppy!

Amadeus
The Maestro
The Maestro
Posts: 2036
Joined: Sat Jun 29, 2002 3:51 pm

Post by Amadeus » Fri Dec 24, 2004 3:00 pm

Added to zip. Thanks.

xyilla
naggy
naggy
Posts: 29514
Joined: Sun Feb 23, 2025 5:36 am

Re: SpellReady

Post by xyilla » Thu Mar 06, 2025 10:56 am


xyilla
naggy
naggy
Posts: 29514
Joined: Sun Feb 23, 2025 5:36 am

Re: SpellReady

Post by xyilla » Thu Mar 06, 2025 10:57 am


xyilla
naggy
naggy
Posts: 29514
Joined: Sun Feb 23, 2025 5:36 am

Re: SpellReady

Post by xyilla » Thu Mar 06, 2025 10:58 am


xyilla
naggy
naggy
Posts: 29514
Joined: Sun Feb 23, 2025 5:36 am

Re: SpellReady

Post by xyilla » Thu Mar 06, 2025 10:59 am


xyilla
naggy
naggy
Posts: 29514
Joined: Sun Feb 23, 2025 5:36 am

Re: SpellReady

Post by xyilla » Thu Mar 06, 2025 11:37 am


xyilla
naggy
naggy
Posts: 29514
Joined: Sun Feb 23, 2025 5:36 am

Re: SpellReady

Post by xyilla » Thu Mar 06, 2025 11:38 am


xyilla
naggy
naggy
Posts: 29514
Joined: Sun Feb 23, 2025 5:36 am

Re: SpellReady

Post by xyilla » Thu Mar 06, 2025 12:15 pm


xyilla
naggy
naggy
Posts: 29514
Joined: Sun Feb 23, 2025 5:36 am

Re: SpellReady

Post by xyilla » Thu Mar 06, 2025 12:16 pm


xyilla
naggy
naggy
Posts: 29514
Joined: Sun Feb 23, 2025 5:36 am

Re: SpellReady

Post by xyilla » Thu Mar 06, 2025 12:17 pm