mirror of
https://bitbucket.org/Ioncannon/project-meteor-server.git
synced 2025-05-20 08:26:59 -04:00
added helpers for DoW/DoM/DoH/DoH
- fixed allies not being able to aggro on roam - fixed static characters aggroing
This commit is contained in:
@@ -45,6 +45,19 @@ namespace FFXIVClassic_Map_Server.Actors
|
||||
public const int CLASSID_THM = 22;
|
||||
public const int CLASSID_CNJ = 23;
|
||||
|
||||
public const int CLASSID_CRP = 29;
|
||||
public const int CLASSID_BSM = 30;
|
||||
public const int CLASSID_ARM = 31;
|
||||
public const int CLASSID_GSM = 32;
|
||||
public const int CLASSID_LTW = 33;
|
||||
public const int CLASSID_WVR = 34;
|
||||
public const int CLASSID_ALC = 35;
|
||||
public const int CLASSID_CUL = 36;
|
||||
|
||||
public const int CLASSID_MIN = 39;
|
||||
public const int CLASSID_BTN = 40;
|
||||
public const int CLASSID_FSH = 41;
|
||||
|
||||
public const int SIZE = 0;
|
||||
public const int COLORINFO = 1;
|
||||
public const int FACEINFO = 2;
|
||||
@@ -347,7 +360,7 @@ namespace FFXIVClassic_Map_Server.Actors
|
||||
|
||||
public virtual bool IsValidTarget(Character target, ValidTarget validTarget)
|
||||
{
|
||||
return true;
|
||||
return !target.isStatic;
|
||||
}
|
||||
|
||||
public virtual bool CanAttack()
|
||||
@@ -753,6 +766,26 @@ namespace FFXIVClassic_Map_Server.Actors
|
||||
{
|
||||
return this is Ally;
|
||||
}
|
||||
|
||||
public bool IsDiscipleOfWar()
|
||||
{
|
||||
return currentJob < CLASSID_THM;
|
||||
}
|
||||
|
||||
public bool IsDiscipleOfMagic()
|
||||
{
|
||||
return currentJob >= CLASSID_THM && currentJob < CLASSID_CRP;
|
||||
}
|
||||
|
||||
public bool IsDiscipleOfHand()
|
||||
{
|
||||
return currentJob >= CLASSID_CRP && currentJob < CLASSID_MIN;
|
||||
}
|
||||
|
||||
public bool IsDiscipleOfLand()
|
||||
{
|
||||
return currentJob >= CLASSID_MIN;
|
||||
}
|
||||
#endregion lua helpers
|
||||
#endregion ai stuff
|
||||
}
|
||||
|
@@ -34,5 +34,20 @@ namespace FFXIVClassic_Map_Server.actors.chara.ai.controllers
|
||||
}
|
||||
base.DoCombatTick(tick, contentGroupCharas);
|
||||
}
|
||||
protected override void DoRoamTick(DateTime tick, List<Character> contentGroupCharas = null)
|
||||
{
|
||||
if (owner.currentContentGroup != null)
|
||||
{
|
||||
contentGroupCharas = new List<Character>(owner.currentContentGroup.GetMemberCount());
|
||||
foreach (var charaId in owner.currentContentGroup.GetMembers())
|
||||
{
|
||||
var chara = owner.zone.FindActorInArea<Character>(charaId);
|
||||
|
||||
if (chara != null)
|
||||
contentGroupCharas.Add(chara);
|
||||
}
|
||||
}
|
||||
base.DoRoamTick(tick, contentGroupCharas);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -127,7 +127,7 @@ namespace FFXIVClassic_Map_Server.actors.chara.ai.controllers
|
||||
// todo:
|
||||
}
|
||||
|
||||
protected virtual void DoRoamTick(DateTime tick)
|
||||
protected virtual void DoRoamTick(DateTime tick, List<Character> contentGroupCharas = null)
|
||||
{
|
||||
if (owner.hateContainer.GetHateList().Count > 0)
|
||||
{
|
||||
@@ -159,6 +159,7 @@ namespace FFXIVClassic_Map_Server.actors.chara.ai.controllers
|
||||
owner.aiContainer.pathFind.SetPathFlags(PathFindFlags.None);
|
||||
owner.aiContainer.pathFind.PathInRange(owner.spawnX, owner.spawnY, owner.spawnZ, 1.5f, 50.0f);
|
||||
}
|
||||
lua.LuaEngine.CallLuaBattleFunction(owner, "onRoam", owner, contentGroupCharas);
|
||||
}
|
||||
|
||||
|
||||
|
@@ -18,6 +18,8 @@ namespace FFXIVClassic_Map_Server.actors.chara.npc
|
||||
{
|
||||
aiContainer = new AIContainer(this, new AllyController(this), new PathFind(this), new TargetFind(this));
|
||||
this.allegiance = CharacterTargetingAllegiance.Player;
|
||||
this.isAutoAttackEnabled = true;
|
||||
this.isMovingToSpawn = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -365,7 +365,6 @@ namespace FFXIVClassic_Map_Server.Actors
|
||||
{
|
||||
this.isMovingToSpawn = false;
|
||||
}
|
||||
lua.LuaEngine.CallLuaBattleFunction(this, "onRoam", this);
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -31,19 +31,6 @@ namespace FFXIVClassic_Map_Server.Actors
|
||||
{
|
||||
class Player : Character
|
||||
{
|
||||
public const int CLASSID_CRP = 29;
|
||||
public const int CLASSID_BSM = 30;
|
||||
public const int CLASSID_ARM = 31;
|
||||
public const int CLASSID_GSM = 32;
|
||||
public const int CLASSID_LTW = 33;
|
||||
public const int CLASSID_WVR = 34;
|
||||
public const int CLASSID_ALC = 35;
|
||||
public const int CLASSID_CUL = 36;
|
||||
|
||||
public const int CLASSID_MIN = 39;
|
||||
public const int CLASSID_BTN = 40;
|
||||
public const int CLASSID_FSH = 41;
|
||||
|
||||
public const int MAXSIZE_INVENTORY_NORMAL = 200;
|
||||
public const int MAXSIZE_INVENTORY_CURRANCY = 320;
|
||||
public const int MAXSIZE_INVENTORY_KEYITEMS = 500;
|
||||
|
Reference in New Issue
Block a user