All pastes #675368 Raw Edit

Miscellany

public text v1 · immutable
#675368 ·published 2007-08-30 01:40 UTC
rendered paste body
Index: src/game/SpellAuras.cpp
===================================================================
--- src/game/SpellAuras.cpp	(revision 4412)
+++ src/game/SpellAuras.cpp	(working copy)
@@ -2115,6 +2115,11 @@
     {
         m_target->m_stealthvalue = m_modifier.m_amount;
 
+        // drop flag at stealth in bg
+        if(Real && m_target->GetTypeId()==TYPEID_PLAYER && ((Player*)m_target)->InBattleGround())
+            if(BattleGround *bg = sBattleGroundMgr.GetBattleGround(((Player*)m_target)->GetBattleGroundId()))
+                bg->HandleDropFlag((Player*)m_target);
+
         // not apply flag for RACE_NIGHTELF stealth
         if(GetId()!=20580)
             m_target->SetFlag(UNIT_FIELD_BYTES_1, PLAYER_STATE_FLAG_CREEP);
@@ -2189,6 +2194,11 @@
     {
         m_target->m_invisibilityvalue = m_modifier.m_amount;
 
+        // drop flag at invisible in bg
+        if(Real && m_target->GetTypeId()==TYPEID_PLAYER && ((Player*)m_target)->InBattleGround())
+            if(BattleGround *bg = sBattleGroundMgr.GetBattleGround(((Player*)m_target)->GetBattleGroundId()))
+                bg->HandleDropFlag((Player*)m_target);
+
         // only at real aura add
         if(Real)
         {