It's likely that a Bot is triggering the EVENT_ATTACK and since a bot is not a client it fails. Try a quick test. Add a check in NPC::Damage() where EVENT_ATTACK is triggered
Code:
if(attacked_timer.Check())
{
mlog(COMBAT__HITS, "Triggering EVENT_ATTACK due to attack by %s", other->GetName());
#ifdef BOTS
if(other->IsBot())
parse->EventNPC(EVENT_ATTACK, this, other->CastToBot()->GetBotOwner(), "", 0);
else
#endif //BOTS
parse->EventNPC(EVENT_ATTACK, this, other, "", 0);
}