diff --git a/sql/updates/1556_characters_ahbot.sql b/sql/updates/1556_characters_ahbot.sql
new file mode 100644
index 00000000000..85c0b14bac4
--- /dev/null
+++ b/sql/updates/1556_characters_ahbot.sql
@@ -0,0 +1,3 @@
+ALTER TABLE `auctionhousebot`
+ DROP COLUMN `minTime`,
+ DROP COLUMN `maxTime`;
diff --git a/src/game/Level3.cpp b/src/game/Level3.cpp
index bc0e3b8f80f..06338bbe233 100644
--- a/src/game/Level3.cpp
+++ b/src/game/Level3.cpp
@@ -122,6 +122,9 @@ bool ChatHandler::HandleAHBotOptionsCommand(const char* args)
}
else if (strncmp(opt,"maxitems",l) == 0)
{
+ PSendSysMessage("ahbotoptions mintime has been deprecated");
+ return false;
+ /*
char * param1 = strtok(NULL, " ");
if ((!ahMapIdStr) || (!param1))
{
@@ -129,6 +132,7 @@ bool ChatHandler::HandleAHBotOptionsCommand(const char* args)
return false;
}
AuctionHouseBotCommands(2, ahMapID, NULL, param1);
+ */
}
else if (strncmp(opt,"mintime",l) == 0)
{
diff --git a/src/game/Spell.cpp b/src/game/Spell.cpp
index 4b410480ebe..8ca1dc6f82a 100644
--- a/src/game/Spell.cpp
+++ b/src/game/Spell.cpp
@@ -2555,18 +2555,29 @@ void Spell::cancel()
void Spell::cast(bool skipCheck)
{
- SetExecutedCurrently(true);
-
// update pointers base at GUIDs to prevent access to non-existed already object
UpdatePointers();
- // cancel at lost main target unit
- if(!m_targets.getUnitTarget() && m_targets.getUnitTargetGUID() && m_targets.getUnitTargetGUID() != m_caster->GetGUID())
+ if(m_targets.getUnitTarget())
{
- cancel();
- SetExecutedCurrently(false);
- return;
+ // three check: prepare, cast (m_casttime > 0), hit (delayed)
+ if(m_casttime && m_targets.getUnitTarget()->isAlive() && !m_caster->canSeeOrDetect(m_targets.getUnitTarget(), true)))
+ {
+ cancel();
+ return;
+ }
}
+ else
+ {
+ // cancel at lost main target unit
+ if(m_targets.getUnitTargetGUID() && m_targets.getUnitTargetGUID() != m_caster->GetGUID())
+ {
+ cancel();
+ return;
+ }
+ }
+
+ SetExecutedCurrently(true);
if(m_caster->GetTypeId() != TYPEID_PLAYER && m_targets.getUnitTarget() && m_targets.getUnitTarget() != m_caster)
m_caster->SetInFront(m_targets.getUnitTarget());
diff --git a/src/shared/Database/DBCStructure.h b/src/shared/Database/DBCStructure.h
new file mode 100644
index 00000000000..8e8aa8bfba8
--- /dev/null
+++ b/src/shared/Database/DBCStructure.h
@@ -0,0 +1,904 @@
+/*
+ * Copyright (C) 2005-2008 MaNGOS
+ *
+ * Copyright (C) 2008 Trinity
+ *
+ * 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, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ */
+
+#ifndef DBCSTRUCTURE_H
+#define DBCSTRUCTURE_H
+
+#include "DBCEnums.h"
+#include "Platform/Define.h"
+
+#include