azerothcore-wotlk
azerothcore-wotlk copied to clipboard
Goblins do not attack the player when pvp inside Area 52
Original issue: https://github.com/chromiecraft/chromiecraft/issues/5120
What client do you play on?
enUS
Faction
Alliance
Content Phase:
70
Current Behaviour
When you fight inside Area 52 goblin guards turns red but they don't attack you and and you can't attack them
Expected Blizzlike Behaviour
As a neutral city the guards should stop any pvp action near
Source
https://www.youtube.com/watch?v=UvqAYdOSMbs&ab_channel=TheSurprisingGirl https://www.wowhead.com/wotlk/npc=19541/netherstorm-agent https://www.wowhead.com/wotlk/npc=22494/cosmowrench-bruiser
Steps to reproduce the problem
-
.tele area52
with 2 opposite faction player - Fight inside Area 52
- Goblins stay quiet
Extra Notes
No response
AC rev. hash/commit
6cd3b2a32cd9
Operating system
Ubuntu 20.04
Modules
- mod-ah-bot
- mod-bg-item-reward
- mod-cfbg
- mod-chat-transmitter
- mod-chromie-xp
- mod-cta-switch
- mod-desertion-warnings
- mod-duel-reset
- mod-eluna
- mod-ip-tracker
- mod-low-level-arena
- mod-low-level-rbg
- mod-multi-client-check
- mod-progression-system
- mod-pvp-titles
- mod-pvpstats-announcer
- mod-queue-list-cache
- mod-rdf-expansion
- mod-transmog
- mod-weekend-xp
- mod-instanced-worldbosses
- mod-zone-difficulty
- mod-BreakingNewsOverride
- lua-carbon-copy
- lua-exchange-npc
- lua-event-scripts
- lua-level-up-reward
- lua-recruit-a-friend
- lua-send-and-bind
- lua-temp-announcements
- lua-zonecheck
Customizations
None
Server
ChromieCraft
@azerothcore/developers Does anyone have any ideas on how to solve this? The truth is that I'm investigating, and I can't find a way. If I change the faction to the npc, it automatically starts attacking the player (I'm not saying we should do that, but I'm giving it as an example). Obviously, there is some kind of problem regarding the faction, or perhaps, adding some extra line to the smart_script
. If anyone knows of a similar case, or can give me an idea on how to solve it, great. That's how I start doing it.
https://github.com/azerothcore/azerothcore-wotlk/assets/2810187/09e82eaa-17a6-4353-8ee6-54cdf4397dab
I asked within the sniff group, and they told me the features were fine. So that theme is downloaded, so I don't know if it's something in the emulator, or I really don't know what it could be. To obtain the result seen in the video, I assigned faction 121, which is the faction that other goblins have, in another city, where you cannot fight between the factions either. I really don't know what else to try to try to solve this.
I believe these guards attack players without players being able to fight back
I compared FactionTemplate.dbc
with Everlook guards (854). Their friendlymask is set to 0; Area52 is set to 1.
I think Blizzard put the friendlymask to 1 so players can't fight back. However, this needs to disabled on server, so guards can attack players
SpellInfoCorrections.cpp
// Remove 1 from Area 52 guards friendly mask, making guards able to attack players
factionTemplateEntry = const_cast<FactionTemplateEntry*>(sFactionTemplateStore.LookupEntry(1857)); // Area 52 Bruiser
factionTemplateEntry->friendlyMask &= ~1;
factionTemplateEntry = const_cast<FactionTemplateEntry*>(sFactionTemplateStore.LookupEntry(1806)); // Netherstorm Agent
factionTemplateEntry->friendlyMask &= ~1;
I believe these guards attack players without players being able to fight back
I compared
FactionTemplate.dbc
with Everlook guards (854). Their friendlymask is set to 0; Area52 is set to 1.I think Blizzard put the friendlymask to 1 so players can't fight back. However, this needs to disabled on server, so guards can attack players
SpellInfoCorrections.cpp
// Remove 1 from Area 52 guards friendly mask, making guards able to attack players factionTemplateEntry = const_cast<FactionTemplateEntry*>(sFactionTemplateStore.LookupEntry(1857)); // Area 52 Bruiser factionTemplateEntry->friendlyMask &= ~1; factionTemplateEntry = const_cast<FactionTemplateEntry*>(sFactionTemplateStore.LookupEntry(1806)); // Netherstorm Agent factionTemplateEntry->friendlyMask &= ~1;
I'm going to investigate it. Thank you.
https://github.com/azerothcore/azerothcore-wotlk/assets/2810187/a4dc66b1-1cb1-43fa-aee5-72826aaf500a
We have had a significant improvement, however, when making that change, the npc's watch me and hit me all the time, even if I don't start a fight. I really don't know if it's the expected behavior, because that means, I could never be in the area and interact with them. Perhaps, it is necessary to carry out some kind of check, to see if they are hostile or something like that, and in that case, modify what you mentioned. But the truth is that it worked quite well, some details need to be polished.
https://github.com/azerothcore/azerothcore-wotlk/assets/2810187/a42e2b97-c1cb-4d1b-8f32-a198f14eebdd
The fix is correct, because inside the house, the NPCs do not attack the player until the player attacks another player. So this change is correct, however, for the mechanics to work well, it requires another change, related to the debuff that is applied to the player. Which should be activated, only, in case the player starts a fight.
https://github.com/azerothcore/azerothcore-wotlk/assets/2810187/27d07feb-24ae-4f48-b7b1-c0479eed19ac
I think I got the result I was expecting, thanks for the contribution. Without a doubt, it was very useful to achieve the final result.
https://github.com/azerothcore/azerothcore-wotlk/assets/2810187/a2cd237f-083a-4a39-a2d9-c90cab5f7878