aboutsummaryrefslogtreecommitdiff
path: root/src/game
diff options
context:
space:
mode:
authormegamage <none@none>2009-05-03 10:48:28 -0500
committermegamage <none@none>2009-05-03 10:48:28 -0500
commit2a725194b67539a917898fd6b45625eb52154303 (patch)
treec8b3d578e9c57b9cd07ab066719f2da342d46e89 /src/game
parent99cc10d0d71b8d9fff0e2fae981a0602d7634959 (diff)
parenteb3c3a8fb4a4bac2e01222bfd25efd80fc792ba2 (diff)
*Merge.
--HG-- branch : trunk
Diffstat (limited to 'src/game')
-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
4 files changed, 9 insertions, 5 deletions
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));