Draenei inspiring presence bug?
Posted: 14 Mar 2013, 10:40
When you are a draenei, the racial buff doesn't appear anywhere. It should appear next to the map, just like any buff, but it doesn't.
Welcome to the Smolderforge Support Community! Go ahead and register a new account or login to a current one already made. Please post in the correct forums and be kind and respectful to others!
http://forums.smolderforge.com/
Code: Select all
# HG changeset patch
# User Itslovelol
# Date 1361781669 -3600
# Node ID c307c7ec1cf9ea235667623c76fd657ea084cc77
# Parent 8605892513227bddcf623197ecb4500a3bcc942b
Implement IsNeedVisibleSlot for filling aura lists.
This will help to fix totem visual buff issue.
Also fixes display of some special cases like Heroic/Inspiring Presence and Battle Standard
void Aura::UpdateAuraDuration()
{
@@ -986,12 +1000,11 @@
((Player*)caster)->AddSpellAndCategoryCooldowns(m_spellProto,castItem ? castItem->GetEntry() : 0, NULL,true);
}
}
-
-
- // passive auras (except totem auras) do not get placed in the slots
- // area auras with SPELL_AURA_NONE are not shown on target
- if ((!m_isPassive && m_spellProto->Effect[GetEffIndex()] != SPELL_EFFECT_APPLY_AREA_AURA_ENEMY))
- {
+
+ // Lookup free slot
+ // will be < MAX_AURAS slot (if find free) with !secondaura
+ if (IsNeedVisibleSlot(caster))
+ {
if (!secondaura) // new slot need
{
// register aura
@@ -6746,6 +6759,35 @@
}
}
+bool Aura::IsNeedVisibleSlot(Player* caster)
+{
+ bool totemAura = caster && caster->GetTypeId() == TYPEID_UNIT && ((Creature*)caster)->isTotem();
+
+ // special case for some spells wich should always been shown in list
+ // Heroic Presence (Racial Passive), Inspiring Presence (Racial Passive), Battle Standard, Battle Standard
+ bool alwaysShowBuff = spellmgr.GetSpellCustomAttr(m_spellProto->Id) & SPELL_ATTR_CU_ALWAYS_SHOW_BUFF;
+
+ for (int i = 0; i < MAX_EFFECT_INDEX; ++i)
+ {
+ if (!m_auras[i])
+ continue;
+
+ // special area auras cases
+ switch (m_spellProto->Effect[i])
+ {
+ case SPELL_EFFECT_APPLY_AREA_AURA_ENEMY:
+ return m_target != caster;
+ case SPELL_EFFECT_APPLY_AREA_AURA_PET:
+ case SPELL_EFFECT_APPLY_AREA_AURA_OWNER:
+ case SPELL_EFFECT_APPLY_AREA_AURA_FRIEND:
+ case SPELL_EFFECT_APPLY_AREA_AURA_PARTY:
+ // passive auras (except totem auras) do not get placed in caster slot
+ return (m_target != caster || totemAura || !m_isPassive || alwaysShowBuff) && GetModifier()->m_auraname != SPELL_AURA_NONE;
+ default:
+ break;
+ }
+ }
+
+ // passive auras (except totem auras) do not get placed in the slots
+ return !m_isPassive || totemAura;
+}
+
void Aura::UnregisterSingleCastAura()
{
if (IsSingleTarget())
@@ -6753,9 +6795,7 @@
Unit* caster = NULL;
caster = GetCaster();
if (caster)
- {
caster->GetSingleCastAuras().remove(this);
- }
else
{
sLog.outError("Couldn't find the caster of the single target aura, may crash later!");
diff -r 8605892513227bddcf623197ecb4500a3bcc942b -r c307c7ec1cf9ea235667623c76fd657ea084cc77 server/src/game/SpellAuras.h
--- a/server/src/game/SpellAuras.h Mon Feb 25 09:06:41 2013 +0100
+++ b/server/src/game/SpellAuras.h Mon Feb 25 09:41:09 2013 +0100
@@ -275,7 +275,8 @@
if (slot < MAX_AURAS && m_procCharges >= 1 && GetSpellProto()->StackAmount==0)
SetAuraApplication(slot, m_procCharges - 1);
}
- bool IsAuraDurationShownToAllies();
+ bool IsAuraDurationShownToAllies();
+ bool IsNeedVisibleSlot(Player *caster);
bool IsPositive() { return m_positive; }
void SetNegative() { m_positive = false; }
Code: Select all
case 6562: //Heroic Presence (Racial Passive)
case 28878: // Inspiring Presence (Racial Passive)
case 23034: // Battle Standard
case 23035: // Battle Standard