Description:
The buff applies from the gameobject, to the player, but the buff itself does nothing, no heal, no anything. You can see in combat log nothing is displayed at all.
Image: http://prntscr.com/iqqg6t
I get the buff, animation, but buff does nothing.
Expected behaviour:
should restore some health and mana
Steps to reproduce the problem:
Branch(es): 3.3.5
TC rev. hash/commit: https://github.com/TrinityCore/TrinityCore/commit/28288698441524081d583af95f19cb1c9fb90387
TDB version: 335.64
Operating system: ubuntu
@ariel- Is this related to gameobject casting?
@ariel- Yep, if i do .aura 23493 then it heals me 10% per tick, it is when it gets cast from the object, it does nothing.
EDIT:
The script itself in spell_generic uses Unit* caster = GetCaster();
but the caster is an object
EDIT 2: Found a fix:
Changed GetCaster()
to GetOwner()->ToUnit();
and now it works!
in spell_generic
// 23493 - Restoration
// 24379 - Restoration
class spell_gen_restoration : public AuraScript
{
PrepareAuraScript(spell_gen_restoration);
void PeriodicTick(AuraEffect const* /*aurEff*/)
{
PreventDefaultAction();
Unit* caster = GetOwner()->ToUnit();
if (!caster)
return;
int32 heal = caster->CountPctFromMaxHealth(10);
HealInfo healInfo(caster, caster, heal, GetSpellInfo(), GetSpellInfo()->GetSchoolMask());
caster->HealBySpell(healInfo);
/// @todo: should proc other auras?
if (int32 mana = caster->GetMaxPower(POWER_MANA))
{
mana /= 10;
caster->EnergizeBySpell(caster, GetId(), mana, POWER_MANA);
}
}
void Register() override
{
OnEffectPeriodic += AuraEffectPeriodicFn(spell_gen_restoration::PeriodicTick, EFFECT_0, SPELL_AURA_PERIODIC_TRIGGER_SPELL);
}
};
it doesnt show anything in combat log tho but it heals xd
It could be related to the faction not set correctly to gobs that are not spawned (summoned, or temp spawn like BG spawns)
If you .gob add 180147 the gob will cast the spell on you char
If you .gob add temp 180147 the gob will not cast the spell
Chickens https://woehead.way-of-elendil.fr/?npc=620 can get the auras from this gobs.
Chickens with Faction= 31 get the aura
Chickens with Faction= 35 doesn't get the aura
@confirm
please if can fixed!
old time is buged this issue
@Shauren
@Treeston
So, when will @ariel- appear? 馃槩
It's a good question xD
guys
can give me patch for fix !
:disappointed:
@Hir0shi : This is not a forum.
Please post only useful comments.
okay but , this bug is old and never to fixed :disappointed:
This issue is not caused by new commit as it's possible to reproduce it in 2 years old core.
The issue with the spell 23493 https://github.com/TrinityCore/TrinityCore/blob/3.3.5/src/server/scripts/Spells/spell_generic.cpp#L2844 is not related this traps not being triggered, if you cast the spell on you char it will regen your health but not if casted by a gob as it use caster characteristics to calculate the amount of health.
In 3.3.5, trap LOS is checked, because there is no flag indicating it should ignore LOS. As a result they can fail due to LOS issues.
The following can solve it but unsure it is the correct way.
bool IsIgnoringLOSChecks() const
{
switch (type)
{
case GAMEOBJECT_TYPE_BUTTON: return button.losOK == 0;
case GAMEOBJECT_TYPE_QUESTGIVER: return questgiver.losOK == 0;
case GAMEOBJECT_TYPE_CHEST: return chest.losOK == 0;
case GAMEOBJECT_TYPE_GOOBER: return goober.losOK == 0;
case GAMEOBJECT_TYPE_FLAGSTAND: return flagstand.losOK == 0;
case GAMEOBJECT_TYPE_TRAP: return true;
default: return false;
}
}
(just copy-pasting the code above, using MarkDown to indent and highlight the syntax)
bool IsIgnoringLOSChecks() const
{
switch (type)
{
case GAMEOBJECT_TYPE_BUTTON:
return button.losOK == 0;
case GAMEOBJECT_TYPE_QUESTGIVER:
return questgiver.losOK == 0;
case GAMEOBJECT_TYPE_CHEST:
return chest.losOK == 0;
case GAMEOBJECT_TYPE_GOOBER:
return goober.losOK == 0;
case GAMEOBJECT_TYPE_FLAGSTAND:
return flagstand.losOK == 0;
case GAMEOBJECT_TYPE_TRAP:
return true;
default:
return false;
}
}
Thank you sorry about the syntax. Tried the insert code button but it still looked like crap :D .
Notice that this issue happens in Naxxramas too, during the encounter with Heigan the Unclean and his Eruption spell, which does no damage at all.
@joshwhedon please check your change ingame and if it works, open a PR
It does work, tested locally, but sorry I don't really have the resources to prepare pull requests for it at the moment. Feel free to use the fix if you want it, or want to raise a pr for it.
Well. I am not too sure about that, although my testing is limited to 1 character/1 game instance (hence using a GM account). Using a gmlevel 3 character for testing, with GM off, seems to receive the buff as expected. Could be different for normal account characters, but I don't know. Heigan & Noth spell issues are confirmed, though.
Most helpful comment
https://github.com/TrinityCore/TrinityCore/pull/23936