stubbed some more functions

This commit is contained in:
Tahir Akhlaq
2017-07-11 20:49:38 +01:00
parent 84d5eee1fc
commit 7ab40a30f1
7 changed files with 108 additions and 9 deletions

View File

@@ -13,18 +13,41 @@ using FFXIVClassic_Map_Server.packets.send.actor;
namespace FFXIVClassic_Map_Server.Actors
{
[Flags]
enum AggroType
{
None,
Sight,
Scent,
LowHp,
IgnoreLevelDifference
}
class BattleNpc : Npc
{
public HateContainer hateContainer;
public AggroType aggroType;
public BattleNpc(int actorNumber, ActorClass actorClass, string uniqueId, Area spawnedArea, float posX, float posY, float posZ, float rot,
ushort actorState, uint animationId, string customDisplayName)
: base(actorNumber, actorClass, uniqueId, spawnedArea, posX, posY, posZ, rot, actorState, animationId, customDisplayName)
{
this.aiContainer = new AIContainer(this, new BattleNpcController(this), new PathFind(this), new TargetFind(this));
this.currentSubState = SetActorStatePacket.SUB_STATE_MONSTER;
//this.currentMainState = SetActorStatePacket.MAIN_STATE_ACTIVE;
//charaWork.property[2] = 1;
//npcWork.hateType = 1;
this.hateContainer = new HateContainer(this);
this.allegiance = CharacterTargetingAllegiance.BattleNpcs;
}
public override void Update(DateTime tick)
{
// todo:
this.statusEffects.Update(tick);
}
}
}

View File

@@ -125,6 +125,7 @@ namespace FFXIVClassic_Map_Server.Actors
this.instance = instance;
GenerateActorName((int)actorNumber);
this.aiContainer = new AIContainer(this, null, new PathFind(this), new TargetFind(null));
}
public SubPacket CreateAddActorPacket()
@@ -393,7 +394,7 @@ namespace FFXIVClassic_Map_Server.Actors
zone.DespawnActor(this);
}
public void Update(DateTime tick)
public override void Update(DateTime tick)
{
var deltaTime = (tick - aiContainer.GetLatestUpdate()).Milliseconds;
LuaEngine.GetInstance().CallLuaFunction(null, this, "onUpdate", true, deltaTime);