mirror of
https://bitbucket.org/Ioncannon/project-meteor-server.git
synced 2025-04-02 19:42:05 -04:00
- stubbed some ability stuff - moved packet things to loop instead of session only - added mob roaming and aggro - todo: fix target find/detection/pathfinding speed/line of sight/line aoe length etc - todo: see "// todo:" in code
27 lines
758 B
C#
27 lines
758 B
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.utils
|
|
{
|
|
static class BattleUtils
|
|
{
|
|
public static void DamageTarget(Character attacker, Character defender, int damage)
|
|
{
|
|
// todo: other stuff too
|
|
if (defender is BattleNpc)
|
|
{
|
|
if (!((BattleNpc)defender).hateContainer.HasHateForTarget(attacker))
|
|
{
|
|
((BattleNpc)defender).hateContainer.AddBaseHate(attacker);
|
|
}
|
|
((BattleNpc)defender).hateContainer.UpdateHate(attacker, damage);
|
|
}
|
|
}
|
|
}
|
|
}
|