mirror of
https://github.com/mangosfour/server.git
synced 2025-12-14 16:37:01 +00:00
Merge branch 'master' into 303
Conflicts: src/game/Player.cpp src/game/Spell.cpp
This commit is contained in:
commit
7974d1cb94
67 changed files with 939 additions and 366 deletions
|
|
@ -346,7 +346,7 @@ Spell::Spell( Unit* Caster, SpellEntry const *info, bool triggered, uint64 origi
|
|||
|
||||
m_powerCost = 0; // setup to correct value in Spell::prepare, don't must be used before.
|
||||
m_casttime = 0; // setup to correct value in Spell::prepare, don't must be used before.
|
||||
m_timer = 0; // will set to castime in preper
|
||||
m_timer = 0; // will set to castime in prepare
|
||||
|
||||
m_needAliveTargetMask = 0;
|
||||
|
||||
|
|
@ -1484,7 +1484,7 @@ void Spell::SetTargetMap(uint32 i,uint32 cur,std::list<Unit*> &TagUnitMap)
|
|||
cell_lock->Visit(cell_lock, world_object_notifier, *MapManager::Instance().GetMap(m_caster->GetMapId(), m_caster));
|
||||
cell_lock->Visit(cell_lock, grid_object_notifier, *MapManager::Instance().GetMap(m_caster->GetMapId(), m_caster));
|
||||
}break;
|
||||
// TARGET_SINGLE_PARTY means that the spells can only be casted on a party member and not on the caster (some sceals, fire shield from imp, etc..)
|
||||
// TARGET_SINGLE_PARTY means that the spells can only be casted on a party member and not on the caster (some seals, fire shield from imp, etc..)
|
||||
case TARGET_SINGLE_PARTY:
|
||||
{
|
||||
Unit *target = m_targets.getUnitTarget();
|
||||
|
|
@ -3267,7 +3267,7 @@ uint8 Spell::CanCast(bool strict)
|
|||
if (target->isInFlight())
|
||||
return SPELL_FAILED_BAD_TARGETS;
|
||||
|
||||
if(VMAP::VMapFactory::checkSpellForLoS(m_spellInfo->Id) && !m_caster->IsWithinLOSInMap(target))
|
||||
if(!m_IsTriggeredSpell && VMAP::VMapFactory::checkSpellForLoS(m_spellInfo->Id) && !m_caster->IsWithinLOSInMap(target))
|
||||
return SPELL_FAILED_LINE_OF_SIGHT;
|
||||
|
||||
// auto selection spell rank implemented in WorldSession::HandleCastSpellOpcode
|
||||
|
|
@ -4056,7 +4056,7 @@ int16 Spell::PetCanCast(Unit* target)
|
|||
if(!m_caster->isAlive())
|
||||
return SPELL_FAILED_CASTER_DEAD;
|
||||
|
||||
if(m_caster->IsNonMeleeSpellCasted(false)) //prevent spellcast interuption by another spellcast
|
||||
if(m_caster->IsNonMeleeSpellCasted(false)) //prevent spellcast interruption by another spellcast
|
||||
return SPELL_FAILED_SPELL_IN_PROGRESS;
|
||||
if(m_caster->isInCombat() && IsNonCombatSpell(m_spellInfo))
|
||||
return SPELL_FAILED_AFFECTING_COMBAT;
|
||||
|
|
@ -4147,7 +4147,7 @@ uint8 Spell::CheckCasterAuras() const
|
|||
else if(m_spellInfo->EffectApplyAuraName[i] == SPELL_AURA_DISPEL_IMMUNITY)
|
||||
dispel_immune |= GetDispellMask(DispelType(m_spellInfo->EffectMiscValue[i]));
|
||||
}
|
||||
//immune movement impairement and loss of control
|
||||
//immune movement impairment and loss of control
|
||||
if(m_spellInfo->Id==(uint32)42292)
|
||||
mechanic_immune = IMMUNE_TO_MOVEMENT_IMPAIRMENT_AND_LOSS_CONTROL_MASK;
|
||||
}
|
||||
|
|
@ -4633,7 +4633,7 @@ uint8 Spell::CheckItems()
|
|||
return SPELL_FAILED_CANT_BE_DISENCHANTED;
|
||||
|
||||
uint32 item_quality = itemProto->Quality;
|
||||
// 2.0.x addon: Check player enchanting level against the item desenchanting requirements
|
||||
// 2.0.x addon: Check player enchanting level against the item disenchanting requirements
|
||||
uint32 item_disenchantskilllevel = itemProto->RequiredDisenchantSkill;
|
||||
if (item_disenchantskilllevel == uint32(-1))
|
||||
return SPELL_FAILED_CANT_BE_DISENCHANTED;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue