I use this code:
LineOfSight(GetCharInfo()->pSpawn, target)
I think this is bugging since the last or last couple of patches. I notice the following:
In a room with several mobs hidden behind walls in other rooms, LineOfSight will return FALSE when "idle". However, after killing one of the mobs, and without the character having moved (or the other mobs in the rooms having moved), LineOfSight will return TRUE for a few seconds, long enough for my char to try casting on them. After the first cast failure (CANNOT_SEE) it stops casting on the invisible mobs.
If I pull another mob (without the toon involved moving) and killing it, the same thing happens again -- LineOfSight returns TRUE for a bit, then returns to normal again.
I seen this happen in multiple places, and its pretty obvious because I use that toon to randomly cast on mobs that are nearby and in line of sight. This has been working fine for a long time, but broke recently -- noticable by the toon trying to cast on mobs that it cannot see which it didn't before (and only does once or twice before LineOfSight returns to its senses again).

