Skip to content

Commit

Permalink
[3025] Disable AI attack for controllable vehicles. Requires CMaNGOS …
Browse files Browse the repository at this point in the history
…12682+

Conflicts:
	sql/scriptdev2_script_full.sql
  • Loading branch information
xfurry authored and Undergarun committed Jul 12, 2014
1 parent b4cd020 commit 203861f
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 2 deletions.
3 changes: 3 additions & 0 deletions include/sc_creature.cpp
Expand Up @@ -85,6 +85,9 @@ void ScriptedAI::MoveInLineOfSight(Unit* pWho)
*/
void ScriptedAI::AttackStart(Unit* pWho)
{
if (!pWho || !m_creature->CanAttackByItself())
return;

if (pWho && m_creature->Attack(pWho, true)) // The Attack function also uses basic checks if pWho can be attacked
{
m_creature->AddThreat(pWho);
Expand Down
2 changes: 1 addition & 1 deletion sd2_revision_nr.h
@@ -1,4 +1,4 @@
#ifndef __SD2_REVISION_NR_H__
#define __SD2_REVISION_NR_H__
#define SD2_REVISION_NR "3024"
#define SD2_REVISION_NR "3025"
#endif // __SD2_REVISION_NR_H__
2 changes: 1 addition & 1 deletion sql/scriptdev2_script_full.sql
Expand Up @@ -3,7 +3,7 @@
--

DELETE FROM sd2_db_version;
INSERT INTO sd2_db_version (version) VALUES ('ScriptDev2 (for MangosR2 3157+ / for CMaNGOS 12674+) ');
INSERT INTO sd2_db_version (version) VALUES ('ScriptDev2 (for MangosR2 3157+ / for CMaNGOS 12682+) ');

--
-- Below contains data for table `script_texts` mainly used in C++ parts.
Expand Down
1 change: 1 addition & 0 deletions sql/updates/r3025_scriptdev2.sql
@@ -0,0 +1 @@
UPDATE sd2_db_version SET version='ScriptDev2 (for CMaNGOS 12682+) ';

0 comments on commit 203861f

Please sign in to comment.