Draenei inspiring presence bug?

Fixed/closed bug reports are moved to this board in archival state. Also contains all the original bug reports from the past years.
Locked
Saltskin
Posts: 5

Draenei inspiring presence bug?

Post by Saltskin »

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.
Saltskin
Posts: 5

Re: Draenei inspiring presence bug?

Post by Saltskin »

Any response?
User avatar
Exsurgo
Game Master
Game Master
Posts: 558

Re: Draenei inspiring presence bug?

Post by Exsurgo »

I will have a look at this is soon as I can. I have a rather large amount of bugs on my plate as of present. It is possible that the aura provided by Inspiring presence is active but simply not displayed on the character panel. You could test this on a target dummy using a melee class and gearing/gemming for 1% under the hit cap.
Retired Developer.
itslovelolx
Posts: 7

Re: Draenei inspiring presence bug?

Post by itslovelolx »

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; }
You'll probably need to hardcode the part where I define alwaysShowBuff, since I use my own codepart for it to keep the code more clean (also when there is no general check for them)

Code: Select all

case 6562:  //Heroic Presence (Racial Passive)
case 28878: // Inspiring Presence (Racial Passive)
case 23034: // Battle Standard
case 23035: // Battle Standard
Locked

Who is online

Users browsing this forum: No registered users and 1 guest