mirror of
https://bitbucket.org/Ioncannon/project-meteor-server.git
synced 2025-05-20 08:26:59 -04:00
moved battlenpc loading to db (still doesnt load for some reason)
This commit is contained in:
@@ -23,12 +23,11 @@ namespace FFXIVClassic_Map_Server.actors.chara.ai.state
|
||||
ChangeTarget(target);
|
||||
attackTime = startTime;
|
||||
owner.aiContainer.pathFind?.Clear();
|
||||
// todo: should handle everything here instead of on next tick..
|
||||
}
|
||||
|
||||
public override void OnStart()
|
||||
{
|
||||
// todo: check within attack range
|
||||
|
||||
}
|
||||
|
||||
public override bool Update(DateTime tick)
|
||||
@@ -150,6 +149,9 @@ namespace FFXIVClassic_Map_Server.actors.chara.ai.state
|
||||
// todo: shouldnt need to check if owner is dead since all states would be cleared
|
||||
if (owner.aiContainer.IsDead() || target.aiContainer.IsDead())
|
||||
{
|
||||
if (owner is BattleNpc)
|
||||
((BattleNpc)owner).hateContainer.ClearHate(target);
|
||||
|
||||
owner.aiContainer.ChangeTarget(null);
|
||||
return false;
|
||||
}
|
||||
|
@@ -23,14 +23,11 @@ namespace FFXIVClassic_Map_Server.actors.chara.ai.state
|
||||
{
|
||||
this.startPos = owner.GetPosAsVector3();
|
||||
this.startTime = DateTime.Now;
|
||||
// todo: lookup spell from global table
|
||||
this.spell = Server.GetWorldManager().GetBattleCommand(spellId);
|
||||
var returnCode = lua.LuaEngine.CallLuaBattleCommandFunction(owner, spell, "magic", "onMagicPrepare", owner, target, spell);
|
||||
|
||||
// todo: check recast
|
||||
if (returnCode == 0 && owner.CanCast(target, spell))
|
||||
{
|
||||
// todo: Azia can fix, check the recast time and send error
|
||||
OnStart();
|
||||
}
|
||||
else
|
||||
|
@@ -20,14 +20,11 @@ namespace FFXIVClassic_Map_Server.actors.chara.ai.state
|
||||
base(owner, target)
|
||||
{
|
||||
this.startTime = DateTime.Now;
|
||||
// todo: lookup skill from global table
|
||||
this.skill = Server.GetWorldManager().GetBattleCommand(skillId);
|
||||
var returnCode = lua.LuaEngine.CallLuaBattleCommandFunction(owner, skill, "weaponskill", "onSkillPrepare", owner, target, skill);
|
||||
|
||||
// todo: check recast
|
||||
if (returnCode == 0 && owner.CanWeaponSkill(target, skill))
|
||||
{
|
||||
// todo: Azia can fix, check the recast time and send error
|
||||
OnStart();
|
||||
}
|
||||
else
|
||||
|
Reference in New Issue
Block a user