cleaned up magicstate and weaponskillstate

- todo: fix IsFacing
- added thunder spell (todo: figure out why battleactionx10 crashes client on sending shit)
This commit is contained in:
Tahir Akhlaq
2017-08-26 04:08:26 +01:00
parent 452f1cc8c0
commit 9024f3fad6
20 changed files with 415 additions and 195 deletions

View File

@@ -168,6 +168,9 @@ namespace FFXIVClassic_Map_Server.actors.chara.ai
// todo: this is stupid
bool withPet = (flags & ValidTarget.Ally) != 0 || masterTarget.allegiance != owner.allegiance;
if (masterTarget != null)
targets.Add(masterTarget);
if (IsPlayer(owner))
{
if (masterTarget is Player)
@@ -284,8 +287,7 @@ namespace FFXIVClassic_Map_Server.actors.chara.ai
private void AddAllBattleNpcs(Character target, bool withPet)
{
// 70 is client render distance so we'll go with that
var actors = owner.zone.GetActorsAroundActor<BattleNpc>(owner, (int)extents);
var actors = owner.zone.GetActorsAroundActor<BattleNpc>(owner, 50);
// todo: should we look for Characters instead in case player is charmed by BattleNpc
foreach (BattleNpc actor in actors)
@@ -361,6 +363,9 @@ namespace FFXIVClassic_Map_Server.actors.chara.ai
if (aoeType == TargetFindAOEType.Box && IsWithinBox(target, withPet))
return true;
if (aoeType == TargetFindAOEType.None && targets.Count != 0)
return false;
return true;
}