From fc48248221b39ec2aeb8f156efee60625daec690 Mon Sep 17 00:00:00 2001 From: megamage Date: Mon, 20 Apr 2009 21:15:33 -0500 Subject: *Fix a typo in ProcDamageAndSpellFor. Note: in TC2 this function is handled in a better way, and do not need this. --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 72e8deb010c..7b1ca779871 100644 --- a/src/game/Unit.cpp +++ b/src/game/Unit.cpp @@ -11412,7 +11412,7 @@ uint32 createProcExtendMask(SpellNonMeleeDamage *damageInfo, SpellMissInfo missC void Unit::ProcDamageAndSpellFor( bool isVictim, Unit * pTarget, uint32 procFlag, uint32 procExtra, WeaponAttackType attType, SpellEntry const * procSpell, uint32 damage ) { ++m_procDeep; - if (++m_procDeep > 5) + if (m_procDeep > 5) { sLog.outError("Prevent possible stack owerflow in Unit::ProcDamageAndSpellFor"); if (procSpell) -- cgit v1.2.3 From 2ecf4550906909b06d33d6358822fc3f8a30e1cd Mon Sep 17 00:00:00 2001 From: megamage Date: Tue, 21 Apr 2009 11:18:46 -0500 Subject: *Move move and remove obj from world update to map update. --HG-- branch : trunk --- src/game/Map.cpp | 2 ++ src/game/World.cpp | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/game/Map.cpp b/src/game/Map.cpp index 8a673c8937d..65c30f1781e 100644 --- a/src/game/Map.cpp +++ b/src/game/Map.cpp @@ -821,7 +821,9 @@ void Map::Update(const uint32 &t_diff) i_lock = true; + MoveAllCreaturesInMoveList(); RelocationNotify(); + RemoveAllObjectsInRemoveList(); // Don't unload grids if it's battleground, since we may have manually added GOs,creatures, those doesn't load from DB at grid re-load ! // This isn't really bother us, since as soon as we have instanced BG-s, the whole map unloads as the BG gets ended diff --git a/src/game/World.cpp b/src/game/World.cpp index 85a156c7206..b50e8476283 100644 --- a/src/game/World.cpp +++ b/src/game/World.cpp @@ -1616,7 +1616,7 @@ void World::Update(time_t diff) /// ///- Move all creatures with "delayed move" and remove and delete all objects with "delayed remove" - MapManager::Instance().DoDelayedMovesAndRemoves(); + //MapManager::Instance().DoDelayedMovesAndRemoves(); // update the instance reset times sInstanceSaveManager.Update(); -- cgit v1.2.3 From 784d388069d4dae31c8f9043fef9ea2768de74f5 Mon Sep 17 00:00:00 2001 From: "Andy@conmuc-l03" Date: Tue, 21 Apr 2009 20:39:06 +0200 Subject: Added a Spell for KilJaeden (need it later) --HG-- branch : trunk --- src/game/SpellAuras.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'src') diff --git a/src/game/SpellAuras.cpp b/src/game/SpellAuras.cpp index 663fa7c8125..0296f12a34b 100644 --- a/src/game/SpellAuras.cpp +++ b/src/game/SpellAuras.cpp @@ -5044,6 +5044,15 @@ void Aura::HandleAuraModPacify(bool apply, bool Real) m_target->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_PACIFIED); else m_target->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_PACIFIED); + + + if(m_spellProto->Id == 45839){ + if(apply){ + m_target->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); + }else{ + m_target->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); + } + } } void Aura::HandleAuraModPacifyAndSilence(bool apply, bool Real) -- cgit v1.2.3 From 4859edfb34a29a04642bcfe8639d6a0dcf5f4a7b Mon Sep 17 00:00:00 2001 From: Anubisss Date: Tue, 21 Apr 2009 21:26:45 +0200 Subject: *Minor check in Ambassador Hellmaw's UpdateAI(). --HG-- branch : trunk --- .../zone/aunchindoun/shadow_labyrinth/boss_ambassador_hellmaw.cpp | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src') diff --git a/src/bindings/scripts/scripts/zone/aunchindoun/shadow_labyrinth/boss_ambassador_hellmaw.cpp b/src/bindings/scripts/scripts/zone/aunchindoun/shadow_labyrinth/boss_ambassador_hellmaw.cpp index 5a9b8e8b2a3..1154f71cb64 100644 --- a/src/bindings/scripts/scripts/zone/aunchindoun/shadow_labyrinth/boss_ambassador_hellmaw.cpp +++ b/src/bindings/scripts/scripts/zone/aunchindoun/shadow_labyrinth/boss_ambassador_hellmaw.cpp @@ -166,6 +166,12 @@ struct TRINITY_DLL_DECL boss_ambassador_hellmawAI : public ScriptedAI if (!UpdateVictim() ) return; + if(m_creature->HasAura(SPELL_BANISH, 0)) + { + EnterEvadeMode(); + return; + } + if (CorrosiveAcid_Timer < diff) { DoCast(m_creature,SPELL_CORROSIVE_ACID); -- cgit v1.2.3 From dc326fdf2cd1320d07a65dcfaf3c9761d71489e0 Mon Sep 17 00:00:00 2001 From: megamage Date: Wed, 22 Apr 2009 17:23:00 -0500 Subject: *Fix a crash in warbringer_omrogg. --HG-- branch : trunk --- .../hellfire_citadel/shattered_halls/boss_warbringer_omrogg.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/bindings/scripts/scripts/zone/hellfire_citadel/shattered_halls/boss_warbringer_omrogg.cpp b/src/bindings/scripts/scripts/zone/hellfire_citadel/shattered_halls/boss_warbringer_omrogg.cpp index c565d6ab08e..b5caede6f7d 100644 --- a/src/bindings/scripts/scripts/zone/hellfire_citadel/shattered_halls/boss_warbringer_omrogg.cpp +++ b/src/bindings/scripts/scripts/zone/hellfire_citadel/shattered_halls/boss_warbringer_omrogg.cpp @@ -186,7 +186,7 @@ struct TRINITY_DLL_DECL boss_warbringer_omroggAI : public ScriptedAI Unit *Left = Unit::GetUnit(*m_creature,LeftHead); Unit *Right = Unit::GetUnit(*m_creature,RightHead); - if (!Left && !Right) + if (!Left || !Right) return; ithreat = rand()%4; @@ -239,7 +239,7 @@ struct TRINITY_DLL_DECL boss_warbringer_omroggAI : public ScriptedAI Unit *Left = Unit::GetUnit(*m_creature,LeftHead); Unit *Right = Unit::GetUnit(*m_creature,RightHead); - if (!Left && !Right) + if (!Left || !Right) return; ikilling = rand()%2; @@ -268,7 +268,7 @@ struct TRINITY_DLL_DECL boss_warbringer_omroggAI : public ScriptedAI Unit *Left = Unit::GetUnit(*m_creature,LeftHead); Unit *Right = Unit::GetUnit(*m_creature,RightHead); - if (!Left && !Right) + if (!Left || !Right) return; DoScriptText(YELL_DIE_L, Left); -- cgit v1.2.3