[Logging] Cleanup AI Logging Events (#2615)

This commit is contained in:
Aeadoin
2022-12-04 14:22:53 -05:00
committed by GitHub
parent 7e0fe93039
commit 318e487515
6 changed files with 43 additions and 57 deletions
+4 -4
View File
@@ -3457,7 +3457,7 @@ int Mob::CanBuffStack(uint16 spellid, uint8 caster_level, bool iFailIfOverwrite)
{
int i, ret, firstfree = -2;
LogAI("Checking if buff [{}] cast at level [{}] can stack on me.[{}]", spellid, caster_level, iFailIfOverwrite?" failing if we would overwrite something":"");
LogAIModerate("Checking if buff [{}] cast at level [{}] can stack on me.[{}]", spellid, caster_level, iFailIfOverwrite?" failing if we would overwrite something":"");
int buff_count = GetMaxTotalSlots();
for (i=0; i < buff_count; i++)
@@ -3481,7 +3481,7 @@ int Mob::CanBuffStack(uint16 spellid, uint8 caster_level, bool iFailIfOverwrite)
if(ret == 1) {
// should overwrite current slot
if(iFailIfOverwrite) {
LogAI("Buff [{}] would overwrite [{}] in slot [{}], reporting stack failure", spellid, curbuf.spellid, i);
LogAIDetail("Buff [{}] would overwrite [{}] in slot [{}], reporting stack failure", spellid, curbuf.spellid, i);
return(-1);
}
if(firstfree == -2)
@@ -3489,12 +3489,12 @@ int Mob::CanBuffStack(uint16 spellid, uint8 caster_level, bool iFailIfOverwrite)
}
if(ret == -1) {
LogAI("Buff [{}] would conflict with [{}] in slot [{}], reporting stack failure", spellid, curbuf.spellid, i);
LogAIDetail("Buff [{}] would conflict with [{}] in slot [{}], reporting stack failure", spellid, curbuf.spellid, i);
return -1; // stop the spell, can't stack it
}
}
LogAI("Reporting that buff [{}] could successfully be placed into slot [{}]", spellid, firstfree);
LogAIModerate("Reporting that buff [{}] could successfully be placed into slot [{}]", spellid, firstfree);
return firstfree;
}