Errors MQ2Cast is not auto-recasting on fizzle
Reply
MQ2Cast is not auto-recasting on fizzle
MQ2Cast is not auto recasting on fizzle.

Found the problem in a macro, but it happens with a direct command.

Entering the below line manually in the chat window will cast spirit sight on myself from gem6. Works great, but if I fizzle, it does not recast.

More +
/casting "Spirit Sight" gem6 -maxtries|3 -targetid|${Me.ID}


maxtries|3 is causing it to recast if I duck the spell or if I move and it does not channel through, but MQ2Cast is not recasting on a fizzle.

The wiki entry clearly states in the first feature line item it should recast on fizzle. I looked through the source at code.google.com but I just can't follow the fizzle logic.
http://www.macroquest2.com/wiki/index.php/MQ2Cast#Features

edit: I use the MQ2Emu_SOD_PEQ.rar distribution
_________________
Sorvani
Thu Sep 02, 2010 1:38 pm
Senior Project Member
ok definitely not recasting, it is returning CAST_SUCCESS not CAST_FIZZLE
_________________
Sorvani
Thu Sep 02, 2010 1:57 pm
Senior Project Member
I'm willing to bet this is related to the issue with it not returning cast immune. I really got to take the time to look at this, I just hate going through mq2cast's code
Thu Sep 02, 2010 2:56 pm
Project Lead
looking through the source on code.google.com I see where the Fizzle event is being checked
More +
  // waiting on the casting results to take actions.
  if(CastF==FLAG_PROGRESS3 && CastingE!=DONE_PROGRESS) {
    CastF=FLAG_PROGRESS4;
    if(CastR) CastR--;
    if(CastR) {
      if((CastingE==CAST_SUCCESS && CastW!=RECAST_LAND) ||
         (CastingE==CAST_COLLAPSE) ||
         (CastingE==CAST_FIZZLE) ||
         (CastingE==CAST_INTERRUPTED) ||
         (CastingE==CAST_RECOVER) ||
         (CastingE==CAST_RESIST)) {
        #if DEBUGGING
          WriteChatf("[%d] MQ2Cast:[Casting]: AutoRecast [%d].",(long)clock(),CastingE);
        #endif
        if(CastW!=RECAST_ZERO && !TargC) TargC=(pTarget)?((PSPAWNINFO)pTarget)->SpawnID:0;
        CastM=(long)clock()+DELAY_CAST;
        CastF=FLAG_REQUEST;
      }
    }
  }

but i can't figure out if it is actually trying to recast or not. having a problem following an unfamiliar language.

edit: I assume this is where it is being checked.. this is just watching the events I believe and is what would set up CastingE to equal 5, but i honestly have no idea.
More +
#define aCastEvent(List,Value,Filter) List.AddEvent(Filter,CastEvent,(void*)Value);
 
void __stdcall CastEvent(unsigned int ID, void *pData, PBLECHVALUE pValues) {
  Parsed=true;
  if(CastingE<(long)pData) CastingE=(long)pData;
  #if DEBUGGING
    WriteChatf("[%d] MQ2Cast:[OnChat]: Result=[%d] Called=[%d].",(long)clock(),CastingE,(long)pData);
  #endif
}


FYI, cast immune has two different LIST### in the event definitions. no idea what that does. most are all LIST289
_________________
Sorvani
Thu Sep 02, 2010 3:00 pm
Senior Project Member
can you and jonesalot both try out http://mqemulator.net/MQ2Cast.zip
it is for SoD, let me know if it works or fails, or if you need it for underfoot
Thu Sep 02, 2010 4:31 pm
Project Lead
works. in fact in one test using the same test line from my first post i fizzled all 3 times.

a few times i fizzled once.

in each case it did as specified.
_________________
Sorvani
Thu Sep 02, 2010 9:05 pm
Senior Project Member
Well this is a quick fix but I'm in bed already and I got a bday party after work tomorow so no estimation on when I'll post an updated build for sod/underfoot.
Thu Sep 02, 2010 10:54 pm
Project Lead
Errors MQ2Cast is not auto-recasting on fizzle
Reply