cmangos / issues

This repository is used as a centralized point for all issues regarding CMaNGOS.
180 stars 47 forks source link

[TBC] Casting bar disappears when hit by the enemy #699

Closed staticless closed 6 years ago

staticless commented 9 years ago

This is pretty annoying bug. If you get hit while casting fireball with a mage your casting bar disappears, but it does not interrupt the spell itself. This bug only affects mage fireball it seems.

Revision number:2309

Ve1vet commented 9 years ago

No. There is same issue not fixed yet(you can search it in issue list). Castbar dissapears when triggered spell casts while you casting some spell. Server send to client triggered spell with casting time 0. So client override previous spell & put trigger spell with time 0, so casting bar dissapear.

ghost commented 7 years ago

This no longer seems to be the case for me.

Ve1vet commented 7 years ago

It still always happen. This will be fixed when void Spell::SendSpellStart() const and void Spell::SendSpellGo() stop sending to client casting time = 0 from triggered spells.

ghost commented 7 years ago

Is it only with a certain rank of spells, or at a certain level range? I tried with a human mage in the starting area and it behaved properly at the time of my post. I haven't tried it since.

Warlockbugs commented 7 years ago

Which game versions are affected?

Warlockbugs commented 7 years ago

Tested wotlk and classic, TBC is a special snowflake for some reason. The exact cause is unknown at this point, available solution is a version-specific hack.

ghost commented 7 years ago

Probably irrelevant, but there is a double ";" after "data << uint32(m_spellInfo->Id);;" in Spell::SendSpellStart() on TBC.

https://github.com/cmangos/mangos-tbc/blob/d8ebcfce73f1ab6d15b39f251006d14d5c75b53d/src/game/Spell.cpp#L3539

Trystanosaurus commented 6 years ago

This still seems to be happening in the TBC server (3c627a4). I tried deleting that second semicolon in Spell:SendSpellStart() just on the off chance but it made no difference.

It definitely seems to be happening because of effects triggering while you're casting though. You can test with a low level mage, with frost armour on the cast bar disappears when you're hit, with frost armour off it doesn't.

killerwife commented 6 years ago

Please try to add this: void Spell::SendSpellGo()

uint32 castFlags = CAST_FLAG_UNKNOWN9;

if ((m_IsTriggeredSpell && !IsAutoRepeatRangedSpell(m_spellInfo)) || m_triggeredByAuraSpell)
    castFlags |= CAST_FLAG_HIDDEN_COMBATLOG;

I am gonna assume you won't have issues finding this. Test it and report please.

Trystanosaurus commented 6 years ago

I tried that and it worked like a charm, I haven't spent ages testing that it doesn't affect anything else but my lowbie mage with frost armour on wasn't losing his cast bar any more when hit.

uint32 castFlags = CAST_FLAG_UNKNOWN9; was already in 3991 of spell.cpp, so I just added the other two lines directly after that.

killerwife commented 6 years ago

Its one of those 2016 changes from before I had push rights that got lost in translation. I will try to push this soon-ish.