diff options
author | jackpoz <giacomopoz@gmail.com> | 2018-02-04 21:47:45 +0100 |
---|---|---|
committer | Shauren <shauren.trinity@gmail.com> | 2021-06-19 23:33:21 +0200 |
commit | b9159407e0d224423e2084dc15bcd28c3b402e24 (patch) | |
tree | 7bfb61c9f4bddef59d5aa2bdafc28dc056cced7e /src/server/game/AI/AIException.cpp | |
parent | d7542dc3e895839ec681bd7402446ffc74ce5122 (diff) |
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.
(cherry picked from commit 95a76a83fcbad0e52c6013697544e3c5691e7e24)
Diffstat (limited to 'src/server/game/AI/AIException.cpp')
-rw-r--r-- | src/server/game/AI/AIException.cpp | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/src/server/game/AI/AIException.cpp b/src/server/game/AI/AIException.cpp new file mode 100644 index 00000000000..3af2deda12c --- /dev/null +++ b/src/server/game/AI/AIException.cpp @@ -0,0 +1,23 @@ +/* + * This file is part of the TrinityCore Project. See AUTHORS file for Copyright information + * + * 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 <http://www.gnu.org/licenses/>. + */ + +#include "AIException.h" + +InvalidAIException::InvalidAIException(char const* _message) +{ + message().assign(_message); +} |