azerothcore-wotlk
azerothcore-wotlk copied to clipboard
[Quest]Scouring the Desert- Can't get the silithid aura from silithid mounds
Current Behaviour
Originally reported https://github.com/chromiecraft/chromiecraft/issues/6457. Trying to get the silithid from a mound does not give the aura/buff. So quest can't be turned in. https://wowgaming.altervista.org/aowow/?quest=9419
Expected Blizzlike Behaviour
Clicking on a silithyst geyser should give an aura to the character.
Source
https://wowgaming.altervista.org/aowow/?quest=9419 https://www.youtube.com/watch?v=i30NuEzK2xk
Steps to reproduce the problem
- Enable PVP (/pvp)
- Go to Silithus/General Kirika (.go c 43204)
- Accept quest Scouring the Desert (.quest add 9422)
- Find a Silithyst Geyser (.gobject target 181598)
- Right-click it - no aura is applied. Manually apply correct aura: .aura 29519.
- Turn Silithyst by going to X:-7589, Y:757, Z:-15 - this completes the quest which can be turned in
Extra Notes
No response
AC rev. hash/commit
https://github.com/chromiecraft/azerothcore-wotlk/commit/123bf37ee7e6763d9d7f4b778cfe8453577bce6c
Operating system
Ubuntu 20.04
Custom changes or Modules
No response
I have issues reproducing this on c47c945aa
I've actually gotten the aura 29519 and was able to turn in the quest on 2 of 4 tries, sometimes I didn't get the aura.
The gameobject 181598 Silithyst Geyser
triggers spell 29518 Sillithus Flag Click (DND)
which is serverside spell implemented via spell_dbc
.
spell handling is beeing done in
https://github.com/azerothcore/azerothcore-wotlk/blob/c47c945aa4200829fbe1c6b11a2cc028d3420b9b/src/server/scripts/OutdoorPvP/OutdoorPvPSI.cpp#L235-L247
and correctly applies aura 29519 onto the player.
So it seems there exists some situations where this is not beeing triggered correctly (?)
It seems to work once after a server restart and then the "HandleCustomSpell" function is not getting called anymore 👀
Alright so the issue seems to originate in
https://github.com/azerothcore/azerothcore-wotlk/blob/c47c945aa4200829fbe1c6b11a2cc028d3420b9b/src/server/game/OutdoorPvP/OutdoorPvPMgr.cpp#L173
This handles a spell from spell_dbc when it's e.g. beeing triggered by a gameobject.
It loops over all known PVP areas and each tries to handle the spell with its HandleCustomSpell implementation and returns true if handled, which ends the loop. On the first run this works as expected.
On the next runs, somehow the spell gets handled by a PVP area of map 530 instead (which is located earlier in the pvp-area-list that is beeing looped through), so it will never reach the map 1 pvp handler for silithus.
Maybe there should be a check so that it only tries pvp areas of the map that the the gameobject / player are currently actually in. I don't see any reason to handle a spell in a distant pvp area of another map(?) but maybe I'm missing something.
Alright so this issue is caused by the function OPvPCapturePoint::HandleCustomSpell()
in OutdoorPvP.cpp:
https://github.com/azerothcore/azerothcore-wotlk/blob/c47c945aa4200829fbe1c6b11a2cc028d3420b9b/src/server/game/OutdoorPvP/OutdoorPvP.cpp#L556-L559
so in the moment the player has PVP active, this returns true which means it "handled the spell" and the GO's spell is not handled correctly in the SI file anymore.
The function above was updated in #17778 by @Winfidonarleyan, before the update it always returned false:
https://github.com/azerothcore/azerothcore-wotlk/blob/5d01b700fd010105ce5d6963408d9318961dedd7/src/server/game/OutdoorPvP/OutdoorPvP.cpp#L508-L513
So right now this functions acts as a catch-all for any customSpell as it seems.
After applying the following changes, the underliying issue seems to be fixed:
diff --git a/src/server/game/OutdoorPvP/OutdoorPvP.cpp b/src/server/game/OutdoorPvP/OutdoorPvP.cpp
index 89a3e9f26..62f6140bc 100644
--- a/src/server/game/OutdoorPvP/OutdoorPvP.cpp
+++ b/src/server/game/OutdoorPvP/OutdoorPvP.cpp
@@ -555,7 +555,7 @@ bool OutdoorPvP::HandleCustomSpell(Player* player, uint32 spellId, GameObject* g
bool OPvPCapturePoint::HandleCustomSpell(Player* player, uint32 /*spellId*/, GameObject* /*go*/)
{
- return player->IsOutdoorPvPActive();
+ return false;
}
bool OutdoorPvP::HandleOpenGo(Player* player, GameObject* go)
Should we not try to fix that boolean function instead? Wonder why it is going wrong. IsOutdoorPvPActive I mean
Should we not try to fix that boolean function instead? Wonder why it is going wrong. IsOutdoorPvPActive I mean
This function is working just fine, it returns if the player is outdoor and has PVP active.
I think the HandleCustomSpell(...) was just still missing a functional body, so it was like:
if (no pvp active) return false
(... missing body that might return true in some cases)
return false
So it always returned false which was ok as it didn't actually handle any spells.
The handlecustomspell functions are designed to "pick" specific spellIds and return true if they handled them.
So as this function does not handle any spell it should always return false as suggested and as it was before.
Okay that makes sense. Didn't know what that function did. Go ahead and make a PR for this if you'd like and we can go ahead and get that merged
Maybe @disgrace2013 wants to provide the PR as he was originally working on this issue 🙂
Sure