Core/Spells: rework part 5: GameObject casting

Port From (https://github.com/TrinityCore/TrinityCore/commit/962f6d7988b9003e550f6745be7cff812e9d8efa)
This commit is contained in:
hondacrx
2021-08-29 18:27:08 -04:00
parent e97ffa304d
commit 949d4806c5
39 changed files with 5236 additions and 4781 deletions
+1 -1
View File
@@ -906,7 +906,7 @@ namespace Scripts.Spells.Druid
if (caster != null)
{
// 0.01 * $AP * cp
byte cp = caster.ToPlayer().GetComboPoints();
byte cp = (byte)caster.ToPlayer().GetComboPoints();
// Idol of Feral Shadows. Can't be handled as SpellMod due its dependency from CPs
AuraEffect idol = caster.GetAuraEffect(SpellIds.IdolOfFeralShadows, 0);
+1 -1
View File
@@ -1380,7 +1380,7 @@ namespace Scripts.Spells.Items
void HandleProc(AuraEffect aurEff, ProcEventInfo eventInfo)
{
if (eventInfo.GetTypeMask().HasFlag(ProcFlags.DoneRangedAutoAttack | ProcFlags.DoneSpellRangedDmgClass))
if (eventInfo.GetTypeMask().HasAnyFlag(ProcFlags.DoneRangedAutoAttack | ProcFlags.DoneSpellRangedDmgClass))
{
// in that case, do not cast heal spell
PreventDefaultAction();
+1 -1
View File
@@ -1463,7 +1463,7 @@ namespace Scripts.World.NpcSpecial
public override void Reset() { }
public override void JustEngagedWith(Unit who) { }
public override void OnPossess(bool apply)
public void OnPossess(bool apply)
{
if (apply)
{