aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorNevan <none@none>2009-08-01 21:15:56 +0200
committerNevan <none@none>2009-08-01 21:15:56 +0200
commit604ad4eba378c40767ddeb1f061568400a54eab5 (patch)
tree36cd40926cc0e4be66cd04bc1e9145cb1f833c6b /src
parentaa60def6acd9b15267cf3c95f9a7e65531838796 (diff)
*Fix Glyph of Guardian Spirit
--HG-- branch : trunk
Diffstat (limited to 'src')
-rw-r--r--src/game/SpellAuras.cpp32
1 files changed, 32 insertions, 0 deletions
diff --git a/src/game/SpellAuras.cpp b/src/game/SpellAuras.cpp
index eef918ae5e8..7011d0e2e62 100644
--- a/src/game/SpellAuras.cpp
+++ b/src/game/SpellAuras.cpp
@@ -6023,6 +6023,38 @@ void AuraEffect::HandleSchoolAbsorb(bool apply, bool Real, bool changeAmount)
m_amount += (int32)DoneActualBenefit;
}
}
+
+ // Guardian Spirit
+ if(m_spellProto->Id == 47788 && Real && !apply)
+ {
+ Unit *caster = GetCaster();
+ if(!caster)
+ return;
+
+ if(caster->GetTypeId() != TYPEID_PLAYER)
+ return;
+
+ Player *player = ((Player*)caster);
+ // Glyph of Guardian Spirit
+ if(AuraEffect * aurEff = player->GetDummyAura(63231))
+ {
+ if (GetParentAura()->GetRemoveMode() == AURA_REMOVE_BY_EXPIRE)
+ {
+ if (!player->HasSpellCooldown(47788))
+ return;
+
+ player->RemoveSpellCooldown(m_spellProto->Id, true);
+ player->AddSpellCooldown(m_spellProto->Id, 0, uint32(time(NULL) + aurEff->GetAmount()));
+
+ WorldPacket data(SMSG_SPELL_COOLDOWN, 8+1+4+4);
+ data << uint64(player->GetGUID());
+ data << uint8(0x0); // flags (0x1, 0x2)
+ data << uint32(m_spellProto->Id);
+ data << uint32(aurEff->GetAmount()*IN_MILISECONDS);
+ player->SendDirectMessage(&data);
+ }
+ }
+ }
}
void AuraEffect::PeriodicTick()