Pacify / Line of Sight help
I am having an issue with Pacify, and Theft of Thought working as intended on our server. I assumed it would be a fairly easy fix. I did a little research and came across a changelog that listed these changes as already being addressed. See below.
==02/10/2008 WildcardX: Mesmerize line of spells will now cause aggro when casted on a mesmerize immune mob. WildcardX: Fixed enchanter spell Theft of Thought. This spell will now work as described. WildcardX: The pacify/harmony line of spells will no longer require a line of sight check to complete a cast. Is there a post about these code changes and what needs to be changed for this to be fixed? or do you know if this is handled in spells.cpp? I have only been working on this code for a couple months on and off and would appreciate some direction of any kind. More directly, Pacify should not need line of sight, and theft of thought should be unresistible. I see this in the code Code:
} |
Maybe I'm not asking the right question. What needs to be changed that controls the need for "line of sight" for spells or spell lines?
|
as far as i know, there is no explicit toggle for LoS checks in the spell data. instead, the server is hard coded to check for LoS based upon the effects of the spell.
the snippet you posted, for example, checks for a negative return from IsHarmonySpell(), which checks for SE_Harmony or SE_ChangeFrenzyRad in the spell id you send as the parameter. if any of these are found, it's considered a harmony spell and the LoS check is ignored. Code:
bool IsHarmonySpell(uint16 spell_id) |
Oh, well thank you for the reply. I see what your saying, but my problem is that I want the LoS check to be ignored when casting Harmony line spells (like its supposed to be), however it is not being ignored, instead, you must have line of sight to cast harmony spells. Do you know what I would need to change/edit (in the hardcode) to fix this? Thanks so much.
|
... what i am saying is that it's already coded to ignore LoS checks for spells with SE_Harmony or SE_ChangeFrenzyRad.
Code:
// check line of sight to target if it's a detrimental spell |
Thanks again for the reply....
I see the code....., I see where it is already supposed to be ignoring LoS checks for Harmony line spells, but in-game on this server you must have line of sight, and also, in that code it pushes a message "CANT_SEE_TARGET",..for spells that need LoS, which works fine. In-game: if I try casting a harmony spell without LoS it doesn't even try to cast, shows the timer maybe for 1/10 of a second and won't cast. If you try to cast anything else without LoS it shows message as intended. Here is the code I'm using. Is there a syntax issue? Do you mind looking over this? Code:
float range = spells[spell_id].range; |
you stated you were having a LoS issue, which you apparently aren't. if you were, you'd be getting the message about not being able to see the target instead of it simply not casting.
it will be very difficult, if not impossible, for anyone to troubleshoot issues with your custom code without being able to look at all of it. i suggest adding logging messages so you track down the issue.. |
I get what your saying, we might all think differently I guess. I mean how else would I describe a problem with a spell that works other then you can't cast it unless you have LoS to the target. I assume the -LoS to target- code is limited. I also assume you have been through this code millions of times, also this is not custom code, the only thing custom is the range check which I stripped, returned back to original yet still have the issue.
Not sure what logs I should be looking at. Other than Line of sight all harmony spells work fine, they just currently need line of sight. I am hoping someone can point me in the right direction. |
am i correct in understanding that you are not getting the message that you can't see your target when you cast harmony, but it just isn't completing the casting of the spell? if that's the case and other spells that require line of sight are providing that message, but harmony is not, then the issue isn't with the line of sight check, it's somewhere else in your code.
what file (and class/function) is what you are posting in? i'm not seeing any source files with that comment from solar, nor am i finding any with the bard check. as for logging, you'd want to add lines that would write messages to the log file(s) like this one: Code:
mlog(SPELLS__CASTING, "Spell %d: cannot see target %s", spell_target->GetName()); http://www.eqemulator.net/wiki/wikka...a=ServerLogSys that'll help you track down any problems you have when working with the source code not doing what you are expecting. |
Thanks for taking your time to help me. It means alot. I'll do that and report back.
|
Quote:
http://code.google.com/p/vztzfebsour...pells.cpp#1316 Could be changes elsewhere that is stopping it working, e.g. the IsHarmony function in that repo is different than ours: http://code.google.com/p/vztzfebsour.../spdat.cpp#202 (checks for SE_Lull rather than SE_ChangeFrenzyRad) |
Yes. Yes, and Yes. Checking that now. Thanks Derision & Concrete, cool of you guys to give me some direction.
|
I fixed it. It was a number of things. Too much to list. Thanks so much for the help.
|
All times are GMT -4. The time now is 03:37 AM. |
Powered by vBulletin®, Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.