aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/bindings/scripts/scripts/zone/karazhan/boss_terestian_illhoof.cpp20
-rw-r--r--src/game/Creature.cpp6
-rw-r--r--src/game/GridNotifiers.cpp3
-rw-r--r--src/game/GridNotifiersImpl.h2
-rw-r--r--src/game/Spell.cpp3
5 files changed, 19 insertions, 15 deletions
diff --git a/src/bindings/scripts/scripts/zone/karazhan/boss_terestian_illhoof.cpp b/src/bindings/scripts/scripts/zone/karazhan/boss_terestian_illhoof.cpp
index 29aebf37a34..a77f8d052b1 100644
--- a/src/bindings/scripts/scripts/zone/karazhan/boss_terestian_illhoof.cpp
+++ b/src/bindings/scripts/scripts/zone/karazhan/boss_terestian_illhoof.cpp
@@ -46,7 +46,6 @@ EndScriptData */
#define SPELL_FIENDISH_PORTAL_1 30179 // Opens portal and summons Fiendish Portal, instant cast
#define SPELL_FIREBOLT 30050 // Blasts a target for 150 Fire damage.
-
#define SPELL_BROKEN_PACT 30065 // All damage taken increased by 25%.
#define SPELL_AMPLIFY_FLAMES 30053 // Increases the Fire damage taken by an enemy by 500 for 25 sec.
@@ -356,9 +355,11 @@ struct TRINITY_DLL_DECL boss_terestianAI : public ScriptedAI
}
};
-struct TRINITY_DLL_DECL mob_karazhan_impAI : public ScriptedAI
+#define SPELL_FIREBOLT 30050 // Blasts a target for 181-209 Fire damage.
+
+struct TRINITY_DLL_DECL mob_fiendish_impAI : public ScriptedAI
{
- mob_karazhan_impAI(Creature *c) : ScriptedAI(c) {}
+ mob_fiendish_impAI(Creature *c) : ScriptedAI(c) {}
uint32 FireboltTimer;
@@ -392,9 +393,9 @@ CreatureAI* GetAI_mob_kilrek(Creature *_Creature)
return new mob_kilrekAI (_Creature);
}
-CreatureAI* GetAI_mob_karazhan_imp(Creature *_Creature)
+CreatureAI* GetAI_mob_fiendish_imp(Creature *_Creature)
{
- return new mob_karazhan_impAI (_Creature);
+ return new mob_fiendish_impAI (_Creature);
}
CreatureAI* GetAI_mob_demon_chain(Creature *_Creature)
@@ -415,11 +416,10 @@ void AddSC_boss_terestian_illhoof()
newscript->GetAI = &GetAI_boss_terestian_illhoof;
newscript->RegisterSelf();
- //Who can find out what is this for
- //newscript = new Script;
- //newscript->Name="mob_karazhan_imp";
- //newscript->GetAI = &GetAI_mob_karazhan_imp;
- //newscript->RegisterSelf();
+ newscript = new Script;
+ newscript->Name="mob_fiendish_imp";
+ newscript->GetAI = &GetAI_mob_fiendish_imp;
+ newscript->RegisterSelf();
newscript = new Script;
newscript->Name="mob_kilrek";
diff --git a/src/game/Creature.cpp b/src/game/Creature.cpp
index d856c8b1f0f..68e7ddd1640 100644
--- a/src/game/Creature.cpp
+++ b/src/game/Creature.cpp
@@ -1740,8 +1740,10 @@ void Creature::Respawn()
uint16 poolid = poolhandler.IsPartOfAPool(GetGUIDLow(), GetTypeId());
if (poolid)
poolhandler.UpdatePool(poolid, GetGUIDLow(), GetTypeId());
- else
- GetMap()->Add(this);
+
+ //GetMap()->Add(this);
+
+
}
}
diff --git a/src/game/GridNotifiers.cpp b/src/game/GridNotifiers.cpp
index fe18dc35840..091fb1c293a 100644
--- a/src/game/GridNotifiers.cpp
+++ b/src/game/GridNotifiers.cpp
@@ -214,7 +214,8 @@ ObjectUpdater::Visit(GridRefManager<T> &m)
{
for(typename GridRefManager<T>::iterator iter = m.begin(); iter != m.end(); ++iter)
{
- iter->getSource()->Update(i_timeDiff);
+ if(iter->getSource()->IsInWorld())
+ iter->getSource()->Update(i_timeDiff);
}
}
diff --git a/src/game/GridNotifiersImpl.h b/src/game/GridNotifiersImpl.h
index 62cae5b33a0..7726d5647bd 100644
--- a/src/game/GridNotifiersImpl.h
+++ b/src/game/GridNotifiersImpl.h
@@ -33,7 +33,7 @@ inline void
Trinity::ObjectUpdater::Visit(CreatureMapType &m)
{
for(CreatureMapType::iterator iter=m.begin(); iter != m.end(); ++iter)
- if(!iter->getSource()->isSpiritService())
+ if(iter->getSource()->IsInWorld() && !iter->getSource()->isSpiritService())
iter->getSource()->Update(i_timeDiff);
}
diff --git a/src/game/Spell.cpp b/src/game/Spell.cpp
index 483678bed0e..9ab0c9d9f1a 100644
--- a/src/game/Spell.cpp
+++ b/src/game/Spell.cpp
@@ -220,8 +220,9 @@ void SpellCastTargets::Update(Unit* caster)
{
if(m_targetMask & TARGET_FLAG_ITEM)
m_itemTarget = ((Player*)caster)->GetItemByGuid(m_itemTargetGUID);
- else
+ else if(m_targetMask & TARGET_FLAG_TRADE_ITEM)
{
+ // here it is not guid but slot
Player* pTrader = ((Player*)caster)->GetTrader();
if(pTrader && m_itemTargetGUID < TRADE_SLOT_COUNT)
m_itemTarget = pTrader->GetItemByPos(pTrader->GetItemPosByTradeSlot(m_itemTargetGUID));