Small fixes

Fixed final message for multi-hit attacks.
Fixed self targeting for commands
Made it so player.lua doesn't skip over home points setting, just the quest setitng.
Began adding knockback effect handling
This commit is contained in:
yogurt committed 2018-06-25 18:20:20 -05:00
1 parent 79f2edf406
commit ace4dfe58f
8 files changed
+59 -42

No files matched your search

@@ -23,7 +23,7 @@ namespace FFXIVClassic_Map_Server.actors.chara.ai.state
this.skill = Server.GetWorldManager().GetBattleCommand(skillId);
var returnCode = lua.LuaEngine.CallLuaBattleCommandFunction(owner, skill, "ability", "onAbilityPrepare", owner, target, skill);
this.target = skill.GetMainTarget(owner, target);
this.target = target != null ? target : owner;
if (returnCode == 0)
{
@@ -26,7 +26,15 @@ namespace FFXIVClassic_Map_Server.actors.chara.ai.state
this.spell = Server.GetWorldManager().GetBattleCommand(spellId);
var returnCode = lua.LuaEngine.CallLuaBattleCommandFunction(owner, spell, "magic", "onMagicPrepare", owner, target, spell);
this.target = spell.GetMainTarget(owner, target);
//Modify spell based on status effects. Need to do it here because they can modify cast times
List<StatusEffect> effects = owner.statusEffects.GetStatusEffectsByFlag((uint)(StatusEffectFlags.ActivateOnCastStart));
//modify skill based on status effects
//Do this here to allow buffs like Resonance to increase range before checking CanCast()
foreach (var effect in effects)
lua.LuaEngine.CallLuaStatusEffectFunction(owner, effect, "onMagicCast", owner, effect, spell);
this.target = target != null ? target : owner;
if (returnCode == 0 && owner.CanCast(this.target, spell))
{
@@ -65,13 +73,6 @@ namespace FFXIVClassic_Map_Server.actors.chara.ai.state
spell.isCombo = true;
}
//Modify spell based on status effects. Need to do it here because they can modify cast times
List<StatusEffect> effects = owner.statusEffects.GetStatusEffectsByFlag((uint) (StatusEffectFlags.ActivateOnCastStart));
//modify skill based on status effects
foreach (var effect in effects)
lua.LuaEngine.CallLuaStatusEffectFunction(owner, effect, "onMagicCast", owner, effect, spell);
if (!spell.IsInstantCast())
{
// command casting duration