*Fix a crash caused by using item.
--HG-- branch : trunk
This commit is contained in:
@@ -116,7 +116,7 @@ struct TRINITY_DLL_DECL boss_twinemperorsAI : public ScriptedAI
|
|||||||
if (ohealth <= 0)
|
if (ohealth <= 0)
|
||||||
{
|
{
|
||||||
pOtherBoss->setDeathState(JUST_DIED);
|
pOtherBoss->setDeathState(JUST_DIED);
|
||||||
pOtherBoss->SetUInt32Value(UNIT_DYNAMIC_FLAGS, UNIT_DYNFLAG_LOOTABLE);
|
pOtherBoss->SetFlag(UNIT_DYNAMIC_FLAGS, UNIT_DYNFLAG_LOOTABLE);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -128,7 +128,7 @@ struct TRINITY_DLL_DECL boss_twinemperorsAI : public ScriptedAI
|
|||||||
{
|
{
|
||||||
pOtherBoss->SetHealth(0);
|
pOtherBoss->SetHealth(0);
|
||||||
pOtherBoss->setDeathState(JUST_DIED);
|
pOtherBoss->setDeathState(JUST_DIED);
|
||||||
pOtherBoss->SetUInt32Value(UNIT_DYNAMIC_FLAGS, UNIT_DYNFLAG_LOOTABLE);
|
pOtherBoss->SetFlag(UNIT_DYNAMIC_FLAGS, UNIT_DYNFLAG_LOOTABLE);
|
||||||
((boss_twinemperorsAI *)pOtherBoss->AI())->DontYellWhenDead = true;
|
((boss_twinemperorsAI *)pOtherBoss->AI())->DontYellWhenDead = true;
|
||||||
}
|
}
|
||||||
if (!DontYellWhenDead) // I hope AI is not threaded
|
if (!DontYellWhenDead) // I hope AI is not threaded
|
||||||
|
|||||||
+2
-1
@@ -2090,7 +2090,8 @@ void Spell::prepare(SpellCastTargets * targets, Aura* triggeredByAura)
|
|||||||
// set timer base at cast time
|
// set timer base at cast time
|
||||||
ReSetTimer();
|
ReSetTimer();
|
||||||
|
|
||||||
if(m_IsTriggeredSpell || !m_casttime && !m_spellInfo->StartRecoveryTime && GetCurrentContainer() == CURRENT_GENERIC_SPELL)
|
//item: first cast may destroy item and second cast causes crash
|
||||||
|
if(m_IsTriggeredSpell || !m_casttime && !m_spellInfo->StartRecoveryTime && !m_castItemGUID && GetCurrentContainer() == CURRENT_GENERIC_SPELL)
|
||||||
cast(true);
|
cast(true);
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|||||||
+1
-1
@@ -641,7 +641,7 @@ uint32 Unit::DealDamage(Unit *pVictim, uint32 damage, CleanDamage const* cleanDa
|
|||||||
|
|
||||||
CreatureInfo const* cInfo = ((Creature*)pVictim)->GetCreatureInfo();
|
CreatureInfo const* cInfo = ((Creature*)pVictim)->GetCreatureInfo();
|
||||||
if(cInfo && cInfo->lootid)
|
if(cInfo && cInfo->lootid)
|
||||||
pVictim->SetUInt32Value(UNIT_DYNAMIC_FLAGS, UNIT_DYNFLAG_LOOTABLE);
|
pVictim->SetFlag(UNIT_DYNAMIC_FLAGS, UNIT_DYNFLAG_LOOTABLE);
|
||||||
|
|
||||||
// some critters required for quests
|
// some critters required for quests
|
||||||
if(GetTypeId() == TYPEID_PLAYER)
|
if(GetTypeId() == TYPEID_PLAYER)
|
||||||
|
|||||||
Reference in New Issue
Block a user