Trinitycore: Quest: Forced Hand / The Mist Isn't Listening

Created on 20 Mar 2013  ·  65Comments  ·  Source: TrinityCore/TrinityCore

Trinity Revision: 4e1a4b3ce4d5+ Database Version: TDB 335.51
http://www.wowhead.com/quest=12576

Forced Hand the required npcs are all unattackable (invalid target), they can however be killed by aoe or pet damage.

Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.

Branch-3.3.5a Branch-master Comp-Core Sub-Player

Most helpful comment

Core issue, something like this also fixes the issue, but I can't confirm if it is the right way. Based on what is used by mangos(https://github.com/cmangos/mangos-wotlk/commit/3ae212788b1eae31e5934160373182f843c0d65b)
```diff
diff --git a/src/server/game/Reputation/ReputationMgr.cpp b/src/server/game/Reputation/ReputationMgr.cpp
index e11fc01989..9af8397599 100644
--- a/src/server/game/Reputation/ReputationMgr.cpp
+++ b/src/server/game/Reputation/ReputationMgr.cpp
@@ -464,7 +464,7 @@ void ReputationMgr::SetAtWar(RepListID repListID, bool on)
void ReputationMgr::SetAtWar(FactionState* faction, bool atWar) const
{
// Do not allow to declare war to our own faction. But allow for rival factions (eg Aldor vs Scryer).
- if (atWar && (faction->Flags & FACTION_FLAG_PEACE_FORCED) && !(faction->Flags & FACTION_FLAG_RIVAL))
+ if (atWar && (faction->Flags & FACTION_FLAG_PEACE_FORCED) && !(faction->Flags & FACTION_FLAG_RIVAL) && ReputationToRank(faction->Standing) > REP_HATED)
return;

 // already set

All 65 comments

This won't solve the issue, it needs to be checked in the FactionTemplate.

True, even changing it to faction 14 will work, but it is still not a valid fix, it's just circumventing. The faction 2061 should have the correct fields to be attackable by players.

2061 Frenzyheart Tribe 0 0 0 1105(Enemy Faction) 1104(Friend Faction)
http://www.wowhead.com/faction=1104#members

o.O

You need to take one quest to be hostile with those mobs.

3 of us checked this quest that have taken all quests to get to this point. Its not the first time that the fenzyheart tribe Npcs have done this. Their faction in db is 2061, I tried changing everything as a test from faction to 14, to unit_flags from 0 to 8 to 32768. They remain invalid targets. There are many other Npcs that are suddenly invalid targets also, but that will be another bug report.

Aokromes is right, you need to finish http://www.wowhead.com/quest=12581/a-heros-burden
After that quest you can choose from the 2 available quests that the Oracle or the Frenzyheart give you; that should make you hostile with one faction and honored with the other, enabling you to target and hit them.

Yes I know that is why I put the bug report.

8710

A hero's burden worked fine. but will try the fix that is referenced for it, to see if it actually fixes the Frenzyheart npc issue and let you know.

Edit: after trying that fix it made all the npcs blue and still invalid targets, and can no longer be attacked by aoe or pet now. these are npcs at the spearborn encampment. Also the npcs at the path of the lifewarden all npcs are red agressive but invalid targets, these however can be killed with aoe.

So I would say the fix is not good.

Edit: I tried the changing the faction of these npcs to 58 like warchorlz suggested, and it works, the quest is completable.

This happens all the time with Oracles and Frenzyheart Tribe. Sometime they are attackable but most of the time the are not. I've been searching where is the problem but I couldn't find it. EAI and flags are fine but there is something which makes them unattackable even if the player is hostile with one of the factions.

Exactly, and there are many other npcs that have the same problem. When I changed the faction of these to 58 they worked perfectly.

Try again on head.

problem still exists for me on
Core revision: 0f0cea1
Database version: TDB 335.53

I did comment about this somewhere else there is no issue with this quest itself, or any of the other oracles/frenzyheart quests where you have to kill the other factions npcs which share same bug as this.

If you do whole chain in one session without relogging you can kill oracles/frenzyheart npcs when you get the quests to do do.

If you turn in any other quest which changes oracles/frenzyheat rep you will then find these npcs are attackable.

If you modify rep by 1 you will then also find you can attack these.

I commented on another issue think the real problem is the way the core handles these too factions,

Playe cannot change status of at war and upon relog or leaving zone this resets.

Try again on head.

probably one could fix this in:
void ReputationMgr::SetAtWar(FactionState* faction, bool atWar) const
and set the two faction automatically to 'in war'?

on login the server sends the "forced peace" flag, that causes this issue

you dont even have to relog to get this, if you completed a quest which rewards rep you can then attack the npcs in question but as soon as you leave the map ie enter bg, instance or leave and return when you get back these are once again non attackable.

FACTION_FLAG_PEACE_FORCED = 0x10,
// always overwrite FACTION_FLAG_AT_WAR, used for prevent war with own team factions.

so adding an exception for ( faction->ID == 1104 || faction->ID == 1105) if the player loads the map would help here. but where the core sets FACTION_FLAG_AT_WAR on loading?

I wonder if this bug is related to the unable to kill "on war" netherwing drakes on blade edge mountains.

try this:

diff --git a/src/server/game/Reputation/ReputationMgr.cpp b/src/server/game/Reputation/ReputationMgr.cpp
index 69e677b..e373fb0 100644
--- a/src/server/game/Reputation/ReputationMgr.cpp
+++ b/src/server/game/Reputation/ReputationMgr.cpp
@@ -459,6 +459,10 @@ void ReputationMgr::SetAtWar(RepListID repListID, bool on)

 void ReputationMgr::SetAtWar(FactionState* faction, bool atWar) const
 {
+    if (atWar)
+        if (faction->ID == 1104 || faction->ID == 1105)
+            faction->Flags |= FACTION_FLAG_AT_WAR;
+
     // not allow declare war to own faction
     if (atWar && (faction->Flags & FACTION_FLAG_PEACE_FORCED))
         return;

@Rushor your fix works, if it's not considered as hack it can be pushed.

oh well, it creates a new bug - if you reached a friendly rep with the npcs, you can still attack them :(

Interesting. You need to be at war with the NPCs if you have got either the initial quest or the daily, but not with the faction you take the quest from. Does this need to be defined in the quest or in the zone script?
My first guess would be the script zone_sholazar_basin.cpp, since the bug seems to manifest when you leave the zone and then enter it again.

could script only set at war if player has lower then friendly reputation with either of these factions/

Yes I was testing the conditions: this works for me but I'm not sure If it's considered as hack

diff --git a/src/server/game/Reputation/ReputationMgr.cpp b/src/server/game/Reputation/ReputationMgr.cpp
index 69e677b..e373fb0 100644
--- a/src/server/game/Reputation/ReputationMgr.cpp
+++ b/src/server/game/Reputation/ReputationMgr.cpp
@@ -459,6 +459,10 @@ void ReputationMgr::SetAtWar(RepListID repListID, bool on)

 void ReputationMgr::SetAtWar(FactionState* faction, bool atWar) const
 {
+    if (atWar)
+        if ((faction->ID == 1104 && _player->GetReputationRank(1104) < REP_UNFRIENDLY) || (faction->ID == 1105 && _player->GetReputationRank(1105) < REP_UNFRIENDLY))
+            faction->Flags |= FACTION_FLAG_AT_WAR;
+
     // not allow declare war to own faction
     if (atWar && (faction->Flags & FACTION_FLAG_PEACE_FORCED))
         return;

@Killyana : so you did not get the issue Rushor mentioned above, that the friendly NPCs are attackable?

No I fix it but I think npcs must be attackable only if they are hostile no? fi they are neutral or unfriendly they mustn't be attackable if I'm not wrong.

Sure, I was just asking that "if their status is Neutral (yellow) or Friendly (green) to your player, they don't appear attackable" unlike what Rushor seems to say in his comment above. I just thought that he had tested it and found them attackable, even if neutral or friendly. Maybe he didn't test it, just thought that it would be the result when adding that code?

well even though hostile think about what happens with sons of hodir quartermaster and other quest givers there that if you leave zone or relog after becoming friendly with them when you come back even if npcs show mark for interact ie quest, vendor on clicking these npcs you will attack them instead of opening quest menu, vendor, etc until you manually clear at war

one more idea: maybe enable the "At War" button in the players rep window?
how does one make that button available so a player can check it?

update, since https://github.com/TrinityCore/TrinityCore/commit/4ada913d02bb5376914e46843873b3285116154f these can no longer be attacked with aoe either if you cant attack them,

This can still be overcome for the dailies by turning in one of the other two dailies to force at war to be set but for quest chain unless player does whole chain without relogging or entering a bg or dungeon the chain will now be impossible to complete.

I think I have mentioned this before but think these have something to do with this as these are meant to track which faction player is currently working towards via hidden quests however I have tried looking at this before and seems on tc it is possible to get both of these at same time if you manually cast otherwise is not used

http://www.wowhead.com/spell=52515/wolvar-faction-tracking-quest
http://www.wowhead.com/spell=52511/oracle-faction-tracking-quest

http://www.wowhead.com/quest=12694/oracle-faction-choice-tracker
http://www.wowhead.com/quest=12693/wolvar-faction-choice-tracker

Problem for this chain quest still exist for me.
Core Rev https://github.com/TrinityCore/TrinityCore/commit/3e42d83e9cb86695a0467726f327599ff354293f

This problem is not actually related directly to any of the quests of these factions but the way the core handles reputation for oracles and frenzyheart on entering zone peace force gets flagged and thats why you can only attack mobs with aoe ie you cant set at war even though you are hostile.

If anything is valid here plz, open a pr for it.

@Killyana and @Rushor,
I check your fix but not work for me.
TC hash/commit: c0de28b

@Ghost-R : that is why the label [Feedback-FixOutdatedMissingWIP] is used and not [Feedback-PatchFix] .

@tkrokli ok understand

@Killyana , thank you for that hack, it works well for me.

diff --git a/src/server/game/Reputation/ReputationMgr.cpp b/src/server/game/Reputation/ReputationMgr.cpp
index 69e677b..e373fb0 100644
--- a/src/server/game/Reputation/ReputationMgr.cpp
+++ b/src/server/game/Reputation/ReputationMgr.cpp
@@ -459,6 +459,10 @@ void ReputationMgr::SetAtWar(RepListID repListID, bool on)

 void ReputationMgr::SetAtWar(FactionState* faction, bool atWar) const
 {
+    if (atWar)
+        if ((faction->ID == 1104 && _player->GetReputationRank(1104) < REP_UNFRIENDLY) || (faction->ID == 1105 && _player->GetReputationRank(1105) < REP_UNFRIENDLY))
+            faction->Flags |= FACTION_FLAG_AT_WAR;
+
     // not allow declare war to own faction
     if (atWar && (faction->Flags & FACTION_FLAG_PEACE_FORCED))
         return;

Killyana's fix worked for me also. Thank you.

Has this fix been put into the core as a fix yet or are you looking for something more yet?

It's a hack.

Can someone confirm or verify if the suggested fix in https://github.com/TrinityCore/TrinityCore/pull/20661 (recently closed) works to solve this issue?

This quest still does not work for me in rev. 72ff2e30c30d
Edit: e85a48179e3c1964cc70af1f779fd83eab62d93b did not fix this one because Oracles/Frenzyheart doesn't seem to have the FACTION_FLAG_RIVAL.

Thanks, that is interesting. Does that make this a DB issue too, or is it still a core only issue?

Core issue, something like this also fixes the issue, but I can't confirm if it is the right way. Based on what is used by mangos(https://github.com/cmangos/mangos-wotlk/commit/3ae212788b1eae31e5934160373182f843c0d65b)
```diff
diff --git a/src/server/game/Reputation/ReputationMgr.cpp b/src/server/game/Reputation/ReputationMgr.cpp
index e11fc01989..9af8397599 100644
--- a/src/server/game/Reputation/ReputationMgr.cpp
+++ b/src/server/game/Reputation/ReputationMgr.cpp
@@ -464,7 +464,7 @@ void ReputationMgr::SetAtWar(RepListID repListID, bool on)
void ReputationMgr::SetAtWar(FactionState* faction, bool atWar) const
{
// Do not allow to declare war to our own faction. But allow for rival factions (eg Aldor vs Scryer).
- if (atWar && (faction->Flags & FACTION_FLAG_PEACE_FORCED) && !(faction->Flags & FACTION_FLAG_RIVAL))
+ if (atWar && (faction->Flags & FACTION_FLAG_PEACE_FORCED) && !(faction->Flags & FACTION_FLAG_RIVAL) && ReputationToRank(faction->Standing) > REP_HATED)
return;

 // already set

If you .mod rep 1005 -5555 you will be able to attack oracles (check box at war checked), but if you disconnect and reconnect the check box will be unchecked.
@sirikfoll your fix make sense.

... because Oracles/Frenzyheart doesn't seem to have the FACTION_FLAG_RIVAL.

2061 as well as 2064 both have exactly this flag - see FactionTemplate.dbc.

The issues in ReputationMgr::SetAtWar(FactionState* faction come mostly from the misunderstood flag meaning. Actually, the FactionFlags::FACTION_FLAG_PEACE_FORCED flag disables clientside user control over At War field at the Reputation tab, while the checkmark may still be set by the server. The client gets this flag from the local Faction.dbc copy for Oracles/Frenzyhearts unavoidably. It is the server responsibility to set "At War" properly, which means a bit more sophisticated checks in the ReputationMgr.

Has anyone been able to find a solution to this?

@TheWinchesters : test sirikfoll's patch (link from Aokromes) and see if it works. Please also report back if it does.

Tested.
Quest: Forced hand - Working
Quest: The Mist Isn't Listening - Working

Let me know if you want me to test any other quest with the same problem.

These quests always worked if you did whole chain at once the problems arose if you left zone or relogged which would make the mobs unattackable and needed rep change to make attackable again

@Aokromes ̶T̶h̶i̶s̶ ̶o̶f̶ ̶c̶o̶u̶r̶s̶e̶ ̶w̶o̶r̶k̶s̶,̶ ̶b̶u̶t̶ ̶i̶n̶ ̶t̶h̶e̶ ̶r̶e̶p̶u̶t̶a̶t̶i̶o̶n̶ ̶t̶a̶b̶,̶ ̶y̶o̶u̶ ̶s̶t̶i̶l̶l̶ ̶c̶a̶n̶ ̶n̶o̶t̶ ̶p̶u̶t̶ ̶a̶n̶ ̶e̶n̶e̶m̶y̶ ̶t̶a̶g̶.̶
I was wrong, this should not be.

The gorlocs should be hostile and attack-able based on the rep you've chosen, but only appear hostile and you cant attack them. Even as a neutral mob they cannot be attacked or affected by any damage AOE or otherwise. 6ebe1afeeccb

😃 😄 🚀 👍 👏 🎉 👀 😍

This is still not fixed.

😞 😢

Well I wonder if this is meant to be tracked and set differently who knows we have 2 spells which set hidden quests: -

ID - 52511 Oracle Faction Tracking Quest
Effect 0: Id 16 (SPELL_EFFECT_QUEST_COMPLETE)
BasePoints = 0
Targets (25, 0) (TARGET_UNIT_TARGET_ANY, NO_TARGET)
EffectMiscValueA = 12694

ID 52515 Wolvar Faction Tracking Quest
Effect 0: Id 16 (SPELL_EFFECT_QUEST_COMPLETE)
BasePoints = 0
Targets (25, 0) (TARGET_UNIT_TARGET_ANY, NO_TARGET)
EffectMiscValueA = 12693

In sniff we can see the wolvar spell to set wolvar faction tracker immieditly after the spell to force reputation to honoured when quest to change faction is turned in

ServerToClient: SMSG_QUEST_GIVER_QUEST_COMPLETE (0x050E) Length: 25 ConnIdx: 0 Time: 03/09/2011 09:33:49.000 Number: 58656
Unk: True
Reward Skill Id: 0
Quest ID: 12582 (12582)
Money: 33000
Talent Points: 0
Reward Skill Points: 0
Reward XP: 0

ClientToServer: CMSG_QUERY_QUEST_INFO (0xEFE8) Length: 4 ConnIdx: 0 Time: 03/09/2011 09:33:49.000 Number: 58657
Entry: 12582

ServerToClient: SMSG_SPELL_START (0x6BA8) Length: 37 ConnIdx: 0 Time: 03/09/2011 09:33:49.000 Number: 58658
Caster GUID: Full: 0xF1306FFC0000129B Type: Creature Entry: 28668 Low: 4763
Caster Unit GUID: Full: 0xF1306FFC0000129B Type: Creature Entry: 28668 Low: 4763
Cast Count: 0
Spell ID: 53492 (53492)
Cast Flags: 8 (Unknown3)
Time: 0
Target Flags: 2 (Unit)
Target GUID: Full: 0xFFFFFFFFFFFFFFF Type: Player Low: 99999999 Name: Aplayer

ServerToClient: SMSG_SPELL_GO (0x30C0) Length: 47 ConnIdx: 0 Time: 03/09/2011 09:33:49.000 Number: 58659
Caster GUID: Full: 0xF1306FFC0000129B Type: Creature Entry: 28668 Low: 4763
Caster Unit GUID: Full: 0xF1306FFC0000129B Type: Creature Entry: 28668 Low: 4763
Cast Count: 0
Spell ID: 53492 (53492)
Cast Flags: 264 (Unknown3, Unknown7)
Time: 2579502033
Hit Count: 1
[0] Hit GUID: Full: 0xFFFFFFFFFFFFFFF Type: Player Low: 99999999 Name: Aplayer
Miss Count: 0
Target Flags: 2 (Unit)
Target GUID: Full: 0xFFFFFFFFFFFFFFF Type: Player Low: 99999999 Name: Aplayer

ServerToClient: SMSG_SPELL_START (0x6BA8) Length: 37 ConnIdx: 0 Time: 03/09/2011 09:33:49.000 Number: 58660
Caster GUID: Full: 0xF1306FFC0000129B Type: Creature Entry: 28668 Low: 4763
Caster Unit GUID: Full: 0xF1306FFC0000129B Type: Creature Entry: 28668 Low: 4763
Cast Count: 0
Spell ID: 52515 (52515)
Cast Flags: 10 (HasTrajectory, Unknown3)
Time: 0
Target Flags: 2 (Unit)
Target GUID: Full: 0xFFFFFFFFFFFFFFF Type: Player Low: 99999999 Name: Aplayer

ServerToClient: SMSG_SPELL_GO (0x30C0) Length: 47 ConnIdx: 0 Time: 03/09/2011 09:33:49.000 Number: 58661
Caster GUID: Full: 0xF1306FFC0000129B Type: Creature Entry: 28668 Low: 4763
Caster Unit GUID: Full: 0xF1306FFC0000129B Type: Creature Entry: 28668 Low: 4763
Cast Count: 0
Spell ID: 52515 (52515)
Cast Flags: 264 (Unknown3, Unknown7)
Time: 2579502033
Hit Count: 1
[0] Hit GUID: Full: 0xFFFFFFFFFFFFFFF Type: Player Low: 99999999 Name: Aplayer
Miss Count: 0
Target Flags: 2 (Unit)
Target GUID: Full: 0xFFFFFFFFFFFFFFF Type: Player Low: 99999999 Name: Aplayer

I did actually find these spells/quests quiet a while ago but never found in sniff until now and the probem with these is if i remember i tried using them before once set they stay set as completed even once you change to the other faction

and this is only sniff with this spell and unparsed packets by here and the actual change in standing too

ServerToClient: 47588 (0xB9E4) Length: 12 ConnIdx: 0 Time: 03/09/2011 09:33:49.000 Number: 58662
|-------------------------------------------------|---------------------------------|
| 00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F | 0 1 2 3 4 5 6 7 8 9 A B C D E F |
|-------------------------------------------------|---------------------------------|
| 9B 12 00 00 FC 6F 30 F1 F4 D0 00 00 | . . . . . o 0 . . . . . |
|-------------------------------------------------|---------------------------------|

ServerToClient: SMSG_BUY_BANK_SLOT_RESULT (0xF5C0) Length: 28 ConnIdx: 0 Time: 03/09/2011 09:33:49.000 Number: 58663
Result: 2 (NotBanker)
Packet not fully read! Current position: 4 Length: 28 Bytes remaining: 24.
|-------------------------------------------------|---------------------------------|
| 00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F | 0 1 2 3 4 5 6 7 8 9 A B C D E F |
|-------------------------------------------------|---------------------------------|
| 02 00 00 00 9B 12 00 00 FC 6F 30 F1 00 00 00 00 | . . . . . . . . . o 0 . . . . . |
| 17 E8 01 00 39 E9 12 F1 00 00 00 00 | . . . . 9 . . . . . . . |
|-------------------------------------------------|---------------------------------|

ServerToClient: SMSG_SET_FACTION_STANDING (0x718C) Length: 17 ConnIdx: 0 Time: 03/09/2011 09:33:49.000 Number: 58664
Reputation loss: 0
Play Visual: true
Count: 1
Faction List Id: 114
Standing: 9655

ServerToClient: 334 (0x014E) Length: 4 ConnIdx: 0 Time: 03/09/2011 09:33:49.000 Number: 58665
|-------------------------------------------------|---------------------------------|
| 00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F | 0 1 2 3 4 5 6 7 8 9 A B C D E F |
|-------------------------------------------------|---------------------------------|
| 31 0B 00 00 | 1 . . . |
|-------------------------------------------------|---------------------------------|

Also seems all of the spells to set reputation to friendly/honoured (honoured on swapping/friendly during rep swap in initial chain have 3 effects all of which are dummy effects one of these are to set reputation obviously as no specific effect for that but why these spells have 3 dummy effects

I found this line is not factoring baserep when using ReputationToRank(), would this matter?

https://github.com/TrinityCore/TrinityCore/blob/06c1f728baca8e584fee8a10cb9e793abc5475bf/src/server/game/Reputation/ReputationMgr.cpp#L481

I asked because I played around with rep's standing value in DB character_reputation, this line 481's "ReputationToRank(faction->Standing) > REP_HATED" didn't work correctly unless I added baserep, plus Jinnaix's fix, war status is correctly set in game and DB's character_reputation.flags

Other lines that factoring baserep when using ReputationToRank():

https://github.com/TrinityCore/TrinityCore/blob/06c1f728baca8e584fee8a10cb9e793abc5475bf/src/server/game/Reputation/ReputationMgr.cpp#L549
https://github.com/TrinityCore/TrinityCore/blob/06c1f728baca8e584fee8a10cb9e793abc5475bf/src/server/game/Reputation/ReputationMgr.cpp#L393

Was this page helpful?
0 / 5 - 0 ratings