mirror of
https://bitbucket.org/Ioncannon/project-meteor-server.git
synced 2025-04-02 19:42:05 -04:00
Added the combo and proc systems Added scripts for most weaponskill and spells as well as some abilities and status effects Added support for multihit attacks Added AbilityState for abilities Added hiteffects that change based on an attack's parameters Added positionals Changed how targeting works for battlecommands Fixed bug that occurred when moving or swapping hotbar commands Fixed bug that occurred when losing status effects
43 lines
1.1 KiB
C#
43 lines
1.1 KiB
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
using FFXIVClassic_Map_Server.Actors;
|
|
|
|
namespace FFXIVClassic_Map_Server.actors.chara.ai.state
|
|
{
|
|
class InactiveState : State
|
|
{
|
|
private DateTime endTime;
|
|
private uint durationMs;
|
|
public InactiveState(Character owner, uint durationMs, bool canChangeState) :
|
|
base(owner, null)
|
|
{
|
|
if (!canChangeState)
|
|
owner.aiContainer.InterruptStates();
|
|
this.durationMs = durationMs;
|
|
endTime = DateTime.Now.AddMilliseconds(durationMs);
|
|
}
|
|
|
|
public override bool Update(DateTime tick)
|
|
{
|
|
if (durationMs == 0)
|
|
{
|
|
if (owner.IsDead())
|
|
return true;
|
|
|
|
if (!owner.statusEffects.HasStatusEffectsByFlag(StatusEffectFlags.PreventMovement))
|
|
return true;
|
|
}
|
|
|
|
if (durationMs != 0 && tick > endTime)
|
|
{
|
|
return true;
|
|
}
|
|
|
|
return false;
|
|
}
|
|
}
|
|
}
|