Fix build (gcc) and fix warnings
This commit is contained in:
@@ -482,7 +482,7 @@ void SmartScript::ProcessAction(SmartScriptHolder& e, Unit* unit, uint32 var0, u
|
|||||||
if (!(e.action.cast.flags & SMARTCAST_AURA_NOT_PRESENT) || !(*itr)->ToUnit()->HasAura(e.action.cast.spell))
|
if (!(e.action.cast.flags & SMARTCAST_AURA_NOT_PRESENT) || !(*itr)->ToUnit()->HasAura(e.action.cast.spell))
|
||||||
me->CastSpell((*itr)->ToUnit(), e.action.cast.spell, (e.action.cast.flags & SMARTCAST_TRIGGERED) ? true : false);
|
me->CastSpell((*itr)->ToUnit(), e.action.cast.spell, (e.action.cast.flags & SMARTCAST_TRIGGERED) ? true : false);
|
||||||
else
|
else
|
||||||
sLog->outDebug(LOG_FILTER_DATABASE_AI, "Spell %u not casted because it has flag SMARTCAST_AURA_NOT_PRESENT and the target (Guid: %u Entry: %u Type: %u) already has the aura", e.action.cast.spell, (*itr)->GetGUID(), (*itr)->GetEntry(), uint32((*itr)->GetTypeId()));
|
sLog->outDebug(LOG_FILTER_DATABASE_AI, "Spell %u not casted because it has flag SMARTCAST_AURA_NOT_PRESENT and the target (Guid: " UI64FMTD " Entry: %u Type: %u) already has the aura", e.action.cast.spell, (*itr)->GetGUID(), (*itr)->GetEntry(), uint32((*itr)->GetTypeId()));
|
||||||
sLog->outDebug(LOG_FILTER_DATABASE_AI, "SmartScript::ProcessAction:: SMART_ACTION_CAST:: Creature %u casts spell %u on target %u with castflags %u",
|
sLog->outDebug(LOG_FILTER_DATABASE_AI, "SmartScript::ProcessAction:: SMART_ACTION_CAST:: Creature %u casts spell %u on target %u with castflags %u",
|
||||||
me->GetGUIDLow(), e.action.cast.spell, (*itr)->GetGUIDLow(), e.action.cast.flags);
|
me->GetGUIDLow(), e.action.cast.spell, (*itr)->GetGUIDLow(), e.action.cast.flags);
|
||||||
}
|
}
|
||||||
@@ -511,7 +511,7 @@ void SmartScript::ProcessAction(SmartScriptHolder& e, Unit* unit, uint32 var0, u
|
|||||||
if (!(e.action.cast.flags & SMARTCAST_AURA_NOT_PRESENT) || !(*itr)->ToUnit()->HasAura(e.action.cast.spell))
|
if (!(e.action.cast.flags & SMARTCAST_AURA_NOT_PRESENT) || !(*itr)->ToUnit()->HasAura(e.action.cast.spell))
|
||||||
tempLastInvoker->CastSpell((*itr)->ToUnit(), e.action.cast.spell, (e.action.cast.flags & SMARTCAST_TRIGGERED) ? true : false);
|
tempLastInvoker->CastSpell((*itr)->ToUnit(), e.action.cast.spell, (e.action.cast.flags & SMARTCAST_TRIGGERED) ? true : false);
|
||||||
else
|
else
|
||||||
sLog->outDebug(LOG_FILTER_DATABASE_AI, "Spell %u not casted because it has flag SMARTCAST_AURA_NOT_PRESENT and the target (Guid: %u Entry: %u Type: %u) already has the aura", e.action.cast.spell, (*itr)->GetGUID(), (*itr)->GetEntry(), uint32((*itr)->GetTypeId()));
|
sLog->outDebug(LOG_FILTER_DATABASE_AI, "Spell %u not casted because it has flag SMARTCAST_AURA_NOT_PRESENT and the target (Guid: " UI64FMTD " Entry: %u Type: %u) already has the aura", e.action.cast.spell, (*itr)->GetGUID(), (*itr)->GetEntry(), uint32((*itr)->GetTypeId()));
|
||||||
|
|
||||||
sLog->outDebug(LOG_FILTER_DATABASE_AI, "SmartScript::ProcessAction:: SMART_ACTION_INVOKER_CAST: Invoker %u casts spell %u on target %u with castflags %u",
|
sLog->outDebug(LOG_FILTER_DATABASE_AI, "SmartScript::ProcessAction:: SMART_ACTION_INVOKER_CAST: Invoker %u casts spell %u on target %u with castflags %u",
|
||||||
tempLastInvoker->GetGUIDLow(), e.action.cast.spell, (*itr)->GetGUIDLow(), e.action.cast.flags);
|
tempLastInvoker->GetGUIDLow(), e.action.cast.spell, (*itr)->GetGUIDLow(), e.action.cast.flags);
|
||||||
@@ -1576,7 +1576,7 @@ void SmartScript::ProcessAction(SmartScriptHolder& e, Unit* unit, uint32 var0, u
|
|||||||
if (!(e.action.cast.flags & SMARTCAST_AURA_NOT_PRESENT) || !(*it)->ToUnit()->HasAura(e.action.cast.spell))
|
if (!(e.action.cast.flags & SMARTCAST_AURA_NOT_PRESENT) || !(*it)->ToUnit()->HasAura(e.action.cast.spell))
|
||||||
(*itr)->ToUnit()->CastSpell((*it)->ToUnit(), e.action.cast.spell, (e.action.cast.flags & SMARTCAST_TRIGGERED) ? true : false);
|
(*itr)->ToUnit()->CastSpell((*it)->ToUnit(), e.action.cast.spell, (e.action.cast.flags & SMARTCAST_TRIGGERED) ? true : false);
|
||||||
else
|
else
|
||||||
sLog->outDebug(LOG_FILTER_DATABASE_AI, "Spell %u not casted because it has flag SMARTCAST_AURA_NOT_PRESENT and the target (Guid: %u Entry: %u Type: %u) already has the aura", e.action.cast.spell, (*it)->GetGUID(), (*it)->GetEntry(), uint32((*it)->GetTypeId()));
|
sLog->outDebug(LOG_FILTER_DATABASE_AI, "Spell %u not casted because it has flag SMARTCAST_AURA_NOT_PRESENT and the target (Guid: " UI64FMTD " Entry: %u Type: %u) already has the aura", e.action.cast.spell, (*it)->GetGUID(), (*it)->GetEntry(), uint32((*it)->GetTypeId()));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1303,14 +1303,20 @@ bool ConditionMgr::isSourceTypeValid(Condition* cond)
|
|||||||
case TARGET_SELECT_CATEGORY_CONE:
|
case TARGET_SELECT_CATEGORY_CONE:
|
||||||
case TARGET_SELECT_CATEGORY_AREA:
|
case TARGET_SELECT_CATEGORY_AREA:
|
||||||
continue;
|
continue;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
switch (spellInfo->Effects[i].TargetB.GetSelectionCategory())
|
switch (spellInfo->Effects[i].TargetB.GetSelectionCategory())
|
||||||
{
|
{
|
||||||
case TARGET_SELECT_CATEGORY_NEARBY:
|
case TARGET_SELECT_CATEGORY_NEARBY:
|
||||||
case TARGET_SELECT_CATEGORY_CONE:
|
case TARGET_SELECT_CATEGORY_CONE:
|
||||||
case TARGET_SELECT_CATEGORY_AREA:
|
case TARGET_SELECT_CATEGORY_AREA:
|
||||||
continue;
|
continue;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
sLog->outErrorDb("SourceEntry %u SourceGroup %u in `condition` table - spell %u does not have implicit targets of types: _AREA_, _CONE_, _NEARBY_ for effect %u, SourceGroup needs correction, ignoring.", cond->SourceEntry, origGroup, cond->SourceEntry, uint32(i));
|
sLog->outErrorDb("SourceEntry %u SourceGroup %u in `condition` table - spell %u does not have implicit targets of types: _AREA_, _CONE_, _NEARBY_ for effect %u, SourceGroup needs correction, ignoring.", cond->SourceEntry, origGroup, cond->SourceEntry, uint32(i));
|
||||||
cond->SourceGroup &= ~(1<<i);
|
cond->SourceGroup &= ~(1<<i);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -175,7 +175,7 @@ namespace Trinity
|
|||||||
Check &i_check;
|
Check &i_check;
|
||||||
|
|
||||||
WorldObjectSearcher(WorldObject const* searcher, WorldObject* & result, Check& check, uint32 mapTypeMask = GRID_MAP_TYPE_MASK_ALL)
|
WorldObjectSearcher(WorldObject const* searcher, WorldObject* & result, Check& check, uint32 mapTypeMask = GRID_MAP_TYPE_MASK_ALL)
|
||||||
: i_phaseMask(searcher->GetPhaseMask()), i_object(result), i_check(check), i_mapTypeMask(mapTypeMask) {}
|
: i_mapTypeMask(mapTypeMask), i_phaseMask(searcher->GetPhaseMask()), i_object(result), i_check(check) {}
|
||||||
|
|
||||||
void Visit(GameObjectMapType &m);
|
void Visit(GameObjectMapType &m);
|
||||||
void Visit(PlayerMapType &m);
|
void Visit(PlayerMapType &m);
|
||||||
@@ -195,7 +195,7 @@ namespace Trinity
|
|||||||
Check &i_check;
|
Check &i_check;
|
||||||
|
|
||||||
WorldObjectLastSearcher(WorldObject const* searcher, WorldObject* & result, Check& check, uint32 mapTypeMask = GRID_MAP_TYPE_MASK_ALL)
|
WorldObjectLastSearcher(WorldObject const* searcher, WorldObject* & result, Check& check, uint32 mapTypeMask = GRID_MAP_TYPE_MASK_ALL)
|
||||||
: i_phaseMask(searcher->GetPhaseMask()), i_object(result), i_check(check), i_mapTypeMask(mapTypeMask) {}
|
: i_mapTypeMask(mapTypeMask), i_phaseMask(searcher->GetPhaseMask()), i_object(result), i_check(check) {}
|
||||||
|
|
||||||
void Visit(GameObjectMapType &m);
|
void Visit(GameObjectMapType &m);
|
||||||
void Visit(PlayerMapType &m);
|
void Visit(PlayerMapType &m);
|
||||||
@@ -215,7 +215,7 @@ namespace Trinity
|
|||||||
Check& i_check;
|
Check& i_check;
|
||||||
|
|
||||||
WorldObjectListSearcher(WorldObject const* searcher, std::list<WorldObject*> &objects, Check & check, uint32 mapTypeMask = GRID_MAP_TYPE_MASK_ALL)
|
WorldObjectListSearcher(WorldObject const* searcher, std::list<WorldObject*> &objects, Check & check, uint32 mapTypeMask = GRID_MAP_TYPE_MASK_ALL)
|
||||||
: i_phaseMask(searcher->GetPhaseMask()), i_objects(objects), i_check(check), i_mapTypeMask(mapTypeMask) {}
|
: i_mapTypeMask(mapTypeMask), i_phaseMask(searcher->GetPhaseMask()), i_objects(objects), i_check(check) {}
|
||||||
|
|
||||||
void Visit(PlayerMapType &m);
|
void Visit(PlayerMapType &m);
|
||||||
void Visit(CreatureMapType &m);
|
void Visit(CreatureMapType &m);
|
||||||
@@ -234,7 +234,7 @@ namespace Trinity
|
|||||||
Do const& i_do;
|
Do const& i_do;
|
||||||
|
|
||||||
WorldObjectWorker(WorldObject const* searcher, Do const& _do, uint32 mapTypeMask = GRID_MAP_TYPE_MASK_ALL)
|
WorldObjectWorker(WorldObject const* searcher, Do const& _do, uint32 mapTypeMask = GRID_MAP_TYPE_MASK_ALL)
|
||||||
: i_phaseMask(searcher->GetPhaseMask()), i_do(_do), i_mapTypeMask(mapTypeMask) {}
|
: i_mapTypeMask(mapTypeMask), i_phaseMask(searcher->GetPhaseMask()), i_do(_do) {}
|
||||||
|
|
||||||
void Visit(GameObjectMapType &m)
|
void Visit(GameObjectMapType &m)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1544,7 +1544,7 @@ inline GridMap* Map::GetGrid(float x, float y)
|
|||||||
return GridMaps[gx][gy];
|
return GridMaps[gx][gy];
|
||||||
}
|
}
|
||||||
|
|
||||||
float Map::GetWaterOrGroundLevel(float x, float y, float z, float* ground /*= NULL*/, bool swim /*= false*/) const
|
float Map::GetWaterOrGroundLevel(float x, float y, float z, float* ground /*= NULL*/, bool /*swim = false*/) const
|
||||||
{
|
{
|
||||||
if (const_cast<Map*>(this)->GetGrid(x, y))
|
if (const_cast<Map*>(this)->GetGrid(x, y))
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -797,6 +797,9 @@ void Spell::SelectEffectImplicitTargets(SpellEffIndex effIndex, SpellImplicitTar
|
|||||||
GetSpellInfo()->Effects[effIndex].CalcRadius(m_caster) == GetSpellInfo()->Effects[j].CalcRadius(m_caster))
|
GetSpellInfo()->Effects[effIndex].CalcRadius(m_caster) == GetSpellInfo()->Effects[j].CalcRadius(m_caster))
|
||||||
effectMask |= 1 << j;
|
effectMask |= 1 << j;
|
||||||
processedEffectMask |= effectMask;
|
processedEffectMask |= effectMask;
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
switch(targetType.GetSelectionCategory())
|
switch(targetType.GetSelectionCategory())
|
||||||
@@ -917,7 +920,7 @@ void Spell::SelectImplicitNearbyTargets(SpellEffIndex effIndex, SpellImplicitTar
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
float range;
|
float range = 0.0f;
|
||||||
switch (targetType.GetCheckType())
|
switch (targetType.GetCheckType())
|
||||||
{
|
{
|
||||||
case TARGET_CHECK_ENEMY:
|
case TARGET_CHECK_ENEMY:
|
||||||
@@ -941,7 +944,7 @@ void Spell::SelectImplicitNearbyTargets(SpellEffIndex effIndex, SpellImplicitTar
|
|||||||
ConditionList* condList = m_spellInfo->Effects[effIndex].ImplicitTargetConditions;
|
ConditionList* condList = m_spellInfo->Effects[effIndex].ImplicitTargetConditions;
|
||||||
|
|
||||||
// handle emergency case - try to use other provided targets if no conditions provided
|
// handle emergency case - try to use other provided targets if no conditions provided
|
||||||
if (targetType.GetCheckType() == TARGET_CHECK_ENTRY && !condList || condList->empty())
|
if (targetType.GetCheckType() == TARGET_CHECK_ENTRY && (!condList || condList->empty()))
|
||||||
{
|
{
|
||||||
sLog->outDebug(LOG_FILTER_SPELLS_AURAS, "Spell::SelectImplicitNearbyTargets: no conditions entry for target with TARGET_CHECK_ENTRY of spell ID %u, effect %u - selecting default targets", m_spellInfo->Id, effIndex);
|
sLog->outDebug(LOG_FILTER_SPELLS_AURAS, "Spell::SelectImplicitNearbyTargets: no conditions entry for target with TARGET_CHECK_ENTRY of spell ID %u, effect %u - selecting default targets", m_spellInfo->Id, effIndex);
|
||||||
switch (targetType.GetObjectType())
|
switch (targetType.GetObjectType())
|
||||||
@@ -1383,6 +1386,8 @@ void Spell::SelectImplicitCasterDestTargets(SpellEffIndex effIndex, SpellImplici
|
|||||||
m_targets.SetDst(x, y, z, m_caster->GetOrientation());
|
m_targets.SetDst(x, y, z, m_caster->GetOrientation());
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
default:
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
float dist;
|
float dist;
|
||||||
@@ -1416,6 +1421,8 @@ void Spell::SelectImplicitTargetDestTargets(SpellEffIndex effIndex, SpellImplici
|
|||||||
case TARGET_DEST_TARGET_ANY:
|
case TARGET_DEST_TARGET_ANY:
|
||||||
m_targets.SetDst(*target);
|
m_targets.SetDst(*target);
|
||||||
return;
|
return;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
float angle = targetType.CalcDirectionAngle();
|
float angle = targetType.CalcDirectionAngle();
|
||||||
@@ -1444,6 +1451,8 @@ void Spell::SelectImplicitDestDestTargets(SpellEffIndex effIndex, SpellImplicitT
|
|||||||
case TARGET_DEST_TRAJ:
|
case TARGET_DEST_TRAJ:
|
||||||
SelectImplicitTrajTargets();
|
SelectImplicitTrajTargets();
|
||||||
return;
|
return;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
float angle = targetType.CalcDirectionAngle();
|
float angle = targetType.CalcDirectionAngle();
|
||||||
@@ -1492,6 +1501,8 @@ void Spell::SelectImplicitCasterObjectTargets(SpellEffIndex effIndex, SpellImpli
|
|||||||
if (Unit *unit = m_caster->GetVehicleKit()->GetPassenger(targetType.GetTarget() - TARGET_UNIT_PASSENGER_0))
|
if (Unit *unit = m_caster->GetVehicleKit()->GetPassenger(targetType.GetTarget() - TARGET_UNIT_PASSENGER_0))
|
||||||
AddUnitTarget(unit, 1 << effIndex);
|
AddUnitTarget(unit, 1 << effIndex);
|
||||||
break;
|
break;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1778,6 +1789,8 @@ uint32 Spell::GetSearcherTypeMask(SpellTargetObjectTypes objType, ConditionList*
|
|||||||
case TARGET_OBJECT_TYPE_GOBJ_ITEM:
|
case TARGET_OBJECT_TYPE_GOBJ_ITEM:
|
||||||
retMask &= GRID_MAP_TYPE_MASK_GAMEOBJECT;
|
retMask &= GRID_MAP_TYPE_MASK_GAMEOBJECT;
|
||||||
break;
|
break;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
if (!(m_spellInfo->AttributesEx2 & SPELL_ATTR2_CAN_TARGET_DEAD))
|
if (!(m_spellInfo->AttributesEx2 & SPELL_ATTR2_CAN_TARGET_DEAD))
|
||||||
retMask &= ~GRID_MAP_TYPE_MASK_CORPSE;
|
retMask &= ~GRID_MAP_TYPE_MASK_CORPSE;
|
||||||
@@ -7211,7 +7224,7 @@ namespace Trinity
|
|||||||
|
|
||||||
WorldObjectSpellTargetCheck::WorldObjectSpellTargetCheck(Unit* caster, Unit* referer, SpellInfo const* spellInfo,
|
WorldObjectSpellTargetCheck::WorldObjectSpellTargetCheck(Unit* caster, Unit* referer, SpellInfo const* spellInfo,
|
||||||
SpellTargetCheckTypes selectionType, ConditionList* condList) : _caster(caster), _referer(referer), _spellInfo(spellInfo),
|
SpellTargetCheckTypes selectionType, ConditionList* condList) : _caster(caster), _referer(referer), _spellInfo(spellInfo),
|
||||||
_condList(condList), _targetSelectionType(selectionType)
|
_targetSelectionType(selectionType), _condList(condList)
|
||||||
{
|
{
|
||||||
if (condList)
|
if (condList)
|
||||||
_condSrcInfo = new ConditionSourceInfo(NULL, caster);
|
_condSrcInfo = new ConditionSourceInfo(NULL, caster);
|
||||||
|
|||||||
@@ -675,7 +675,7 @@ namespace Trinity
|
|||||||
|
|
||||||
WorldObjectSpellTargetCheck(Unit* caster, Unit* referer, SpellInfo const* spellInfo,
|
WorldObjectSpellTargetCheck(Unit* caster, Unit* referer, SpellInfo const* spellInfo,
|
||||||
SpellTargetCheckTypes selectionType, ConditionList* condList);
|
SpellTargetCheckTypes selectionType, ConditionList* condList);
|
||||||
WorldObjectSpellTargetCheck::~WorldObjectSpellTargetCheck();
|
~WorldObjectSpellTargetCheck();
|
||||||
bool operator()(WorldObject* target);
|
bool operator()(WorldObject* target);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -1581,10 +1581,10 @@ SpellCastResult SpellInfo::CheckTarget(Unit const* caster, WorldObject const* ta
|
|||||||
if (!(AttributesEx6 & SPELL_ATTR6_CAN_TARGET_INVISIBLE) && !caster->canSeeOrDetect(target, implicit))
|
if (!(AttributesEx6 & SPELL_ATTR6_CAN_TARGET_INVISIBLE) && !caster->canSeeOrDetect(target, implicit))
|
||||||
return SPELL_FAILED_BAD_TARGETS;
|
return SPELL_FAILED_BAD_TARGETS;
|
||||||
|
|
||||||
Unit const* unitTarget;
|
Unit const* unitTarget = target->ToUnit();
|
||||||
|
|
||||||
// creature/player specific target checks
|
// creature/player specific target checks
|
||||||
if (unitTarget = target->ToUnit())
|
if (unitTarget)
|
||||||
{
|
{
|
||||||
if (AttributesEx & SPELL_ATTR1_CANT_TARGET_IN_COMBAT && unitTarget->isInCombat())
|
if (AttributesEx & SPELL_ATTR1_CANT_TARGET_IN_COMBAT && unitTarget->isInCombat())
|
||||||
return SPELL_FAILED_TARGET_AFFECTING_COMBAT;
|
return SPELL_FAILED_TARGET_AFFECTING_COMBAT;
|
||||||
|
|||||||
@@ -736,6 +736,7 @@ class spell_dk_death_coil : public SpellScriptLoader
|
|||||||
int32 damage = GetEffectValue();
|
int32 damage = GetEffectValue();
|
||||||
Unit* caster = GetCaster();
|
Unit* caster = GetCaster();
|
||||||
if (Unit* target = GetHitUnit())
|
if (Unit* target = GetHitUnit())
|
||||||
|
{
|
||||||
if (caster->IsFriendlyTo(target))
|
if (caster->IsFriendlyTo(target))
|
||||||
{
|
{
|
||||||
int32 bp = int32(damage * 1.5f);
|
int32 bp = int32(damage * 1.5f);
|
||||||
@@ -743,6 +744,7 @@ class spell_dk_death_coil : public SpellScriptLoader
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
caster->CastCustomSpell(target, SPELL_DEATH_COIL_DAMAGE, &damage, NULL, NULL, true);
|
caster->CastCustomSpell(target, SPELL_DEATH_COIL_DAMAGE, &damage, NULL, NULL, true);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void Register()
|
void Register()
|
||||||
@@ -770,9 +772,7 @@ class spell_dk_death_grip : public SpellScriptLoader
|
|||||||
void HandleDummy(SpellEffIndex effIndex)
|
void HandleDummy(SpellEffIndex effIndex)
|
||||||
{
|
{
|
||||||
int32 damage = GetEffectValue();
|
int32 damage = GetEffectValue();
|
||||||
Spell* baseSpell = GetSpell();
|
|
||||||
Position pos;
|
Position pos;
|
||||||
Unit* caster = GetCaster();
|
|
||||||
if (Unit* target = GetHitUnit())
|
if (Unit* target = GetHitUnit())
|
||||||
{
|
{
|
||||||
GetSummonPosition(effIndex, pos, 0.0f, 0);
|
GetSummonPosition(effIndex, pos, 0.0f, 0);
|
||||||
|
|||||||
@@ -1084,7 +1084,7 @@ class spell_gen_seaforium_blast : public SpellScriptLoader
|
|||||||
// but in effect handling OriginalCaster can become NULL
|
// but in effect handling OriginalCaster can become NULL
|
||||||
if (Unit* originalCaster = GetOriginalCaster())
|
if (Unit* originalCaster = GetOriginalCaster())
|
||||||
if (GameObject* go = GetHitGObj())
|
if (GameObject* go = GetHitGObj())
|
||||||
if (GetHitGObj()->GetGOInfo()->type == GAMEOBJECT_TYPE_DESTRUCTIBLE_BUILDING)
|
if (go->GetGOInfo()->type == GAMEOBJECT_TYPE_DESTRUCTIBLE_BUILDING)
|
||||||
originalCaster->CastSpell(originalCaster, SPELL_PLANT_CHARGES_CREDIT_ACHIEVEMENT, true);
|
originalCaster->CastSpell(originalCaster, SPELL_PLANT_CHARGES_CREDIT_ACHIEVEMENT, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -221,10 +221,12 @@ class spell_item_gnomish_death_ray : public SpellScriptLoader
|
|||||||
{
|
{
|
||||||
Unit* caster = GetCaster();
|
Unit* caster = GetCaster();
|
||||||
if (Unit* target = GetHitUnit())
|
if (Unit* target = GetHitUnit())
|
||||||
|
{
|
||||||
if (urand(0, 99) < 15)
|
if (urand(0, 99) < 15)
|
||||||
caster->CastSpell(caster, SPELL_GNOMISH_DEATH_RAY_SELF, true, NULL); // failure
|
caster->CastSpell(caster, SPELL_GNOMISH_DEATH_RAY_SELF, true, NULL); // failure
|
||||||
else
|
else
|
||||||
caster->CastSpell(target, SPELL_GNOMISH_DEATH_RAY_TARGET, true, NULL);
|
caster->CastSpell(target, SPELL_GNOMISH_DEATH_RAY_TARGET, true, NULL);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void Register()
|
void Register()
|
||||||
@@ -1290,10 +1292,12 @@ class spell_item_nigh_invulnerability : public SpellScriptLoader
|
|||||||
{
|
{
|
||||||
Unit* caster = GetCaster();
|
Unit* caster = GetCaster();
|
||||||
if (Item* castItem = GetCastItem())
|
if (Item* castItem = GetCastItem())
|
||||||
|
{
|
||||||
if (roll_chance_i(86)) // Nigh-Invulnerability - success
|
if (roll_chance_i(86)) // Nigh-Invulnerability - success
|
||||||
caster->CastSpell(caster, SPELL_NIGH_INVULNERABILITY, true, castItem);
|
caster->CastSpell(caster, SPELL_NIGH_INVULNERABILITY, true, castItem);
|
||||||
else // Complete Vulnerability - backfire in 14% casts
|
else // Complete Vulnerability - backfire in 14% casts
|
||||||
caster->CastSpell(caster, SPELL_COMPLETE_VULNERABILITY, true, castItem);
|
caster->CastSpell(caster, SPELL_COMPLETE_VULNERABILITY, true, castItem);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void Register()
|
void Register()
|
||||||
|
|||||||
@@ -255,7 +255,7 @@ class spell_pri_reflective_shield_trigger : public SpellScriptLoader
|
|||||||
if (dmgInfo.GetAttacker() == target)
|
if (dmgInfo.GetAttacker() == target)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (Unit* caster = GetCaster())
|
if (GetCaster())
|
||||||
if (AuraEffect* talentAurEff = target->GetAuraEffectOfRankedSpell(PRIEST_SPELL_REFLECTIVE_SHIELD_R1, EFFECT_0))
|
if (AuraEffect* talentAurEff = target->GetAuraEffectOfRankedSpell(PRIEST_SPELL_REFLECTIVE_SHIELD_R1, EFFECT_0))
|
||||||
{
|
{
|
||||||
int32 bp = CalculatePctN(absorbAmount, talentAurEff->GetAmount());
|
int32 bp = CalculatePctN(absorbAmount, talentAurEff->GetAmount());
|
||||||
|
|||||||
@@ -325,12 +325,14 @@ class spell_warl_soulshatter : public SpellScriptLoader
|
|||||||
{
|
{
|
||||||
Unit* caster = GetCaster();
|
Unit* caster = GetCaster();
|
||||||
if (Unit* target = GetHitUnit())
|
if (Unit* target = GetHitUnit())
|
||||||
|
{
|
||||||
if (target->CanHaveThreatList() && target->getThreatManager().getThreat(caster) > 0.0f)
|
if (target->CanHaveThreatList() && target->getThreatManager().getThreat(caster) > 0.0f)
|
||||||
{
|
{
|
||||||
sLog->outString("THREATREDUCTION");
|
sLog->outString("THREATREDUCTION");
|
||||||
caster->CastSpell(target, SPELL_SOULSHATTER, true);
|
caster->CastSpell(target, SPELL_SOULSHATTER, true);
|
||||||
} else
|
} else
|
||||||
sLog->outString("can have threat? %b . threat number? %f ",target->CanHaveThreatList(),target->getThreatManager().getThreat(caster));
|
sLog->outString("can have threat? %u . threat number? %f ",target->CanHaveThreatList(),target->getThreatManager().getThreat(caster));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void Register()
|
void Register()
|
||||||
|
|||||||
Reference in New Issue
Block a user