Merge branch 'master' of github.com:TrinityCore/TrinityCore into 4.3.4

Conflicts:
	src/server/scripts/Commands/cs_misc.cpp
	src/server/scripts/Events/childrens_week.cpp
	src/server/scripts/Kalimdor/boss_azuregos.cpp
	src/server/scripts/Kalimdor/zone_azshara.cpp
	src/server/scripts/Kalimdor/zone_darkshore.cpp
	src/server/scripts/Kalimdor/zone_durotar.cpp
	src/server/scripts/Kalimdor/zone_moonglade.cpp
	src/server/scripts/Kalimdor/zone_mulgore.cpp
	src/server/scripts/Kalimdor/zone_orgrimmar.cpp
	src/server/scripts/Kalimdor/zone_thousand_needles.cpp
	src/server/scripts/Kalimdor/zone_ungoro_crater.cpp
	src/server/scripts/Northrend/AzjolNerub/Ahnkahet/boss_herald_volazj.cpp
This commit is contained in:
Vincent-Michael committed 2014-09-06 02:41:45 +02:00
commit fe99efd6fa
86 files changed
+1604 -664

No files matched your search

+20
View File
@@ -34,6 +34,7 @@
#include "GameObjectAI.h"
#include "SpellAuraEffects.h"
#include "Player.h"
#include "Config.h"
void WorldSession::HandleClientCastFlags(WorldPacket& recvPacket, uint8 castFlags, SpellCastTargets& targets)
{
@@ -481,6 +482,25 @@ void WorldSession::HandleCancelAuraOpcode(WorldPacket& recvPacket)
// maybe should only remove one buff when there are multiple?
_player->RemoveOwnedAura(spellId, 0, 0, AURA_REMOVE_BY_CANCEL);
// If spell being removed is a resource tracker, see if player was tracking both (herbs / minerals) and remove the other
if (sWorld->getBoolConfig(CONFIG_ALLOW_TRACK_BOTH_RESOURCES) && spellInfo->HasAura(SPELL_AURA_TRACK_RESOURCES))
{
Unit::AuraEffectList const& auraEffects = _player->GetAuraEffectsByType(SPELL_AURA_TRACK_RESOURCES);
if (!auraEffects.empty())
{
// Build list of spell IDs to cancel. Trying to cancel the aura while iterating
// over AuraEffectList caused "incompatible iterator" errors on second pass
std::list<uint32> spellIDs;
for (Unit::AuraEffectList::const_iterator auraEffect = auraEffects.begin(); auraEffect != auraEffects.end(); auraEffect++)
spellIDs.push_back((*auraEffect)->GetId());
// Remove all auras related to resource tracking (only Herbs and Minerals in 3.3.5a)
for (std::list<uint32>::iterator it = spellIDs.begin(); it != spellIDs.end(); it++)
_player->RemoveOwnedAura(*it, 0, 0, AURA_REMOVE_BY_CANCEL);
}
}
}
void WorldSession::HandlePetCancelAuraOpcode(WorldPacket& recvPacket)