Merge branch '3.3.5' into 4.3.4

Conflicts:
	.gitattributes
	dep/PackageList.txt
	sql/base/characters_database.sql
	sql/updates/world/2015_06_26_01_world_2015_05_15_00.sql
	sql/updates/world/2015_07_01_03_world_335.sql
	src/server/game/DungeonFinding/LFGMgr.cpp
	src/server/game/Entities/GameObject/GameObject.h
	src/server/game/Entities/Player/Player.cpp
	src/server/game/Entities/Unit/Unit.cpp
	src/server/game/Globals/ObjectMgr.cpp
	src/server/game/Handlers/QueryHandler.cpp
	src/server/game/Miscellaneous/Language.h
	src/server/game/Quests/QuestDef.cpp
	src/server/game/Spells/Spell.cpp
	src/server/game/Spells/SpellEffects.cpp
	src/server/game/Spells/SpellMgr.cpp
	src/server/scripts/Commands/cs_rbac.cpp
	src/server/scripts/Northrend/VioletHold/boss_zuramat.cpp
	src/server/scripts/Spells/spell_quest.cpp
	src/server/shared/Database/Implementation/CharacterDatabase.cpp
	src/server/shared/Database/Implementation/WorldDatabase.cpp
This commit is contained in:
Carbenium committed 2015-07-22 02:26:46 +02:00
commit 293658fb13
100 files changed
+79037 -77341

No files matched your search

+50 -8
View File
@@ -1706,6 +1706,13 @@ void Unit::CalcAbsorbResist(Unit* victim, SpellSchoolMask schoolMask, DamageEffe
{
// We're going to call functions which can modify content of the list during iteration over it's elements
// Let's copy the list so we can prevent iterator invalidation
// check if caster is immune to damage
if (caster->IsImmunedToDamage(schoolMask))
{
victim->SendSpellMiss(caster, (*itr)->GetSpellInfo()->Id, SPELL_MISS_IMMUNE);
continue;
}
AuraEffectList vSplitDamagePctCopy(victim->GetAuraEffectsByType(SPELL_AURA_SPLIT_DAMAGE_PCT));
for (AuraEffectList::iterator itr = vSplitDamagePctCopy.begin(); itr != vSplitDamagePctCopy.end() && dmgInfo.GetDamage() > 0; ++itr)
{
@@ -1731,6 +1738,14 @@ void Unit::CalcAbsorbResist(Unit* victim, SpellSchoolMask schoolMask, DamageEffe
splitDamage = RoundToInterval(splitDamage, uint32(0), uint32(dmgInfo.GetDamage()));
dmgInfo.AbsorbDamage(splitDamage);
// check if caster is immune to damage
if (caster->IsImmunedToDamage(schoolMask))
{
victim->SendSpellMiss(caster, (*itr)->GetSpellInfo()->Id, SPELL_MISS_IMMUNE);
continue;
}
uint32 split_absorb = 0;
DealDamageMods(caster, splitDamage, &split_absorb);
@@ -9567,6 +9582,26 @@ bool Unit::IsImmunedToSpell(SpellInfo const* spellInfo) const
return false;
}
uint32 Unit::GetSchoolImmunityMask() const
{
uint32 mask = 0;
SpellImmuneList const& mechanicList = m_spellImmune[IMMUNITY_SCHOOL];
for (SpellImmuneList::const_iterator itr = mechanicList.begin(); itr != mechanicList.end(); ++itr)
mask |= itr->type;
return mask;
}
uint32 Unit::GetMechanicImmunityMask() const
{
uint32 mask = 0;
SpellImmuneList const& mechanicList = m_spellImmune[IMMUNITY_MECHANIC];
for (SpellImmuneList::const_iterator itr = mechanicList.begin(); itr != mechanicList.end(); ++itr)
mask |= (1 << itr->type);
return mask;
}
bool Unit::IsImmunedToSpellEffect(SpellInfo const* spellInfo, uint32 index) const
{
if (!spellInfo || !spellInfo->Effects[index].IsEffect())
@@ -10709,6 +10744,13 @@ void Unit::UpdateSpeed(UnitMoveType mtype, bool forced)
/// @todo possible affect only on MOVE_RUN
if (int32 normalization = GetMaxPositiveAuraModifier(SPELL_AURA_USE_NORMAL_MOVEMENT_SPEED))
{
if (Creature* creature = ToCreature())
{
uint32 immuneMask = creature->GetCreatureTemplate()->MechanicImmuneMask;
if (immuneMask & (1 << MECHANIC_SNARE) || immuneMask & (1 << MECHANIC_DAZE))
break;
}
// Use speed from aura
float max_speed = normalization / (IsControlledByPlayer() ? playerBaseMoveSpeed[mtype] : baseMoveSpeed[mtype]);
if (speed > max_speed)
@@ -10730,15 +10772,15 @@ void Unit::UpdateSpeed(UnitMoveType mtype, bool forced)
// Apply strongest slow aura mod to speed
int32 slow = GetMaxNegativeAuraModifier(SPELL_AURA_MOD_DECREASE_SPEED);
if (slow)
{
AddPct(speed, slow);
if (float minSpeedMod = (float)GetMaxPositiveAuraModifier(SPELL_AURA_MOD_MINIMUM_SPEED))
{
float min_speed = minSpeedMod / 100.0f;
if (speed < min_speed)
speed = min_speed;
}
if (float minSpeedMod = (float)GetMaxPositiveAuraModifier(SPELL_AURA_MOD_MINIMUM_SPEED))
{
float min_speed = minSpeedMod / 100.0f;
if (speed < min_speed)
speed = min_speed;
}
SetSpeed(mtype, speed, forced);
}
@@ -14846,7 +14888,7 @@ void Unit::KnockbackFrom(float x, float y, float speedXY, float speedZ)
float vcos, vsin;
GetSinCos(x, y, vsin, vcos);
SendMoveKnockBack(player, speedXY, -speedZ, vcos, vsin);
if (player->HasAuraType(SPELL_AURA_MOD_INCREASE_MOUNTED_FLIGHT_SPEED) || player->HasAuraType(SPELL_AURA_FLY))
player->SetCanFly(true, true);
}