rendered paste bodyIndex: Player.cpp
===================================================================
--- Player.cpp (revision 5578)
+++ Player.cpp (working copy)
@@ -15263,10 +15263,6 @@
void Player::ProhibitSpellScholl(SpellSchools idSchool, uint32 unTimeMs )
{
- // last check 2.0.10
- WorldPacket data(SMSG_SPELL_COOLDOWN, 8+1+m_spells.size()*8);
- data << GetGUID();
- data << uint8(0x0);
time_t curTime = time(NULL);
for(PlayerSpellMap::const_iterator itr = m_spells.begin(); itr != m_spells.end(); ++itr)
{
@@ -15281,12 +15277,21 @@
}
if(idSchool == SpellSchools(spellInfo->School) && GetSpellCooldownDelay(unSpellId) < unTimeMs )
{
+ WorldPacket data(SMSG_SPELL_COOLDOWN, 8+8);
+ data << GetGUID();
+ data << uint8(0x0);
data << unSpellId;
- data << unTimeMs; // in m.secs
+ data << unTimeMs;
+ GetSession()->SendPacket(&data);
AddSpellCooldown(unSpellId, 0, curTime + unTimeMs/1000);
+ if( GetSpellDuration(spellInfo) < 0 )
+ {
+ WorldPacket data1(SMSG_COOLDOWN_EVENT, (4+8+4));
+ data1 << uint32(unSpellId) << GetGUID();
+ SendMessageToSet(&data1,true);
+ }
}
}
- GetSession()->SendPacket(&data);
}
void Player::InitDataForForm()