Azerothcore-wotlk: Target is in line of sight through the Texture [$40 awarded]

Created on 17 Dec 2016  Â·  19Comments  Â·  Source: azerothcore/azerothcore-wotlk

Description: If someone casts any spell, the texture is ignored, allowing you to attack or being attack, out of sight of the target. This happens in PvE and PvP.

Current behaviour: If a player is hidden behind a mountain without having a visual on the target, it can be hit without any problems through the texture.

Expected behaviour: Target is not in line of sight, so it wouldn't be possible to cast any spell.

Steps to reproduce the problem:

  1. Take two characters and bring them on any map.
  2. Hide a character under a hill or a mountain, and the other character above, without it being possible to see the hidden target.
  3. You have to cast any spell to the target over the mountain, or vice versa.

These two images should help you understand the problem:

  1. http://tinypic.com/view.php?pic=24v4bb9&s=9#.WFJPhqnrxwE
  2. http://tinypic.com/view.php?pic=2a4wfh5&s=9#.WFJPQ6nrxwF

In these images we understand that none of the characters should be attacked because it is out of the target view.

When he was tested: it was tested on 14.12.2016 with the presence of a staff member to confirm the obvious problem.

AC hash/commit: 9d0c8dc71bb867218a949644b72592b452a7e62b

Operating system: Windows 10 64bit

Bountysource


The $40 bounty on this issue has been claimed at Bountysource.

Bounty

Most helpful comment

@Yehonal I'm going to test @Yehonal but the problem is in that commit there are also other files edited so how can we figure out what are the changes related to this concrete issue?
Also, the mmaps/vmaps/maps extractors of Azerothcore are broken as fuck i think, maczuga is updating this with a working extractors i think, correct me if i'm wrong =P

All 19 comments

Could someone confirm it?

Il 17/Dic/2016 02:04, "Irome" notifications@github.com ha scritto:

Description: If someone casts any spell, the texture is ignored,
allowing you to attack or being attack, out of sight of the target. This
happens in PvE and PvP.

Current behaviour: If a player is hidden behind a mountain without
having a visual on the target, it can be hit without any problems through
the texture.

Expected behaviour: Target is not in line of sight, so it wouldn't be
possible to cast any spell.

Steps to reproduce the problem:

  1. Take two characters and bring them on any map.
  2. Hide a character under a hill or a mountain, and the other
    character above, without it being possible to see the hidden target.
  3. You have to cast any spell to the target over the mountain, or vice
    versa.

These two images should help you understand the problem:

  1. http://tinypic.com/view.php?pic=24v4bb9&s=9#.WFJPhqnrxwE
  2. http://tinypic.com/view.php?pic=2a4wfh5&s=9#.WFJPQ6nrxwF

In these images we understand that none of the characters should be
attacked because it is out of the target view.

When he was tested: it was tested on 14.12.2016 with the presence of a
staff member to confirm the obvious problem.

AC hash/commit: 9d0c8dc
https://github.com/azerothcore/azerothcore-wotlk/commit/9d0c8dc71bb867218a949644b72592b452a7e62b

Operating system: Windows 10 64bit

—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/azerothcore/azerothcore-wotlk/issues/281, or mute
the thread
https://github.com/notifications/unsubscribe-auth/AAI-lDS7D-7XjdrmqOhrRQl_5Fwu0S30ks5rIzUXgaJpZM4LPuqx
.

Confirmed @Irome @Yehonal

In my case i created a warlock, and casted Shadow Bolt trough texture in Warsong Gulch.

Expected behaviour: As you said @Irome target is not in LoS, so target 1 cannot cast spells on target 2 if it's not on LoS.

If someone has latest rev of trinitycore to do a test , we can compare it eventually and checking for a solution

Maybe related to https://github.com/azerothcore/azerothcore-wotlk/issues/250 (read comments, there is a partial fix)

thanks @falzard , this is the fix : https://bitbucket.org/maczuga/sunwellcore/commits/1749037808d1de4f963b65aef117decacf78a8aa

we should try it and create a PR

@Yehonal I'm going to test @Yehonal but the problem is in that commit there are also other files edited so how can we figure out what are the changes related to this concrete issue?
Also, the mmaps/vmaps/maps extractors of Azerothcore are broken as fuck i think, maczuga is updating this with a working extractors i think, correct me if i'm wrong =P

@Maczuga could you help us to create this PR?

I also backported tc's vmaps etc and didin't run into this issue, i'll see if I can make a PR this week but no promise, kind of busy

If you do, you get the 20$ bounty @Blumfield

Someone?

Just wondering if it happens on trinitycore

yes it happens to but cases when it happen to loww like tree on warsong and etc small objects

it happens with hills, climbs, objects and even walls

it's quite critical. However, just FYI, when it will be fixed we also have to import a fix about hit calculation on npc area perimeter and not center to avoid bugs such as Sindragosa Tombs

I explained it here: https://github.com/TrinityCore/TrinityCore/issues/6541#issuecomment-147715990

In that issue golrag fix los calculation for GO https://github.com/TrinityCore/TrinityCore/pull/15807/files

Yes i know, but this is a fix that is needed if the LOS on gobject and structure is working.

Currently our issue is in the "root".

Some say it's blizzlike, some say it's not, and some say it's blizzlike but it's shit (me).

Dany proposed to make it a config option if fixed.

@Yehonal try this:

diff --git a/src/server/game/Entities/Object/Object.cpp b/src/server/game/Entities/Object/Object.cpp
index e4d9e61..bf23e41 100644
--- a/src/server/game/Entities/Object/Object.cpp
+++ b/src/server/game/Entities/Object/Object.cpp
@@ -1147,7 +1147,10 @@ bool WorldObject::IsWithinLOSInMap(const WorldObject* obj) const
return false;

 float ox, oy, oz;

- obj->GetPosition(ox, oy, oz);
+ float angle = obj->GetAngle(&GetPosition());
+ ox = obj->GetPositionX() + obj->GetObjectSize() * std::cos(angle);
+ oy = obj->GetPositionY() + obj->GetObjectSize() * std::sin(angle);
+ oz = obj->GetPositionZ();
return IsWithinLOS(ox, oy, oz);
}

UPDATE creature_model_info SET BoundingRadius=7.5, CombatReach=6 WHERE DisplayID=30890;

Fix: https://github.com/TrinityCore/TrinityCore/issues/6541#issuecomment-147715990 "Golrag"

https://github.com/TrinityCore/TrinityCore/issues/15807

@Kizarr it's another kind of issue

I suspect that we can't fix it, event if as a config, because the vmap information are missing in client

So maybe you should edit maps

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Maurowin picture Maurowin  Â·  3Comments

PivanDepolo picture PivanDepolo  Â·  3Comments

wetbrownsauce picture wetbrownsauce  Â·  3Comments

wampirr picture wampirr  Â·  3Comments

aradep picture aradep  Â·  3Comments