Merge commit '2478bbcdb8f44c575714ae2f45aeef4a37556fc2' into 4.3.4

Conflicts:
	sql/updates/world/2015_02_12_00_world.sql
	sql/updates/world/2015_02_12_01_world.sql
	sql/updates/world/2015_02_12_02_world.sql
	sql/updates/world/2015_02_12_03_world.sql
	sql/updates/world/2015_02_12_04_world.sql
	sql/updates/world/2015_02_12_05_world.sql
	sql/updates/world/2015_02_12_06_world.sql
	sql/updates/world/2015_02_12_07_world.sql
	sql/updates/world/2015_02_12_08_world.sql
	sql/updates/world/2015_02_12_09_world.sql
	sql/updates/world/2015_02_12_10_world.sql
	sql/updates/world/2015_02_13_00_world.sql
	sql/updates/world/2015_02_13_02_world.sql
	src/server/scripts/EasternKingdoms/zone_redridge_mountains.cpp
	src/server/scripts/Kalimdor/zone_mulgore.cpp
This commit is contained in:
Carbenium committed 2015-07-21 22:07:47 +02:00
commit 78da5d8e7e
11 files changed
+210 -200

No files matched your search

+32 -4
View File
@@ -4244,7 +4244,7 @@ void Player::RemoveSpellCategoryCooldown(uint32 cat, bool update /* = false */)
void Player::RemoveArenaSpellCooldowns(bool removeActivePetCooldowns)
{
// remove cooldowns on spells that have <= 10 min CD
// remove cooldowns on spells that have < 10 min CD
SpellCooldowns::iterator itr, next;
for (itr = m_spellCooldowns.begin(); itr != m_spellCooldowns.end(); itr = next)
@@ -4252,10 +4252,10 @@ void Player::RemoveArenaSpellCooldowns(bool removeActivePetCooldowns)
next = itr;
++next;
SpellInfo const* entry = sSpellMgr->GetSpellInfo(itr->first);
// check if spellentry is present and if the cooldown is less or equal to 10 min
// check if spellentry is present and if the cooldown is less than 10 min
if (entry &&
entry->RecoveryTime <= 10 * MINUTE * IN_MILLISECONDS &&
entry->CategoryRecoveryTime <= 10 * MINUTE * IN_MILLISECONDS)
entry->RecoveryTime < 10 * MINUTE * IN_MILLISECONDS &&
entry->CategoryRecoveryTime < 10 * MINUTE * IN_MILLISECONDS)
{
// remove & notify
RemoveSpellCooldown(itr->first, true);
@@ -22693,6 +22693,34 @@ void Player::SendCooldownEvent(SpellInfo const* spellInfo, uint32 itemId /*= 0*/
data << uint32(spellInfo->Id);
data << uint64(GetGUID());
SendDirectMessage(&data);
uint32 cat = spellInfo->GetCategory();
if (cat && spellInfo->CategoryRecoveryTime)
{
SpellCategoryStore::const_iterator ct = sSpellsByCategoryStore.find(cat);
if (ct != sSpellsByCategoryStore.end())
{
SpellCategorySet const& catSet = ct->second;
for (SpellCooldowns::const_iterator i = m_spellCooldowns.begin(); i != m_spellCooldowns.end(); ++i)
{
if (i->first == spellInfo->Id) // skip main spell, already handled above
continue;
SpellInfo const* spellInfo2 = sSpellMgr->GetSpellInfo(i->first);
if (!spellInfo2 || !spellInfo2->IsCooldownStartedOnEvent())
continue;
if (catSet.find(i->first) != catSet.end())
{
// Send activate cooldown timer (possible 0) at client side
WorldPacket data(SMSG_COOLDOWN_EVENT, 4 + 8);
data << uint32(i->first);
data << uint64(GetGUID());
SendDirectMessage(&data);
}
}
}
}
}
void Player::UpdatePotionCooldown(Spell* spell)