From 32604a75f694fa7182961a540a79c9a5060d0348 Mon Sep 17 00:00:00 2001 From: Blaymoira Date: Sat, 14 Mar 2009 10:14:22 +0100 Subject: *Fixed creature following in dungeons --HG-- branch : trunk --- src/game/CreatureGroups.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/game/CreatureGroups.cpp b/src/game/CreatureGroups.cpp index 6b69a9102dd..55b56e0b94e 100644 --- a/src/game/CreatureGroups.cpp +++ b/src/game/CreatureGroups.cpp @@ -187,7 +187,7 @@ void CreatureGroup::SetMemberDestination(Creature *member) return; float x,y,z; - uint32 lowguid = member->GetGUIDLow(); + uint32 lowguid = member->GetDBTableGUIDLow(); UNORDERED_MAP::iterator itr2 = CreatureGroupMap.find(lowguid); -- cgit v1.2.3 From e82dd549b881609dc736837012f5daf71d941bb9 Mon Sep 17 00:00:00 2001 From: megamage Date: Sat, 14 Mar 2009 09:01:55 -0600 Subject: *Fix a typo that causes crash. --HG-- branch : trunk --- src/game/Unit.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/game/Unit.cpp b/src/game/Unit.cpp index 76a2cb264d4..848fe87cd0b 100644 --- a/src/game/Unit.cpp +++ b/src/game/Unit.cpp @@ -539,7 +539,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; -- cgit v1.2.3 From 25720e5a9034ae5d50a9bf3d9a3b854035558ff9 Mon Sep 17 00:00:00 2001 From: megamage Date: Sat, 14 Mar 2009 09:18:55 -0600 Subject: *Move creature spell init from updateentry to initentry. This allows pet have spells defined in db. --HG-- branch : trunk --- src/game/Creature.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src') diff --git a/src/game/Creature.cpp b/src/game/Creature.cpp index 8a5e6e52018..51f24389c95 100644 --- a/src/game/Creature.cpp +++ b/src/game/Creature.cpp @@ -297,6 +297,11 @@ bool Creature::InitEntry(uint32 Entry, uint32 team, const CreatureData *data ) if(!m_respawnradius && m_defaultMovementType==RANDOM_MOTION_TYPE) m_defaultMovementType = IDLE_MOTION_TYPE; + m_spells[0] = GetCreatureInfo()->spell1; + m_spells[1] = GetCreatureInfo()->spell2; + m_spells[2] = GetCreatureInfo()->spell3; + m_spells[3] = GetCreatureInfo()->spell4; + return true; } @@ -353,11 +358,6 @@ bool Creature::UpdateEntry(uint32 Entry, uint32 team, const CreatureData *data ) SetPvP(true); } - m_spells[0] = GetCreatureInfo()->spell1; - m_spells[1] = GetCreatureInfo()->spell2; - m_spells[2] = GetCreatureInfo()->spell3; - m_spells[3] = GetCreatureInfo()->spell4; - // HACK: trigger creature is always not selectable if(isTrigger()) SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); -- cgit v1.2.3 From c9874ee715480b41881704d40cc26f72562d5836 Mon Sep 17 00:00:00 2001 From: megamage Date: Sat, 14 Mar 2009 09:20:23 -0600 Subject: *Fix the bug that possessed creature cannot melee. --HG-- branch : trunk --- src/game/NullCreatureAI.cpp | 5 +++++ src/game/NullCreatureAI.h | 1 + 2 files changed, 6 insertions(+) (limited to 'src') diff --git a/src/game/NullCreatureAI.cpp b/src/game/NullCreatureAI.cpp index 1bb787b25c3..8bea03d0216 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 b64bf43ce5f..d20d727690a 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() {} -- cgit v1.2.3