Renamed containsTarget method to isInAggroList.

This commit is contained in:
MobiusDevelopment 2019-11-18 12:27:42 +00:00
parent 2d19e0b2a1
commit f5406e62dd
30 changed files with 75 additions and 60 deletions

View File

@ -1124,10 +1124,11 @@ public class Attackable extends Npc
}
/**
* @param creature The Creature searched in the _aggroList of the Attackable
* @return True if the _aggroList of this Attackable contains the Creature.
* Verifies if the creature is in the aggro list.
* @param creature the creature
* @return {@code true} if the creature is in the aggro list, {@code false} otherwise
*/
public boolean containsTarget(Creature creature)
public boolean isInAggroList(Creature creature)
{
return _aggroList.containsKey(creature);
}

View File

@ -174,7 +174,7 @@ public class GuardInstance extends Attackable
else if (interact)
{
// Check if the PlayerInstance is in the _aggroList of the GuardInstance
if (containsTarget(player))
if (isInAggroList(player))
{
// Set the PlayerInstance Intention to AI_INTENTION_ATTACK
player.getAI().setIntention(CtrlIntention.AI_INTENTION_ATTACK, this);

View File

@ -1120,10 +1120,11 @@ public class Attackable extends Npc
}
/**
* @param creature The Creature searched in the _aggroList of the Attackable
* @return True if the _aggroList of this Attackable contains the Creature.
* Verifies if the creature is in the aggro list.
* @param creature the creature
* @return {@code true} if the creature is in the aggro list, {@code false} otherwise
*/
public boolean containsTarget(Creature creature)
public boolean isInAggroList(Creature creature)
{
return _aggroList.containsKey(creature);
}

View File

@ -174,7 +174,7 @@ public class GuardInstance extends Attackable
else if (interact)
{
// Check if the PlayerInstance is in the _aggroList of the GuardInstance
if (containsTarget(player))
if (isInAggroList(player))
{
// Set the PlayerInstance Intention to AI_INTENTION_ATTACK
player.getAI().setIntention(CtrlIntention.AI_INTENTION_ATTACK, this);

View File

@ -1120,10 +1120,11 @@ public class Attackable extends Npc
}
/**
* @param creature The Creature searched in the _aggroList of the Attackable
* @return True if the _aggroList of this Attackable contains the Creature.
* Verifies if the creature is in the aggro list.
* @param creature the creature
* @return {@code true} if the creature is in the aggro list, {@code false} otherwise
*/
public boolean containsTarget(Creature creature)
public boolean isInAggroList(Creature creature)
{
return _aggroList.containsKey(creature);
}

View File

@ -174,7 +174,7 @@ public class GuardInstance extends Attackable
else if (interact)
{
// Check if the PlayerInstance is in the _aggroList of the GuardInstance
if (containsTarget(player))
if (isInAggroList(player))
{
// Set the PlayerInstance Intention to AI_INTENTION_ATTACK
player.getAI().setIntention(CtrlIntention.AI_INTENTION_ATTACK, this);

View File

@ -1120,10 +1120,11 @@ public class Attackable extends Npc
}
/**
* @param creature The Creature searched in the _aggroList of the Attackable
* @return True if the _aggroList of this Attackable contains the Creature.
* Verifies if the creature is in the aggro list.
* @param creature the creature
* @return {@code true} if the creature is in the aggro list, {@code false} otherwise
*/
public boolean containsTarget(Creature creature)
public boolean isInAggroList(Creature creature)
{
return _aggroList.containsKey(creature);
}

View File

@ -174,7 +174,7 @@ public class GuardInstance extends Attackable
else if (interact)
{
// Check if the PlayerInstance is in the _aggroList of the GuardInstance
if (containsTarget(player))
if (isInAggroList(player))
{
// Set the PlayerInstance Intention to AI_INTENTION_ATTACK
player.getAI().setIntention(CtrlIntention.AI_INTENTION_ATTACK, this);

View File

@ -1109,10 +1109,11 @@ public class Attackable extends Npc
}
/**
* @param creature The Creature searched in the _aggroList of the Attackable
* @return True if the _aggroList of this Attackable contains the Creature.
* Verifies if the creature is in the aggro list.
* @param creature the creature
* @return {@code true} if the creature is in the aggro list, {@code false} otherwise
*/
public boolean containsTarget(Creature creature)
public boolean isInAggroList(Creature creature)
{
return _aggroList.containsKey(creature);
}

View File

@ -174,7 +174,7 @@ public class GuardInstance extends Attackable
else if (interact)
{
// Check if the PlayerInstance is in the _aggroList of the GuardInstance
if (containsTarget(player))
if (isInAggroList(player))
{
// Set the PlayerInstance Intention to AI_INTENTION_ATTACK
player.getAI().setIntention(CtrlIntention.AI_INTENTION_ATTACK, this);

View File

@ -1109,10 +1109,11 @@ public class Attackable extends Npc
}
/**
* @param creature The Creature searched in the _aggroList of the Attackable
* @return True if the _aggroList of this Attackable contains the Creature.
* Verifies if the creature is in the aggro list.
* @param creature the creature
* @return {@code true} if the creature is in the aggro list, {@code false} otherwise
*/
public boolean containsTarget(Creature creature)
public boolean isInAggroList(Creature creature)
{
return _aggroList.containsKey(creature);
}

View File

@ -174,7 +174,7 @@ public class GuardInstance extends Attackable
else if (interact)
{
// Check if the PlayerInstance is in the _aggroList of the GuardInstance
if (containsTarget(player))
if (isInAggroList(player))
{
// Set the PlayerInstance Intention to AI_INTENTION_ATTACK
player.getAI().setIntention(CtrlIntention.AI_INTENTION_ATTACK, this);

View File

@ -1109,10 +1109,11 @@ public class Attackable extends Npc
}
/**
* @param creature The Creature searched in the _aggroList of the Attackable
* @return True if the _aggroList of this Attackable contains the Creature.
* Verifies if the creature is in the aggro list.
* @param creature the creature
* @return {@code true} if the creature is in the aggro list, {@code false} otherwise
*/
public boolean containsTarget(Creature creature)
public boolean isInAggroList(Creature creature)
{
return _aggroList.containsKey(creature);
}

View File

@ -174,7 +174,7 @@ public class GuardInstance extends Attackable
else if (interact)
{
// Check if the PlayerInstance is in the _aggroList of the GuardInstance
if (containsTarget(player))
if (isInAggroList(player))
{
// Set the PlayerInstance Intention to AI_INTENTION_ATTACK
player.getAI().setIntention(CtrlIntention.AI_INTENTION_ATTACK, this);

View File

@ -1117,10 +1117,11 @@ public class Attackable extends Npc
}
/**
* @param creature The Creature searched in the _aggroList of the Attackable
* @return True if the _aggroList of this Attackable contains the Creature.
* Verifies if the creature is in the aggro list.
* @param creature the creature
* @return {@code true} if the creature is in the aggro list, {@code false} otherwise
*/
public boolean containsTarget(Creature creature)
public boolean isInAggroList(Creature creature)
{
return _aggroList.containsKey(creature);
}

View File

@ -174,7 +174,7 @@ public class GuardInstance extends Attackable
else if (interact)
{
// Check if the PlayerInstance is in the _aggroList of the GuardInstance
if (containsTarget(player))
if (isInAggroList(player))
{
// Set the PlayerInstance Intention to AI_INTENTION_ATTACK
player.getAI().setIntention(CtrlIntention.AI_INTENTION_ATTACK, this);

View File

@ -1120,10 +1120,11 @@ public class Attackable extends Npc
}
/**
* @param creature The Creature searched in the _aggroList of the Attackable
* @return True if the _aggroList of this Attackable contains the Creature.
* Verifies if the creature is in the aggro list.
* @param creature the creature
* @return {@code true} if the creature is in the aggro list, {@code false} otherwise
*/
public boolean containsTarget(Creature creature)
public boolean isInAggroList(Creature creature)
{
return _aggroList.containsKey(creature);
}

View File

@ -174,7 +174,7 @@ public class GuardInstance extends Attackable
else if (interact)
{
// Check if the PlayerInstance is in the _aggroList of the GuardInstance
if (containsTarget(player))
if (isInAggroList(player))
{
// Set the PlayerInstance Intention to AI_INTENTION_ATTACK
player.getAI().setIntention(CtrlIntention.AI_INTENTION_ATTACK, this);

View File

@ -1120,10 +1120,11 @@ public class Attackable extends Npc
}
/**
* @param creature The Creature searched in the _aggroList of the Attackable
* @return True if the _aggroList of this Attackable contains the Creature.
* Verifies if the creature is in the aggro list.
* @param creature the creature
* @return {@code true} if the creature is in the aggro list, {@code false} otherwise
*/
public boolean containsTarget(Creature creature)
public boolean isInAggroList(Creature creature)
{
return _aggroList.containsKey(creature);
}

View File

@ -174,7 +174,7 @@ public class GuardInstance extends Attackable
else if (interact)
{
// Check if the PlayerInstance is in the _aggroList of the GuardInstance
if (containsTarget(player))
if (isInAggroList(player))
{
// Set the PlayerInstance Intention to AI_INTENTION_ATTACK
player.getAI().setIntention(CtrlIntention.AI_INTENTION_ATTACK, this);

View File

@ -1120,10 +1120,11 @@ public class Attackable extends Npc
}
/**
* @param creature The Creature searched in the _aggroList of the Attackable
* @return True if the _aggroList of this Attackable contains the Creature.
* Verifies if the creature is in the aggro list.
* @param creature the creature
* @return {@code true} if the creature is in the aggro list, {@code false} otherwise
*/
public boolean containsTarget(Creature creature)
public boolean isInAggroList(Creature creature)
{
return _aggroList.containsKey(creature);
}

View File

@ -174,7 +174,7 @@ public class GuardInstance extends Attackable
else if (interact)
{
// Check if the PlayerInstance is in the _aggroList of the GuardInstance
if (containsTarget(player))
if (isInAggroList(player))
{
// Set the PlayerInstance Intention to AI_INTENTION_ATTACK
player.getAI().setIntention(CtrlIntention.AI_INTENTION_ATTACK, this);

View File

@ -1142,10 +1142,11 @@ public class Attackable extends Npc
}
/**
* @param creature The Creature searched in the _aggroList of the Attackable
* @return True if the _aggroList of this Attackable contains the Creature.
* Verifies if the creature is in the aggro list.
* @param creature the creature
* @return {@code true} if the creature is in the aggro list, {@code false} otherwise
*/
public boolean containsTarget(Creature creature)
public boolean isInAggroList(Creature creature)
{
return _aggroList.containsKey(creature);
}

View File

@ -174,7 +174,7 @@ public class GuardInstance extends Attackable
else if (interact)
{
// Check if the PlayerInstance is in the _aggroList of the GuardInstance
if (containsTarget(player))
if (isInAggroList(player))
{
// Set the PlayerInstance Intention to AI_INTENTION_ATTACK
player.getAI().setIntention(CtrlIntention.AI_INTENTION_ATTACK, this);

View File

@ -1142,10 +1142,11 @@ public class Attackable extends Npc
}
/**
* @param creature The Creature searched in the _aggroList of the Attackable
* @return True if the _aggroList of this Attackable contains the Creature.
* Verifies if the creature is in the aggro list.
* @param creature the creature
* @return {@code true} if the creature is in the aggro list, {@code false} otherwise
*/
public boolean containsTarget(Creature creature)
public boolean isInAggroList(Creature creature)
{
return _aggroList.containsKey(creature);
}

View File

@ -174,7 +174,7 @@ public class GuardInstance extends Attackable
else if (interact)
{
// Check if the PlayerInstance is in the _aggroList of the GuardInstance
if (containsTarget(player))
if (isInAggroList(player))
{
// Set the PlayerInstance Intention to AI_INTENTION_ATTACK
player.getAI().setIntention(CtrlIntention.AI_INTENTION_ATTACK, this);

View File

@ -1142,10 +1142,11 @@ public class Attackable extends Npc
}
/**
* @param creature The Creature searched in the _aggroList of the Attackable
* @return True if the _aggroList of this Attackable contains the Creature.
* Verifies if the creature is in the aggro list.
* @param creature the creature
* @return {@code true} if the creature is in the aggro list, {@code false} otherwise
*/
public boolean containsTarget(Creature creature)
public boolean isInAggroList(Creature creature)
{
return _aggroList.containsKey(creature);
}

View File

@ -174,7 +174,7 @@ public class GuardInstance extends Attackable
else if (interact)
{
// Check if the PlayerInstance is in the _aggroList of the GuardInstance
if (containsTarget(player))
if (isInAggroList(player))
{
// Set the PlayerInstance Intention to AI_INTENTION_ATTACK
player.getAI().setIntention(CtrlIntention.AI_INTENTION_ATTACK, this);

View File

@ -1120,10 +1120,11 @@ public class Attackable extends Npc
}
/**
* @param creature The Creature searched in the _aggroList of the Attackable
* @return True if the _aggroList of this Attackable contains the Creature.
* Verifies if the creature is in the aggro list.
* @param creature the creature
* @return {@code true} if the creature is in the aggro list, {@code false} otherwise
*/
public boolean containsTarget(Creature creature)
public boolean isInAggroList(Creature creature)
{
return _aggroList.containsKey(creature);
}

View File

@ -174,7 +174,7 @@ public class GuardInstance extends Attackable
else if (interact)
{
// Check if the PlayerInstance is in the _aggroList of the GuardInstance
if (containsTarget(player))
if (isInAggroList(player))
{
// Set the PlayerInstance Intention to AI_INTENTION_ATTACK
player.getAI().setIntention(CtrlIntention.AI_INTENTION_ATTACK, this);