port mlog 'AI' category to new log system

This commit is contained in:
Akkadius
2015-01-17 02:20:01 -06:00
parent 97e87f53db
commit d4f2e0ce5f
7 changed files with 47 additions and 45 deletions
+6 -6
View File
@@ -1404,7 +1404,7 @@ void Mob::AI_Process() {
else if (AImovement_timer->Check())
{
if(!IsRooted()) {
mlog(AI__WAYPOINTS, "Pursuing %s while engaged.", target->GetName());
logger.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::AI, "Pursuing %s while engaged.", target->GetName());
if(!RuleB(Pathing, Aggro) || !zone->pathing)
CalculateNewPosition2(target->GetX(), target->GetY(), target->GetZ(), GetRunspeed());
else
@@ -1639,7 +1639,7 @@ void NPC::AI_DoMovement() {
roambox_movingto_y = zone->random.Real(roambox_min_y+1,roambox_max_y-1);
}
mlog(AI__WAYPOINTS, "Roam Box: d=%.3f (%.3f->%.3f,%.3f->%.3f): Go To (%.3f,%.3f)",
logger.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::AI, "Roam Box: d=%.3f (%.3f->%.3f,%.3f->%.3f): Go To (%.3f,%.3f)",
roambox_distance, roambox_min_x, roambox_max_x, roambox_min_y, roambox_max_y, roambox_movingto_x, roambox_movingto_y);
if (!CalculateNewPosition2(roambox_movingto_x, roambox_movingto_y, GetZ(), walksp, true))
{
@@ -1727,7 +1727,7 @@ void NPC::AI_DoMovement() {
{ // currently moving
if (cur_wp_x == GetX() && cur_wp_y == GetY())
{ // are we there yet? then stop
mlog(AI__WAYPOINTS, "We have reached waypoint %d (%.3f,%.3f,%.3f) on grid %d", cur_wp, GetX(), GetY(), GetZ(), GetGrid());
logger.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::AI, "We have reached waypoint %d (%.3f,%.3f,%.3f) on grid %d", cur_wp, GetX(), GetY(), GetZ(), GetGrid());
SetWaypointPause();
if(GetAppearance() != eaStanding)
SetAppearance(eaStanding, false);
@@ -1809,7 +1809,7 @@ void NPC::AI_DoMovement() {
if (!CP2Moved)
{
if(moved) {
mlog(AI__WAYPOINTS, "Reached guard point (%.3f,%.3f,%.3f)", guard_x, guard_y, guard_z);
logger.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::AI, "Reached guard point (%.3f,%.3f,%.3f)", guard_x, guard_y, guard_z);
ClearFeignMemory();
moved=false;
SetMoving(false);
@@ -1934,7 +1934,7 @@ bool NPC::AI_EngagedCastCheck() {
if (AIautocastspell_timer->Check(false)) {
AIautocastspell_timer->Disable(); //prevent the timer from going off AGAIN while we are casting.
mlog(AI__SPELLS, "Engaged autocast check triggered. Trying to cast healing spells then maybe offensive spells.");
logger.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::AI, "Engaged autocast check triggered. Trying to cast healing spells then maybe offensive spells.");
// try casting a heal or gate
if (!AICastSpell(this, AISpellVar.engaged_beneficial_self_chance, SpellType_Heal | SpellType_Escape | SpellType_InCombatBuff)) {
@@ -1957,7 +1957,7 @@ bool NPC::AI_PursueCastCheck() {
if (AIautocastspell_timer->Check(false)) {
AIautocastspell_timer->Disable(); //prevent the timer from going off AGAIN while we are casting.
mlog(AI__SPELLS, "Engaged (pursuing) autocast check triggered. Trying to cast offensive spells.");
logger.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::AI, "Engaged (pursuing) autocast check triggered. Trying to cast offensive spells.");
if(!AICastSpell(GetTarget(), AISpellVar.pursue_detrimental_chance, SpellType_Root | SpellType_Nuke | SpellType_Lifetap | SpellType_Snare | SpellType_DOT | SpellType_Dispel | SpellType_Mez | SpellType_Slow | SpellType_Debuff)) {
//no spell cast, try again soon.
AIautocastspell_timer->Start(RandomTimer(AISpellVar.pursue_no_sp_recast_min, AISpellVar.pursue_no_sp_recast_max), false);