Skip to content

Commit

Permalink
Add a new property : keep_lord_heal_itself
Browse files Browse the repository at this point in the history
Possibility to remove the Keep Lord to heal itself (0=no self heal,
1=self heal which is the default)
  • Loading branch information
DigitalBox98 committed May 26, 2022
1 parent ded98ab commit b862cbe
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 13 deletions.
30 changes: 17 additions & 13 deletions GameServer/ai/brain/Guards/Lord.cs
Original file line number Diff line number Diff line change
Expand Up @@ -15,22 +15,26 @@ public LordBrain() : base()

public override void Think()
{
if (Body != null && Body.Spells.Count == 0)
{
switch (Body.Realm)
if (GS.ServerProperties.Properties.KEEP_LORD_HEAL_ITSELF == true)
{
if (Body != null && Body.Spells.Count == 0)
{
case eRealm.None:
case eRealm.Albion:
Body.Spells.Add(GuardSpellDB.AlbLordHealSpell);
break;
case eRealm.Midgard:
Body.Spells.Add(GuardSpellDB.MidLordHealSpell);
break;
case eRealm.Hibernia:
Body.Spells.Add(GuardSpellDB.HibLordHealSpell);
break;
switch (Body.Realm)
{
case eRealm.None:
case eRealm.Albion:
Body.Spells.Add(GuardSpellDB.AlbLordHealSpell);
break;
case eRealm.Midgard:
Body.Spells.Add(GuardSpellDB.MidLordHealSpell);
break;
case eRealm.Hibernia:
Body.Spells.Add(GuardSpellDB.HibLordHealSpell);
break;
}
}
}

base.Think();
}

Expand Down
7 changes: 7 additions & 0 deletions GameServer/serverproperty/ServerProperties.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1479,6 +1479,13 @@ public static void InitProperties()
#endregion

#region KEEPS

/// <summary>
/// Possibility for the Keep Lord to heal itself
/// </summary>
[ServerProperty("keeps", "keep_lord_heal_itself", "Possibility for the Keep Lord to heal itself", true)]
public static bool KEEP_LORD_HEAL_ITSELF;

/// <summary>
/// Number of seconds between allowed LOS checks for keep guards
/// </summary>
Expand Down

0 comments on commit b862cbe

Please sign in to comment.