when you say "this works" are you referring to the spells working or the act of recreating the issue working?azafaraht wrote:Tried to recreate my issue. This works:
1. Create new character
2. Learn cure as WHM
3. Cast
This doesn't:
1. Create new character and logout.
2. Through SQL, unlock all jobs.
3. Through SQL, set magic skill for healing and summoning.
4. Log in, and cast as WHM or SMN.
Magic Casting Interrupted
Forum rules
NO LONGER BEING MAINTAINED!
NO LONGER BEING MAINTAINED!
Re: Magic Casting Interrupted
Re: Magic Casting Interrupted
The spells worked for a small amount of time when creating a new character, leaning the cure spell and casting on myself.
Server running on Ubuntu 12.04 Server 64-bit on VirtualBox
Client running on Windows 7 64-bit iMac
Client running on Windows 7 64-bit iMac
Re: Magic Casting Interrupted
i'll try to remember to attempt to duplicate this tonightazafaraht wrote:The spells worked for a small amount of time when creating a new character, leaning the cure spell and casting on myself.
is it on your own private server?
Re: Magic Casting Interrupted
Yeah, private server... My guess has always been that I made a mistake somewhere, like mass learning spells through a lua script.
Server running on Ubuntu 12.04 Server 64-bit on VirtualBox
Client running on Windows 7 64-bit iMac
Client running on Windows 7 64-bit iMac
Re: Magic Casting Interrupted
GM command @addallspells doesn't really mess anything up and it adds every single spell at onceazafaraht wrote:Yeah, private server... My guess has always been that I made a mistake somewhere, like mass learning spells through a lua script.
my advice, if you really want to find out easily and not make me spend forever trying to replicate it, it to put some breakpoints in the code and step through to see what it's doing
ai_char_normal.cpp, ActionMagicCasting (line 1185) is probably the best spot
if you don't know how, that's ok, i'll try to replicate it ; ;
Re: Magic Casting Interrupted
I used the player:addSpell function, inside a NPC trigger event. That's how I learned all spells.
Thanks for advice and the location of the ActionMagicCasting. Well try now.
Thanks for advice and the location of the ActionMagicCasting. Well try now.
Server running on Ubuntu 12.04 Server 64-bit on VirtualBox
Client running on Windows 7 64-bit iMac
Client running on Windows 7 64-bit iMac
Re: Magic Casting Interrupted
Funny, created another character, taru, in sandoria, as black mage. Learned Stone. Went outside with the cute little taru, couldn't finish the casting... Ok, I'll be trying the breakpoint around ActionMagicCasting and will let you know my results. Thanks kjLotus.
Server running on Ubuntu 12.04 Server 64-bit on VirtualBox
Client running on Windows 7 64-bit iMac
Client running on Windows 7 64-bit iMac
Re: Magic Casting Interrupted
I want to printf from the cpp to the dsgame log. How can I achieve this so I can trace my error while casting?
Server running on Ubuntu 12.04 Server 64-bit on VirtualBox
Client running on Windows 7 64-bit iMac
Client running on Windows 7 64-bit iMac
Re: Magic Casting Interrupted
I used a ShowDebug statement after each ActionMagicInterrupt call in ai_char_normal.cpp, ActionMagicCasting to find where it is determining that the cast should be interrupted.
Casting is being interrupted here:
From what I can understand, in my private server, even though I'm standing and casting, the result of the calculate states otherwise. Hence, why I can never cast.
Casting is being interrupted here:
Code: Select all
//the check for player position only occurs AFTER the cast time is up, you can move so long as x/z is the same on finish.
//furthermore, it's actually quite lenient, hence the rounding to 1 dp
if (floorf(m_PChar->m_StartActionPos.x * 10 + 0.5) / 10 != floorf(m_PChar->loc.p.x * 10 + 0.5) / 10 ||
floorf(m_PChar->m_StartActionPos.z * 10 + 0.5) / 10 != floorf(m_PChar->loc.p.z * 10 + 0.5) / 10)
{
m_PChar->pushPacket(new CMessageBasicPacket(m_PChar, m_PChar, 0, 0, 16));
m_ActionType = ACTION_MAGIC_INTERRUPT;
ActionMagicInterrupt();
ShowDebug("Location: %u",7);
return;
}
Server running on Ubuntu 12.04 Server 64-bit on VirtualBox
Client running on Windows 7 64-bit iMac
Client running on Windows 7 64-bit iMac
Re: Magic Casting Interrupted
print those numbers. printf will go straight to the DSGame console
printf("startpos x: %f startpos z: %f endpos x: %f endpos z: %f\n", floorf(m_PChar->m_StartActionPos.x * 10 + 0.5) / 10, floorf(m_PChar->loc.p.x * 10 + 0.5) / 10, floorf(m_PChar->m_StartActionPos.z * 10 + 0.5) / 10, floorf(m_PChar->loc.p.z * 10 + 0.5) / 10);
can't really think of any causes for something like this off the top of my head
printf("startpos x: %f startpos z: %f endpos x: %f endpos z: %f\n", floorf(m_PChar->m_StartActionPos.x * 10 + 0.5) / 10, floorf(m_PChar->loc.p.x * 10 + 0.5) / 10, floorf(m_PChar->m_StartActionPos.z * 10 + 0.5) / 10, floorf(m_PChar->loc.p.z * 10 + 0.5) / 10);
can't really think of any causes for something like this off the top of my head