aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authormegamage <none@none>2008-11-29 14:04:20 -0600
committermegamage <none@none>2008-11-29 14:04:20 -0600
commit7af8633331dc5dd79061a5595e0bbdc871540a6d (patch)
tree5e4a83d62090cd85c5cda3a742131b379e369bc9 /src
parent3d8d45c57a84538afbf716fc9304ea3207ea1948 (diff)
*Fix the bug that improved drain soul talent make caster cannot get soul shard.
--HG-- branch : trunk
Diffstat (limited to 'src')
-rw-r--r--src/game/SpellAuras.cpp7
-rw-r--r--src/game/Unit.cpp6
2 files changed, 10 insertions, 3 deletions
diff --git a/src/game/SpellAuras.cpp b/src/game/SpellAuras.cpp
index a54077573cf..ce2fec21fab 100644
--- a/src/game/SpellAuras.cpp
+++ b/src/game/SpellAuras.cpp
@@ -2798,7 +2798,12 @@ void Aura::HandleChannelDeathItem(bool apply, bool Real)
{
Unit* caster = GetCaster();
Unit* victim = GetTarget();
- if(!caster || caster->GetTypeId() != TYPEID_PLAYER || !victim || m_removeMode!=AURA_REMOVE_BY_DEATH)
+ if(!caster || caster->GetTypeId() != TYPEID_PLAYER || !victim)// || m_removeMode!=AURA_REMOVE_BY_DEATH)
+ return;
+
+ //we cannot check removemode = death
+ //talent will remove the caster's aura->interrupt channel->remove victim aura
+ if(victim->GetHealth() > 0)
return;
SpellEntry const *spellInfo = GetSpellProto();
diff --git a/src/game/Unit.cpp b/src/game/Unit.cpp
index 645ff194eba..303e154ab71 100644
--- a/src/game/Unit.cpp
+++ b/src/game/Unit.cpp
@@ -679,6 +679,8 @@ uint32 Unit::DealDamage(Unit *pVictim, uint32 damage, CleanDamage const* cleanDa
{
DEBUG_LOG("DealDamage: victim just died");
+ pVictim->SetHealth(0);
+
// find player: owner of controlled `this` or `this` itself maybe
Player *player = GetCharmerOrOwnerPlayerOrPlayerItself();
@@ -761,8 +763,8 @@ uint32 Unit::DealDamage(Unit *pVictim, uint32 damage, CleanDamage const* cleanDa
// FORM_SPIRITOFREDEMPTION and related auras
pVictim->CastSpell(pVictim,27827,true,NULL,spiritOfRedemtionTalentReady);
}
- else
- pVictim->SetHealth(0);
+ //else
+ // pVictim->SetHealth(0);
// remember victim PvP death for corpse type and corpse reclaim delay
// at original death (not at SpiritOfRedemtionTalent timeout)