azerothcore / azerothcore-wotlk

Complete Open Source and Modular solution for MMO
http://www.azerothcore.org
GNU Affero General Public License v3.0
6.62k stars 2.64k forks source link

[Mage] Issues with Ritual of Refreshment #16101

Open Annamaria-CC opened 1 year ago

Annamaria-CC commented 1 year ago

What client do you play on?

enUS

Faction

Both

Content Phase:

70

Current Behaviour

Ritual of Refreshment has a few issues. The portal created by the mage is on top of the mage. When players click the portal, there is no visual indication of such action. When the table is created, it is also on top of the mage. The orientation of the mage is taken for the table when the table is created.

Expected Blizzlike Behaviour

The portal should be a few yards away from the mage. The players that click the portal should play a small casting animation while doing so. The table should be at the same spot as the portal it was created with, a few yards away from the mage. The orientation of the mage for the table should be taken when the spell is initially cast.

Source

Wrath Classic

Steps to reproduce the problem

  1. .learn 43987
  2. Make a party with two others.
  3. Experiment.

Extra Notes

Very similar to https://github.com/chromiecraft/chromiecraft/issues/5346 original issue: https://github.com/chromiecraft/chromiecraft/issues/5511

AC rev. hash/commit

https://github.com/chromiecraft/azerothcore-wotlk/commit/ce6ca597b54e64f328cacddae5f003cdc41a343d

Operating system

Ubuntu 20.04

Modules

Customizations

None

Server

ChromieCraft

heyitsbench commented 1 year ago

Extra Notes

Very similar to 5346.

This is meant to be the CC issue 5346, not the AC PR.

Annamaria-CC commented 1 year ago

Woooops

heyitsbench commented 3 months ago

Another issue is that the refreshment table has charges consumed even if players using the table fail the refreshment conjure spell, e.g. too many of the item or not enough inventory space.

EDIT: Should be resolved by https://github.com/azerothcore/azerothcore-wotlk/commit/3b2b8406a8a5695e922653f85e07c312308c9a6b.

heyitsbench commented 3 months ago

Recap of this issue:

TheSCREWEDSoftware commented 1 week ago

It's this issue resolved after the merge?

heyitsbench commented 1 week ago

It's this issue resolved after the merge?

I believe the only issue remaining is the orientation of the table.

TheSCREWEDSoftware commented 1 week ago

I will take a look in AC.

for anyone wanting to test .learn 58661

TheSCREWEDSoftware commented 1 week ago

The portal and table are created at the same position (infront of the player's facing direction) like what 5 yards?

@heyitsbench it's this the intended behaviour? Same result from AC and CC PTR

heyitsbench commented 1 week ago

Reference image

Forgive the crude drawing. Let's say the mage (in this case Pameline) casts the Ritual spell, creating the portal. She is facing along the red line when it is cast, the portal is created on the red circle. If the two party members use the portal, the table will be created on the red circle as well. This is correct behavior.

But if Pameline turns to face along the blue line after the portal is created and the party members use the portal, the table will instead be created on the blue circle. This is not correct. The table should be created on the red circle again according to official servers, as that's the position it was deemed to go to with the initial cast.

TheSCREWEDSoftware commented 1 week ago

I understood your image and explanation (thanks) and i was able to replicate the issue also.

sogladev commented 1 week ago

Looking at the spell DBC data I found that:

The changes below fix spawn the table at the correct location, but it's not clickable. likely due to the portal object being the "owner".

--- a/src/server/game/Entities/GameObject/GameObject.cpp
+++ b/src/server/game/Entities/GameObject/GameObject.cpp
@@ -587,5 +587,5 @@ void GameObject::Update(uint32 diff)

                             ClearRitualList();
-                            spellCaster->CastSpell(spellCaster, spellId, true);
+                            this->CastSpell(spellCaster, spellId);
                             return;
                         }
--- a/src/server/game/Spells/SpellInfoCorrections.cpp
+++ b/src/server/game/Spells/SpellInfoCorrections.cpp
@@ -4800,9 +4800,4 @@ void SpellMgr::LoadSpellInfoCorrections()

     // Conjure Refreshment Table (Rank 1, Rank 2)
-    ApplySpellFix({ 43985, 58661 }, [](SpellInfo* spellInfo)
-    {
-        spellInfo->Effects[EFFECT_0].TargetA = SpellImplicitTargetInfo(TARGET_DEST_CASTER_FRONT);
-        spellInfo->Effects[EFFECT_0].RadiusEntry = sSpellRadiusStore.LookupEntry(EFFECT_RADIUS_5_YARDS);
-    });