mirror of
https://bitbucket.org/Ioncannon/project-meteor-server.git
synced 2025-05-20 08:26:59 -04:00
More targeting changes
Added CanUse instead of CanAttack/CanWeaponSkill/CanCast since they all check the same things anyway. Fixed some bugs like mp checking against hp in AddMP.
This commit is contained in:
@@ -24,7 +24,7 @@ namespace FFXIVClassic_Map_Server.actors.chara.ai.state
|
||||
this.skill = Server.GetWorldManager().GetBattleCommand(skillId);
|
||||
var returnCode = lua.LuaEngine.CallLuaBattleCommandFunction(owner, skill, "weaponskill", "onSkillPrepare", owner, target, skill);
|
||||
|
||||
if (returnCode == 0 && owner.CanWeaponSkill(target, skill))
|
||||
if (returnCode == 0 && owner.CanUse(this.target, skill, errorResult))
|
||||
{
|
||||
OnStart();
|
||||
}
|
||||
@@ -167,7 +167,7 @@ namespace FFXIVClassic_Map_Server.actors.chara.ai.state
|
||||
|
||||
private bool CanUse()
|
||||
{
|
||||
return owner.CanWeaponSkill(target, skill) && skill.IsValidMainTarget(owner, target);
|
||||
return owner.CanUse(target, skill);
|
||||
}
|
||||
|
||||
public BattleCommand GetWeaponSkill()
|
||||
|
||||
Reference in New Issue
Block a user