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:
commit
293658fb13
100 files changed
+79037
-77341
No files matched your search
@@ -3762,6 +3762,10 @@ void Spell::SendSpellStart()
|
||||
//TC_LOG_DEBUG("spells", "Sending SMSG_SPELL_START id=%u", m_spellInfo->Id);
|
||||
|
||||
uint32 castFlags = CAST_FLAG_HAS_TRAJECTORY;
|
||||
uint32 schoolImmunityMask = m_caster->GetSchoolImmunityMask();
|
||||
uint32 mechanicImmunityMask = m_caster->GetMechanicImmunityMask();
|
||||
if (schoolImmunityMask || mechanicImmunityMask)
|
||||
castFlags |= CAST_FLAG_IMMUNITY;
|
||||
|
||||
if ((IsTriggered() && !m_spellInfo->IsAutoRepeatRangedSpell()) || m_triggeredByAuraSpell)
|
||||
castFlags |= CAST_FLAG_PENDING;
|
||||
@@ -3818,8 +3822,8 @@ void Spell::SendSpellStart()
|
||||
|
||||
if (castFlags & CAST_FLAG_PROJECTILE)
|
||||
{
|
||||
data << uint32(0); // Ammo display ID
|
||||
data << uint32(0); // Inventory Type
|
||||
data << uint32(schoolImmunityMask);
|
||||
data << uint32(mechanicImmunityMask);
|
||||
}
|
||||
|
||||
if (castFlags & CAST_FLAG_IMMUNITY)
|
||||
@@ -4472,8 +4476,11 @@ void Spell::TakeRunePower(bool didHit)
|
||||
modOwner->ApplySpellMod(m_spellInfo->Id, SPELLMOD_COST, runeCost[i], this);
|
||||
}
|
||||
|
||||
// Let's say we use a skill that requires a Frost rune. This is the order:
|
||||
// - Frost rune
|
||||
// - Death rune, originally a Frost rune
|
||||
// - Death rune, any kind
|
||||
runeCost[RUNE_DEATH] = 0; // calculated later
|
||||
|
||||
for (uint32 i = 0; i < MAX_RUNES; ++i)
|
||||
{
|
||||
RuneType rune = player->GetCurrentRune(i);
|
||||
@@ -4485,8 +4492,32 @@ void Spell::TakeRunePower(bool didHit)
|
||||
}
|
||||
}
|
||||
|
||||
// Find a Death rune where the base rune matches the one we need
|
||||
runeCost[RUNE_DEATH] = runeCost[RUNE_BLOOD] + runeCost[RUNE_UNHOLY] + runeCost[RUNE_FROST];
|
||||
if (runeCost[RUNE_DEATH] > 0)
|
||||
{
|
||||
for (uint32 i = 0; i < MAX_RUNES; ++i)
|
||||
{
|
||||
RuneType rune = player->GetCurrentRune(i);
|
||||
RuneType baseRune = player->GetBaseRune(i);
|
||||
if (!player->GetRuneCooldown(i) && rune == RUNE_DEATH && runeCost[baseRune] > 0)
|
||||
{
|
||||
player->SetRuneCooldown(i, didHit ? player->GetRuneBaseCooldown(i) : uint32(RUNE_MISS_COOLDOWN), true);
|
||||
player->SetLastUsedRune(rune);
|
||||
runeCost[baseRune]--;
|
||||
runeCost[rune]--;
|
||||
|
||||
// keep Death Rune type if missed
|
||||
if (didHit)
|
||||
player->RestoreBaseRune(i);
|
||||
|
||||
if (runeCost[RUNE_DEATH] == 0)
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Grab any Death rune
|
||||
if (runeCost[RUNE_DEATH] > 0)
|
||||
{
|
||||
for (uint32 i = 0; i < MAX_RUNES; ++i)
|
||||
@@ -5123,15 +5154,15 @@ SpellCastResult Spell::CheckCast(bool strict)
|
||||
|
||||
m_preGeneratedPath.SetPathLengthLimit(range);
|
||||
// first try with raycast, if it fails fall back to normal path
|
||||
bool result = m_preGeneratedPath.CalculatePath(target->GetPositionX(), target->GetPositionY(), target->GetPositionZ() + target->GetObjectSize(), false, true);
|
||||
bool result = m_preGeneratedPath.CalculatePath(target->GetPositionX(), target->GetPositionY(), target->GetPositionZ() + target->GetObjectSize() / 2.f, false, true);
|
||||
if (m_preGeneratedPath.GetPathType() & PATHFIND_SHORT)
|
||||
return SPELL_FAILED_OUT_OF_RANGE;
|
||||
else if (!result || m_preGeneratedPath.GetPathType() & PATHFIND_NOPATH)
|
||||
else if (!result || m_preGeneratedPath.GetPathType() & (PATHFIND_NOPATH | PATHFIND_INCOMPLETE))
|
||||
{
|
||||
result = m_preGeneratedPath.CalculatePath(target->GetPositionX(), target->GetPositionY(), target->GetPositionZ() + target->GetObjectSize(), false, false);
|
||||
result = m_preGeneratedPath.CalculatePath(target->GetPositionX(), target->GetPositionY(), target->GetPositionZ() + target->GetObjectSize() / 2.f, false, false);
|
||||
if (m_preGeneratedPath.GetPathType() & PATHFIND_SHORT)
|
||||
return SPELL_FAILED_OUT_OF_RANGE;
|
||||
else if (!result || m_preGeneratedPath.GetPathType() & PATHFIND_NOPATH)
|
||||
else if (!result || m_preGeneratedPath.GetPathType() & (PATHFIND_NOPATH | PATHFIND_INCOMPLETE))
|
||||
return SPELL_FAILED_NOPATH;
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user