Removed onEvtThink method debug message.

This commit is contained in:
MobiusDev 2018-09-11 13:36:06 +00:00
parent 3a373ee4d3
commit 43e04da970
14 changed files with 61 additions and 84 deletions

View File

@ -24,7 +24,6 @@ import java.util.Comparator;
import java.util.List; import java.util.List;
import java.util.Set; import java.util.Set;
import java.util.concurrent.Future; import java.util.concurrent.Future;
import java.util.logging.Level;
import java.util.logging.Logger; import java.util.logging.Logger;
import java.util.stream.Stream; import java.util.stream.Stream;
@ -1202,12 +1201,14 @@ public class L2AttackableAI extends L2CharacterAI
} }
catch (Exception e) catch (Exception e)
{ {
LOGGER.log(Level.WARNING, this + " - " + getIntention().toString() + " - onEvtThink() failed", e); // LOGGER.warning(getClass().getSimpleName() + ": " + this.getActor().getName() + " - onEvtThink() failed!");
} }
finally
// Finish thinking action {
// Stop thinking action
_thinking = false; _thinking = false;
} }
}
/** /**
* Launch actions corresponding to the Event Attacked.<br> * Launch actions corresponding to the Event Attacked.<br>

View File

@ -784,7 +784,7 @@ public class L2Attackable extends L2Npc
final AggroInfo ai = _aggroList.get(target); final AggroInfo ai = _aggroList.get(target);
if (ai == null) if (ai == null)
{ {
LOGGER.info("target " + target + " not present in aggro list of " + this); LOGGER.info("Target " + target + " not present in aggro list of " + this);
return; return;
} }

View File

@ -24,7 +24,6 @@ import java.util.Comparator;
import java.util.List; import java.util.List;
import java.util.Set; import java.util.Set;
import java.util.concurrent.Future; import java.util.concurrent.Future;
import java.util.logging.Level;
import java.util.logging.Logger; import java.util.logging.Logger;
import java.util.stream.Stream; import java.util.stream.Stream;
@ -1169,13 +1168,8 @@ public class L2AttackableAI extends L2CharacterAI
@Override @Override
protected void onEvtThink() protected void onEvtThink()
{ {
// Check if the actor can't use skills // Check if the actor can't use skills and if a thinking action isn't already in progress
if (getActiveChar().isAllSkillsDisabled()) if (_thinking || getActiveChar().isAllSkillsDisabled())
{
return;
}
// Check if a thinking action isn't already in progress
if (_thinking)
{ {
return; return;
} }
@ -1207,12 +1201,14 @@ public class L2AttackableAI extends L2CharacterAI
} }
catch (Exception e) catch (Exception e)
{ {
LOGGER.log(Level.WARNING, this + " - " + getIntention().toString() + " - onEvtThink() failed", e); // LOGGER.warning(getClass().getSimpleName() + ": " + this.getActor().getName() + " - onEvtThink() failed!");
} }
finally
// Finish thinking action {
// Stop thinking action
_thinking = false; _thinking = false;
} }
}
/** /**
* Launch actions corresponding to the Event Attacked.<br> * Launch actions corresponding to the Event Attacked.<br>

View File

@ -780,7 +780,7 @@ public class L2Attackable extends L2Npc
final AggroInfo ai = _aggroList.get(target); final AggroInfo ai = _aggroList.get(target);
if (ai == null) if (ai == null)
{ {
LOGGER.info("target " + target + " not present in aggro list of " + this); LOGGER.info("Target " + target + " not present in aggro list of " + this);
return; return;
} }

View File

@ -24,7 +24,6 @@ import java.util.Comparator;
import java.util.List; import java.util.List;
import java.util.Set; import java.util.Set;
import java.util.concurrent.Future; import java.util.concurrent.Future;
import java.util.logging.Level;
import java.util.logging.Logger; import java.util.logging.Logger;
import java.util.stream.Stream; import java.util.stream.Stream;
@ -1169,13 +1168,8 @@ public class L2AttackableAI extends L2CharacterAI
@Override @Override
protected void onEvtThink() protected void onEvtThink()
{ {
// Check if the actor can't use skills // Check if the actor can't use skills and if a thinking action isn't already in progress
if (getActiveChar().isAllSkillsDisabled()) if (_thinking || getActiveChar().isAllSkillsDisabled())
{
return;
}
// Check if a thinking action isn't already in progress
if (_thinking)
{ {
return; return;
} }
@ -1207,12 +1201,14 @@ public class L2AttackableAI extends L2CharacterAI
} }
catch (Exception e) catch (Exception e)
{ {
LOGGER.log(Level.WARNING, this + " - " + getIntention().toString() + " - onEvtThink() failed", e); // LOGGER.warning(getClass().getSimpleName() + ": " + this.getActor().getName() + " - onEvtThink() failed!");
} }
finally
// Finish thinking action {
// Stop thinking action
_thinking = false; _thinking = false;
} }
}
/** /**
* Launch actions corresponding to the Event Attacked.<br> * Launch actions corresponding to the Event Attacked.<br>

View File

@ -780,7 +780,7 @@ public class L2Attackable extends L2Npc
final AggroInfo ai = _aggroList.get(target); final AggroInfo ai = _aggroList.get(target);
if (ai == null) if (ai == null)
{ {
LOGGER.info("target " + target + " not present in aggro list of " + this); LOGGER.info("Target " + target + " not present in aggro list of " + this);
return; return;
} }

View File

@ -24,7 +24,6 @@ import java.util.Comparator;
import java.util.List; import java.util.List;
import java.util.Set; import java.util.Set;
import java.util.concurrent.Future; import java.util.concurrent.Future;
import java.util.logging.Level;
import java.util.logging.Logger; import java.util.logging.Logger;
import java.util.stream.Stream; import java.util.stream.Stream;
@ -1169,13 +1168,8 @@ public class L2AttackableAI extends L2CharacterAI
@Override @Override
protected void onEvtThink() protected void onEvtThink()
{ {
// Check if the actor can't use skills // Check if the actor can't use skills and if a thinking action isn't already in progress
if (getActiveChar().isAllSkillsDisabled()) if (_thinking || getActiveChar().isAllSkillsDisabled())
{
return;
}
// Check if a thinking action isn't already in progress
if (_thinking)
{ {
return; return;
} }
@ -1207,12 +1201,14 @@ public class L2AttackableAI extends L2CharacterAI
} }
catch (Exception e) catch (Exception e)
{ {
LOGGER.log(Level.WARNING, this + " - " + getIntention().toString() + " - onEvtThink() failed", e); // LOGGER.warning(getClass().getSimpleName() + ": " + this.getActor().getName() + " - onEvtThink() failed!");
} }
finally
// Finish thinking action {
// Stop thinking action
_thinking = false; _thinking = false;
} }
}
/** /**
* Launch actions corresponding to the Event Attacked.<br> * Launch actions corresponding to the Event Attacked.<br>

View File

@ -780,7 +780,7 @@ public class L2Attackable extends L2Npc
final AggroInfo ai = _aggroList.get(target); final AggroInfo ai = _aggroList.get(target);
if (ai == null) if (ai == null)
{ {
LOGGER.info("target " + target + " not present in aggro list of " + this); LOGGER.info("Target " + target + " not present in aggro list of " + this);
return; return;
} }

View File

@ -24,7 +24,6 @@ import java.util.Comparator;
import java.util.List; import java.util.List;
import java.util.Set; import java.util.Set;
import java.util.concurrent.Future; import java.util.concurrent.Future;
import java.util.logging.Level;
import java.util.logging.Logger; import java.util.logging.Logger;
import java.util.stream.Stream; import java.util.stream.Stream;
@ -1169,13 +1168,8 @@ public class L2AttackableAI extends L2CharacterAI
@Override @Override
protected void onEvtThink() protected void onEvtThink()
{ {
// Check if the actor can't use skills // Check if the actor can't use skills and if a thinking action isn't already in progress
if (getActiveChar().isAllSkillsDisabled()) if (_thinking || getActiveChar().isAllSkillsDisabled())
{
return;
}
// Check if a thinking action isn't already in progress
if (_thinking)
{ {
return; return;
} }
@ -1207,12 +1201,14 @@ public class L2AttackableAI extends L2CharacterAI
} }
catch (Exception e) catch (Exception e)
{ {
LOGGER.log(Level.WARNING, this + " - " + getIntention().toString() + " - onEvtThink() failed", e); // LOGGER.warning(getClass().getSimpleName() + ": " + this.getActor().getName() + " - onEvtThink() failed!");
} }
finally
// Finish thinking action {
// Stop thinking action
_thinking = false; _thinking = false;
} }
}
/** /**
* Launch actions corresponding to the Event Attacked.<br> * Launch actions corresponding to the Event Attacked.<br>

View File

@ -780,7 +780,7 @@ public class L2Attackable extends L2Npc
final AggroInfo ai = _aggroList.get(target); final AggroInfo ai = _aggroList.get(target);
if (ai == null) if (ai == null)
{ {
LOGGER.info("target " + target + " not present in aggro list of " + this); LOGGER.info("Target " + target + " not present in aggro list of " + this);
return; return;
} }

View File

@ -24,7 +24,6 @@ import java.util.Comparator;
import java.util.List; import java.util.List;
import java.util.Set; import java.util.Set;
import java.util.concurrent.Future; import java.util.concurrent.Future;
import java.util.logging.Level;
import java.util.logging.Logger; import java.util.logging.Logger;
import java.util.stream.Stream; import java.util.stream.Stream;
@ -1169,13 +1168,8 @@ public class L2AttackableAI extends L2CharacterAI
@Override @Override
protected void onEvtThink() protected void onEvtThink()
{ {
// Check if the actor can't use skills // Check if the actor can't use skills and if a thinking action isn't already in progress
if (getActiveChar().isAllSkillsDisabled()) if (_thinking || getActiveChar().isAllSkillsDisabled())
{
return;
}
// Check if a thinking action isn't already in progress
if (_thinking)
{ {
return; return;
} }
@ -1207,12 +1201,14 @@ public class L2AttackableAI extends L2CharacterAI
} }
catch (Exception e) catch (Exception e)
{ {
LOGGER.log(Level.WARNING, this + " - " + getIntention().toString() + " - onEvtThink() failed", e); // LOGGER.warning(getClass().getSimpleName() + ": " + this.getActor().getName() + " - onEvtThink() failed!");
} }
finally
// Finish thinking action {
// Stop thinking action
_thinking = false; _thinking = false;
} }
}
/** /**
* Launch actions corresponding to the Event Attacked.<br> * Launch actions corresponding to the Event Attacked.<br>

View File

@ -780,7 +780,7 @@ public class L2Attackable extends L2Npc
final AggroInfo ai = _aggroList.get(target); final AggroInfo ai = _aggroList.get(target);
if (ai == null) if (ai == null)
{ {
LOGGER.info("target " + target + " not present in aggro list of " + this); LOGGER.info("Target " + target + " not present in aggro list of " + this);
return; return;
} }

View File

@ -24,7 +24,6 @@ import java.util.Comparator;
import java.util.List; import java.util.List;
import java.util.Set; import java.util.Set;
import java.util.concurrent.Future; import java.util.concurrent.Future;
import java.util.logging.Level;
import java.util.logging.Logger; import java.util.logging.Logger;
import java.util.stream.Stream; import java.util.stream.Stream;
@ -1169,13 +1168,8 @@ public class L2AttackableAI extends L2CharacterAI
@Override @Override
protected void onEvtThink() protected void onEvtThink()
{ {
// Check if the actor can't use skills // Check if the actor can't use skills and if a thinking action isn't already in progress
if (getActiveChar().isAllSkillsDisabled()) if (_thinking || getActiveChar().isAllSkillsDisabled())
{
return;
}
// Check if a thinking action isn't already in progress
if (_thinking)
{ {
return; return;
} }
@ -1207,12 +1201,14 @@ public class L2AttackableAI extends L2CharacterAI
} }
catch (Exception e) catch (Exception e)
{ {
LOGGER.log(Level.WARNING, this + " - " + getIntention().toString() + " - onEvtThink() failed", e); // LOGGER.warning(getClass().getSimpleName() + ": " + this.getActor().getName() + " - onEvtThink() failed!");
} }
finally
// Finish thinking action {
// Stop thinking action
_thinking = false; _thinking = false;
} }
}
/** /**
* Launch actions corresponding to the Event Attacked.<br> * Launch actions corresponding to the Event Attacked.<br>

View File

@ -780,7 +780,7 @@ public class L2Attackable extends L2Npc
final AggroInfo ai = _aggroList.get(target); final AggroInfo ai = _aggroList.get(target);
if (ai == null) if (ai == null)
{ {
LOGGER.info("target " + target + " not present in aggro list of " + this); LOGGER.info("Target " + target + " not present in aggro list of " + this);
return; return;
} }