mirror of
https://github.com/azerothcore/mod-ale
synced 2025-11-29 15:38:17 +08:00
Fix TC build after 6113b9dec2 and d507a7e338
This commit is contained in:
@@ -70,6 +70,15 @@ struct ElunaCreatureAI : ScriptedAI
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef TRINITY
|
||||||
|
// Called for reaction when initially engaged - this will always happen _after_ JustEnteredCombat
|
||||||
|
// Called at creature aggro either by MoveInLOS or Attack Start
|
||||||
|
void JustEngagedWith(Unit* target) override
|
||||||
|
{
|
||||||
|
if (!sEluna->EnterCombat(me, target))
|
||||||
|
ScriptedAI::JustEngagedWith(target);
|
||||||
|
}
|
||||||
|
#else
|
||||||
//Called for reaction at enter to combat if not in combat yet (enemy can be NULL)
|
//Called for reaction at enter to combat if not in combat yet (enemy can be NULL)
|
||||||
//Called at creature aggro either by MoveInLOS or Attack Start
|
//Called at creature aggro either by MoveInLOS or Attack Start
|
||||||
void EnterCombat(Unit* target) override
|
void EnterCombat(Unit* target) override
|
||||||
@@ -77,6 +86,7 @@ struct ElunaCreatureAI : ScriptedAI
|
|||||||
if (!sEluna->EnterCombat(me, target))
|
if (!sEluna->EnterCombat(me, target))
|
||||||
ScriptedAI::EnterCombat(target);
|
ScriptedAI::EnterCombat(target);
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
// Called at any Damage from any attacker (before damage apply)
|
// Called at any Damage from any attacker (before damage apply)
|
||||||
void DamageTaken(Unit* attacker, uint32& damage) override
|
void DamageTaken(Unit* attacker, uint32& damage) override
|
||||||
|
|||||||
@@ -2371,7 +2371,24 @@ namespace LuaUnit
|
|||||||
Item* castItem = Eluna::CHECKOBJ<Item>(L, 8, false);
|
Item* castItem = Eluna::CHECKOBJ<Item>(L, 8, false);
|
||||||
uint64 originalCaster = Eluna::CHECKVAL<uint64>(L, 9, 0);
|
uint64 originalCaster = Eluna::CHECKVAL<uint64>(L, 9, 0);
|
||||||
|
|
||||||
|
#ifdef TRINITY
|
||||||
|
CastSpellExtraArgs args;
|
||||||
|
if (has_bp0)
|
||||||
|
args.SpellValueOverrides.AddMod(SPELLVALUE_BASE_POINT0, bp0);
|
||||||
|
if (has_bp1)
|
||||||
|
args.SpellValueOverrides.AddMod(SPELLVALUE_BASE_POINT1, bp1);
|
||||||
|
if (has_bp2)
|
||||||
|
args.SpellValueOverrides.AddMod(SPELLVALUE_BASE_POINT2, bp2);
|
||||||
|
if (triggered)
|
||||||
|
args.TriggerFlags = TRIGGERED_FULL_MASK;
|
||||||
|
if (castItem)
|
||||||
|
args.SetCastItem(castItem);
|
||||||
|
if (originalCaster)
|
||||||
|
args.SetOriginalCaster(ObjectGuid(originalCaster));
|
||||||
|
unit->CastSpell(target, spell, args);
|
||||||
|
#else
|
||||||
unit->CastCustomSpell(target, spell, has_bp0 ? &bp0 : NULL, has_bp1 ? &bp1 : NULL, has_bp2 ? &bp2 : NULL, triggered, castItem, NULL, ObjectGuid(originalCaster));
|
unit->CastCustomSpell(target, spell, has_bp0 ? &bp0 : NULL, has_bp1 ? &bp1 : NULL, has_bp2 ? &bp2 : NULL, triggered, castItem, NULL, ObjectGuid(originalCaster));
|
||||||
|
#endif
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -2393,8 +2410,15 @@ namespace LuaUnit
|
|||||||
bool triggered = Eluna::CHECKVAL<bool>(L, 6, true);
|
bool triggered = Eluna::CHECKVAL<bool>(L, 6, true);
|
||||||
#ifdef CMANGOS
|
#ifdef CMANGOS
|
||||||
unit->CastSpell(_x, _y, _z, spell, TRIGGERED_OLD_TRIGGERED);
|
unit->CastSpell(_x, _y, _z, spell, TRIGGERED_OLD_TRIGGERED);
|
||||||
#else
|
#endif
|
||||||
|
#ifdef MANGOS
|
||||||
unit->CastSpell(_x, _y, _z, spell, triggered);
|
unit->CastSpell(_x, _y, _z, spell, triggered);
|
||||||
|
#endif
|
||||||
|
#ifdef TRINITY
|
||||||
|
CastSpellExtraArgs args;
|
||||||
|
if (triggered)
|
||||||
|
args.TriggerFlags = TRIGGERED_FULL_MASK;
|
||||||
|
unit->CastSpell(Position(_x, _y, _z), spell, args);
|
||||||
#endif
|
#endif
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user