aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sql/updates/1211_world.sql4
-rw-r--r--sql/updates/CMakeLists.txt1
-rw-r--r--src/game/Creature.cpp6
-rw-r--r--src/game/NullCreatureAI.cpp5
-rw-r--r--src/game/NullCreatureAI.h1
-rw-r--r--src/game/Player.cpp5
-rw-r--r--src/game/Unit.cpp2
7 files changed, 19 insertions, 5 deletions
diff --git a/sql/updates/1211_world.sql b/sql/updates/1211_world.sql
new file mode 100644
index 00000000000..437fd6ddaa1
--- /dev/null
+++ b/sql/updates/1211_world.sql
@@ -0,0 +1,4 @@
+DELETE FROM spell_proc_event where entry IN (31124, 31126);
+INSERT INTO spell_proc_event () VALUES
+(31124, 0, 8, 553648142, 0, 0, 0, 0, 0),
+(31126, 0, 8, 553648142, 0, 0, 0, 0, 0);
diff --git a/sql/updates/CMakeLists.txt b/sql/updates/CMakeLists.txt
index 8cd388d7b97..f80ffe6038d 100644
--- a/sql/updates/CMakeLists.txt
+++ b/sql/updates/CMakeLists.txt
@@ -82,4 +82,5 @@ INSTALL(FILES
1881_world.sql
1884_world.sql
1886_world.sql
+1211_world.sql
DESTINATION share/trinity/sql/updates) \ No newline at end of file
diff --git a/src/game/Creature.cpp b/src/game/Creature.cpp
index d31e6dec1a1..c075a33e92f 100644
--- a/src/game/Creature.cpp
+++ b/src/game/Creature.cpp
@@ -290,6 +290,9 @@ bool Creature::InitEntry(uint32 Entry, uint32 team, const CreatureData *data )
if(!m_respawnradius && m_defaultMovementType==RANDOM_MOTION_TYPE)
m_defaultMovementType = IDLE_MOTION_TYPE;
+ for(int i=0; i < CREATURE_MAX_SPELLS; ++i)
+ m_spells[i] = GetCreatureInfo()->spells[i];
+
return true;
}
@@ -345,9 +348,6 @@ bool Creature::UpdateEntry(uint32 Entry, uint32 team, const CreatureData *data )
SetPvP(true);
}
- for(int i=0; i < CREATURE_MAX_SPELLS; ++i)
- m_spells[i] = GetCreatureInfo()->spells[i];
-
// HACK: trigger creature is always not selectable
if(isTrigger())
SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
diff --git a/src/game/NullCreatureAI.cpp b/src/game/NullCreatureAI.cpp
index 2745dd3ea8d..be59ed6e40d 100644
--- a/src/game/NullCreatureAI.cpp
+++ b/src/game/NullCreatureAI.cpp
@@ -27,6 +27,11 @@ void PassiveAI::UpdateAI(const uint32)
EnterEvadeMode();
}
+void PossessedAI::AttackStart(Unit *target)
+{
+ me->Attack(target, true);
+}
+
void PossessedAI::UpdateAI(const uint32 diff)
{
if(me->getVictim())
diff --git a/src/game/NullCreatureAI.h b/src/game/NullCreatureAI.h
index f628a7e8ac9..626dd307ef3 100644
--- a/src/game/NullCreatureAI.h
+++ b/src/game/NullCreatureAI.h
@@ -41,6 +41,7 @@ class TRINITY_DLL_DECL PossessedAI : public PassiveAI
public:
PossessedAI(Creature *c) : PassiveAI(c) {}
+ void AttackStart(Unit *target);
void UpdateAI(const uint32);
void EnterEvadeMode() {}
diff --git a/src/game/Player.cpp b/src/game/Player.cpp
index 68bb5628887..61968fae0c4 100644
--- a/src/game/Player.cpp
+++ b/src/game/Player.cpp
@@ -20308,7 +20308,10 @@ void Player::EnterVehicle(Vehicle *vehicle)
data << uint32(0x00000000);
data << uint32(0x00000101);
- for(uint32 i = 0; i < 10; ++i)
+ for(uint32 i = 0; i < CREATURE_MAX_SPELLS; ++i)
+ data << uint16(vehicle->m_spells[i]) << uint8(0) << uint8(i+8);
+
+ for(uint32 i = CREATURE_MAX_SPELLS; i < 10; ++i)
data << uint16(0) << uint8(0) << uint8(i+8);
data << uint8(0);
diff --git a/src/game/Unit.cpp b/src/game/Unit.cpp
index 118636edcc0..bf750be34f5 100644
--- a/src/game/Unit.cpp
+++ b/src/game/Unit.cpp
@@ -483,7 +483,7 @@ void Unit::RemoveAuraTypeByCaster(AuraType auraType, uint64 casterGUID)
{
if (auraType >= TOTAL_AURAS) return;
AuraList::iterator iter, next;
- for(iter = m_modAuras[auraType].begin(); iter != m_modAuras[auraType].end(); ++iter)
+ for(iter = m_modAuras[auraType].begin(); iter != m_modAuras[auraType].end(); iter = next)
{
next = iter;
++next;