From 95a76a83fcbad0e52c6013697544e3c5691e7e24 Mon Sep 17 00:00:00 2001 From: jackpoz Date: Sun, 4 Feb 2018 21:47:45 +0100 Subject: Core/AI: Fix assertion triggered with PetAI derived scripts (#21254) * Core/AI: Fix assertion triggered with PetAI derived scripts Fix an assertion triggered when spawning through ".npc add" or from SQL db table a Creature with AI set to a custom AI inheriting from PetAI. --- src/server/game/AI/AIException.cpp | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 src/server/game/AI/AIException.cpp (limited to 'src/server/game/AI/AIException.cpp') diff --git a/src/server/game/AI/AIException.cpp b/src/server/game/AI/AIException.cpp new file mode 100644 index 00000000000..ce3d601302f --- /dev/null +++ b/src/server/game/AI/AIException.cpp @@ -0,0 +1,23 @@ +/* + * Copyright (C) 2008-2018 TrinityCore + * + * This program is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation; either version 2 of the License, or (at your + * option) any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for + * more details. + * + * You should have received a copy of the GNU General Public License along + * with this program. If not, see . + */ + +#include "AIException.h" + +InvalidAIException::InvalidAIException(char const* _message) +{ + message().assign(_message); +} -- cgit v1.2.3