All pastes #959369 Raw Edit

Something

public text v1 · immutable
#959369 ·published 2008-03-27 12:13 UTC
rendered paste body
Index: Player.cpp
===================================================================
--- Player.cpp	(revision 5492)
+++ Player.cpp	(working copy)
@@ -15204,6 +15204,7 @@
     data << GetGUID();
     data << uint8(0x0);
     time_t curTime = time(NULL);
+    int32 duration;
     for(PlayerSpellMap::const_iterator itr = m_spells.begin(); itr != m_spells.end(); ++itr)
     {
         if (itr->second->state == PLAYERSPELL_REMOVED)
@@ -15215,6 +15216,9 @@
             ASSERT(spellInfo);
             continue;
         }
+        duration = GetSpellDuration(spellInfo);
+        if( duration < 0 || uint32(duration) > GetSpellRecoveryTime(spellInfo) )
+            continue;
         if(idSchool == SpellSchools(spellInfo->School) && GetSpellCooldownDelay(unSpellId) < unTimeMs )
         {
             data << unSpellId;