From bf1a1b5cec9932b078782b81c67a9ea9e5496063 Mon Sep 17 00:00:00 2001 From: DantestyleXD Date: Mon, 22 Aug 2016 22:00:00 +0200 Subject: [PATCH 1/2] Core/DB - Keeping the Enemy at Bay Closes #93 --- data/sql/updates/world/2016_08_19_01.sql | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 data/sql/updates/world/2016_08_19_01.sql diff --git a/data/sql/updates/world/2016_08_19_01.sql b/data/sql/updates/world/2016_08_19_01.sql new file mode 100644 index 000000000..80922332b --- /dev/null +++ b/data/sql/updates/world/2016_08_19_01.sql @@ -0,0 +1,24 @@ +ALTER TABLE world_db_version CHANGE COLUMN 2016_08_19_00 2016_08_19_01 BIT; + +/* +Issue: Not work quest id 11543 #93 +Missing SAI for the correct execution of quest + +Create SAI for ending quest +*/ + +UPDATE creature_template SET AIName="SmartAI" WHERE entry IN (25090,25091,25092); +DELETE FROM smart_scripts WHERE entryorguid IN (25090,25091,25092) AND source_type=0; +INSERT INTO smart_scripts VALUES +(25090,0,0,0,8,0,100,0,45115,0,0,0,33,25090,0,0,0,0,0,7,0,0,0,0,0,0,0,"Sin'Loren - On spellhit 45115 - Kill Credit"), +(25091,0,0,0,8,0,100,0,45115,0,0,0,33,25091,0,0,0,0,0,7,0,0,0,0,0,0,0,"Bloodoath - On spellhit 45115 - Kill Credit"), +(25092,0,0,0,8,0,100,0,45115,0,0,0,33,25092,0,0,0,0,0,7,0,0,0,0,0,0,0,"Dawnchaser - On spellhit 45115 - Kill Credit"); + +/* +Backup for next DELETE query +INSERT INTO conditions VALUES +(15,9143,0,0,0,9,0,11542,0,0,0,0,0,,"Show gossip option if player has quest 11542 but not complete"), +(15,9143,0,0,1,9,0,11543,0,0,0,0,0,,"Show gossip option if player has quest 11543 but not complete"); +*/ + +DELETE FROM conditions WHERE SourceTypeOrReferenceId=15 AND SourceGroup=9143; \ No newline at end of file From edd5f4a19267b55fe015150d653969f46ecd50a4 Mon Sep 17 00:00:00 2001 From: ShinDarth Date: Tue, 23 Aug 2016 10:02:41 +0200 Subject: [PATCH 2/2] Core/Chat: fixed crash in commands closes #110 --- src/game/Chat/Chat.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/game/Chat/Chat.cpp b/src/game/Chat/Chat.cpp index 432fa19c9..34946bc92 100644 --- a/src/game/Chat/Chat.cpp +++ b/src/game/Chat/Chat.cpp @@ -136,7 +136,7 @@ bool ChatHandler::hasStringAbbr(const char* name, const char* part) if (!*part) return false; - for (;;) + while (true) { if (!*part) return true; @@ -246,7 +246,6 @@ bool ChatHandler::ExecuteCommandInTable(std::vector const& table, c for (uint32 i = 0; i < table.size(); ++i) { - // for data fill use full explicit command names if (table[i].Name == nullptr) continue; @@ -258,6 +257,9 @@ bool ChatHandler::ExecuteCommandInTable(std::vector const& table, c { for (uint32 j = 0; j < table.size(); ++j) { + if (table[j].Name == nullptr) + continue; + if (!hasStringAbbr(table[j].Name, cmd.c_str())) continue; @@ -268,7 +270,6 @@ bool ChatHandler::ExecuteCommandInTable(std::vector const& table, c } } } - if (match) continue;