Log in

View Full Version : LoS And Deathtouch


Kilralpine
01-22-2009, 04:22 PM
I know every mobs Deathtouch was moved off of an npcspecialatk and moved to the spells tables... the ISSUE is...

People are 5 boxing a 2 group mob by LoS'ing their tank; by doing this their able to avoid death touch...

The mobs trying to cast deathtouch as a targeted spell... which he cant do because his main focus "technically" is out of line of sight

What are some solutions...

I tried making a swarm type pet that is casted by the mob that DT's every meele swing... swarm pet has 150 agro and is KOS to players... came across the same issue; pet only spawns if tank has LoS (tried setting spell as a Point blank AE - same issue)

Anyone got a fix to this?? id really hate to just shrug this off...

Kilralpine
01-22-2009, 05:00 PM
besides moving it to perl... i meant sry *edit

VallonTallonZek
01-23-2009, 01:08 PM
On line 1344 of spells.cpp add the red portion

if(spell_target && IsDetrimentalSpell(spell_id) && !CheckLosFN(spell_target) && !IsHarmonySpell(spell_id) && spells[spell_id].id != 982)

It isnt the most elegant way to do it, but it is simple and it works.

Kilralpine
01-24-2009, 11:24 AM
thank you so much! LOL I was looking for this...

Kilralpine
01-24-2009, 12:57 PM
Implemented This and Was Unsuccessful... We Miss Anything??

VallonTallonZek
01-24-2009, 11:46 PM
The server I work on has a different way of handling that area of code than the stock source, but that should be the line for the stock source.

the whole check should look like this:

// solar: check line of sight to target if it's a detrimental spell
if(spell_target && IsDetrimentalSpell(spell_id) && !CheckLosFN(spell_target) && !IsHarmonySpell(spell_id) && spells[spell_id].id != 982)
{
mlog(SPELLS__CASTING, "Spell %d: cannot see target %s", spell_target->GetName());
Message_StringID(13,CANT_SEE_TARGET);
return false;
}

The only problem is that I cant test it myself.

EDIT: Have you tryed testing CT out in the open and ensure that he is actually doing multiple DTs as expected? Our server had an issue with timing DTs, and we moved the actual DT to a perl script.

Kilralpine
01-27-2009, 02:03 PM
Nah, Im probably just going to move it to perl myself...