All pastes #731830 Raw Edit

Miscellany

public text v1 · immutable
·published 2007-10-10 13:02 UTC
rendered paste body
Index: src/game/Player.cpp
===================================================================
--- src/game/Player.cpp	(revision 4582)
+++ src/game/Player.cpp	(working copy)
@@ -14641,6 +14641,12 @@
 
 void Player::AddSpellCooldown(uint32 spellid, uint32 itemid, time_t end_time)
 {
+    if(!sSpellStore.LookupEntry(spellid)
+    {
+        sLog.outError("Spell cooldown for not existed spell '%u' not added!", spellid);
+        return;
+    }
+
     SpellCooldown sc;
     sc.end = end_time;
     sc.itemid = itemid;