Add spaces after commas
This commit is contained in:
@@ -74,7 +74,7 @@ enum AuraType
|
||||
SPELL_AURA_MOD_STEALTH_DETECT = 17,
|
||||
SPELL_AURA_MOD_INVISIBILITY = 18,
|
||||
SPELL_AURA_MOD_INVISIBILITY_DETECT = 19,
|
||||
SPELL_AURA_OBS_MOD_HEALTH = 20, //20,21 unofficial
|
||||
SPELL_AURA_OBS_MOD_HEALTH = 20, //20, 21 unofficial
|
||||
SPELL_AURA_OBS_MOD_POWER = 21,
|
||||
SPELL_AURA_MOD_RESISTANCE = 22,
|
||||
SPELL_AURA_PERIODIC_TRIGGER_SPELL = 23,
|
||||
|
||||
@@ -632,7 +632,7 @@ int32 AuraEffect::CalculateAmount(Unit * caster)
|
||||
uint8 cp = caster->ToPlayer()->GetComboPoints();
|
||||
|
||||
// Idol of Feral Shadows. Cant be handled as SpellMod in SpellAura:Dummy due its dependency from CPs
|
||||
if (AuraEffect const * aurEff = caster->GetAuraEffect(34241,0))
|
||||
if (AuraEffect const * aurEff = caster->GetAuraEffect(34241, 0))
|
||||
amount += cp * aurEff->GetAmount();
|
||||
|
||||
amount += uint32(CalculatePctU(caster->GetTotalAttackPowerValue(BASE_ATTACK), cp));
|
||||
@@ -644,8 +644,8 @@ int32 AuraEffect::CalculateAmount(Unit * caster)
|
||||
// $0.2 * (($MWB + $mwb) / 2 + $AP / 14 * $MWS) bonus per tick
|
||||
float ap = caster->GetTotalAttackPowerValue(BASE_ATTACK);
|
||||
int32 mws = caster->GetAttackTime(BASE_ATTACK);
|
||||
float mwb_min = caster->GetWeaponDamageRange(BASE_ATTACK,MINDAMAGE);
|
||||
float mwb_max = caster->GetWeaponDamageRange(BASE_ATTACK,MAXDAMAGE);
|
||||
float mwb_min = caster->GetWeaponDamageRange(BASE_ATTACK, MINDAMAGE);
|
||||
float mwb_max = caster->GetWeaponDamageRange(BASE_ATTACK, MAXDAMAGE);
|
||||
float mwb = ((mwb_min + mwb_max) / 2 + ap * mws / 14000) * 0.2f;
|
||||
amount += int32(caster->ApplyEffectModifiers(m_spellProto, m_effIndex, mwb));
|
||||
// "If used while your target is above 75% health, Rend does 35% more damage."
|
||||
@@ -1269,7 +1269,7 @@ void AuraEffect::PeriodicTick(AuraApplication * aurApp, Unit * caster) const
|
||||
|
||||
// Consecrate ticks can miss and will not show up in the combat log
|
||||
if (GetSpellProto()->Effect[GetEffIndex()] == SPELL_EFFECT_PERSISTENT_AREA_AURA &&
|
||||
caster->SpellHitResult(target,GetSpellProto(),false) != SPELL_MISS_NONE)
|
||||
caster->SpellHitResult(target, GetSpellProto(), false) != SPELL_MISS_NONE)
|
||||
break;
|
||||
|
||||
// Check for immune (not use charges)
|
||||
@@ -1296,7 +1296,7 @@ void AuraEffect::PeriodicTick(AuraApplication * aurApp, Unit * caster) const
|
||||
{
|
||||
uint32 percent =
|
||||
GetEffIndex() < 2 && GetSpellProto()->Effect[GetEffIndex()] == SPELL_EFFECT_DUMMY ?
|
||||
caster->CalculateSpellDamage(target, GetSpellProto(),GetEffIndex()+1) :
|
||||
caster->CalculateSpellDamage(target, GetSpellProto(), GetEffIndex()+1) :
|
||||
100;
|
||||
if (!target->HealthBelowPct(percent))
|
||||
{
|
||||
@@ -1383,9 +1383,9 @@ void AuraEffect::PeriodicTick(AuraApplication * aurApp, Unit * caster) const
|
||||
caster->CalcAbsorbResist(target, GetSpellSchoolMask(GetSpellProto()), DOT, damage, &absorb, &resist, m_spellProto);
|
||||
|
||||
sLog->outDetail("PeriodicTick: %u (TypeId: %u) attacked %u (TypeId: %u) for %u dmg inflicted by %u abs is %u",
|
||||
GUID_LOPART(GetCasterGUID()), GuidHigh2TypeId(GUID_HIPART(GetCasterGUID())), target->GetGUIDLow(), target->GetTypeId(), damage, GetId(),absorb);
|
||||
GUID_LOPART(GetCasterGUID()), GuidHigh2TypeId(GUID_HIPART(GetCasterGUID())), target->GetGUIDLow(), target->GetTypeId(), damage, GetId(), absorb);
|
||||
|
||||
caster->DealDamageMods(target,damage,&absorb);
|
||||
caster->DealDamageMods(target, damage, &absorb);
|
||||
|
||||
// Set trigger flag
|
||||
uint32 procAttacker = PROC_FLAG_DONE_PERIODIC;
|
||||
@@ -1425,7 +1425,7 @@ void AuraEffect::PeriodicTick(AuraApplication * aurApp, Unit * caster) const
|
||||
}
|
||||
|
||||
if (GetSpellProto()->Effect[GetEffIndex()] == SPELL_EFFECT_PERSISTENT_AREA_AURA &&
|
||||
caster->SpellHitResult(target,GetSpellProto(),false) != SPELL_MISS_NONE)
|
||||
caster->SpellHitResult(target, GetSpellProto(), false) != SPELL_MISS_NONE)
|
||||
return;
|
||||
|
||||
// Check for immune
|
||||
@@ -1465,7 +1465,7 @@ void AuraEffect::PeriodicTick(AuraApplication * aurApp, Unit * caster) const
|
||||
damage = uint32(target->GetHealth());
|
||||
|
||||
sLog->outDetail("PeriodicTick: %u (TypeId: %u) health leech of %u (TypeId: %u) for %u dmg inflicted by %u abs is %u",
|
||||
GUID_LOPART(GetCasterGUID()), GuidHigh2TypeId(GUID_HIPART(GetCasterGUID())), target->GetGUIDLow(), target->GetTypeId(), damage, GetId(),absorb);
|
||||
GUID_LOPART(GetCasterGUID()), GuidHigh2TypeId(GUID_HIPART(GetCasterGUID())), target->GetGUIDLow(), target->GetTypeId(), damage, GetId(), absorb);
|
||||
|
||||
caster->SendSpellNonMeleeDamageLog(target, GetId(), damage, GetSpellSchoolMask(GetSpellProto()), absorb, resist, false, 0, crit);
|
||||
|
||||
@@ -1620,7 +1620,7 @@ void AuraEffect::PeriodicTick(AuraApplication * aurApp, Unit * caster) const
|
||||
if ((int32)damage > gain)
|
||||
damage = gain;
|
||||
uint32 absorb = 0;
|
||||
caster->DealDamageMods(caster,damage,&absorb);
|
||||
caster->DealDamageMods(caster, damage, &absorb);
|
||||
caster->SendSpellNonMeleeDamageLog(caster, GetId(), damage, GetSpellSchoolMask(GetSpellProto()), absorb, 0, false, 0, false);
|
||||
|
||||
CleanDamage cleanDamage = CleanDamage(0, 0, BASE_ATTACK, MELEE_HIT_NORMAL);
|
||||
@@ -1659,7 +1659,7 @@ void AuraEffect::PeriodicTick(AuraApplication * aurApp, Unit * caster) const
|
||||
break;
|
||||
|
||||
if (GetSpellProto()->Effect[GetEffIndex()] == SPELL_EFFECT_PERSISTENT_AREA_AURA &&
|
||||
caster->SpellHitResult(target,GetSpellProto(),false) != SPELL_MISS_NONE)
|
||||
caster->SpellHitResult(target, GetSpellProto(), false) != SPELL_MISS_NONE)
|
||||
break;
|
||||
|
||||
// Check for immune (not use charges)
|
||||
@@ -1781,7 +1781,7 @@ void AuraEffect::PeriodicTick(AuraApplication * aurApp, Unit * caster) const
|
||||
SpellPeriodicAuraLogInfo pInfo(this, amount, 0, 0, 0, 0.0f, false);
|
||||
target->SendPeriodicAuraLog(&pInfo);
|
||||
|
||||
int32 gain = target->ModifyPower(power,amount);
|
||||
int32 gain = target->ModifyPower(power, amount);
|
||||
|
||||
if (caster)
|
||||
target->getHostileRefManager().threatAssist(caster, float(gain) * 0.5f, GetSpellProto());
|
||||
@@ -1818,7 +1818,7 @@ void AuraEffect::PeriodicTick(AuraApplication * aurApp, Unit * caster) const
|
||||
sLog->outDetail("PeriodicTick: %u (TypeId: %u) energize %u (TypeId: %u) for %u dmg inflicted by %u",
|
||||
GUID_LOPART(GetCasterGUID()), GuidHigh2TypeId(GUID_HIPART(GetCasterGUID())), target->GetGUIDLow(), target->GetTypeId(), amount, GetId());
|
||||
|
||||
int32 gain = target->ModifyPower(power,amount);
|
||||
int32 gain = target->ModifyPower(power, amount);
|
||||
|
||||
if (caster)
|
||||
target->getHostileRefManager().threatAssist(caster, float(gain) * 0.5f, GetSpellProto());
|
||||
@@ -1866,7 +1866,7 @@ void AuraEffect::PeriodicTick(AuraApplication * aurApp, Unit * caster) const
|
||||
//no SpellDamageBonus for burn mana
|
||||
caster->CalculateSpellDamageTaken(&damageInfo, int32(gain * dmgMultiplier), spellProto);
|
||||
|
||||
caster->DealDamageMods(damageInfo.target,damageInfo.damage,&damageInfo.absorb);
|
||||
caster->DealDamageMods(damageInfo.target, damageInfo.damage, &damageInfo.absorb);
|
||||
|
||||
caster->SendSpellNonMeleeDamageLog(&damageInfo);
|
||||
|
||||
@@ -2048,12 +2048,12 @@ void AuraEffect::PeriodicDummyTick(Unit * target, Unit * caster) const
|
||||
// eff_radius == 0
|
||||
float radius = GetSpellMaxRange(GetSpellProto(), false);
|
||||
|
||||
CellPair p(Trinity::ComputeCellPair(caster->GetPositionX(),caster->GetPositionY()));
|
||||
CellPair p(Trinity::ComputeCellPair(caster->GetPositionX(), caster->GetPositionY()));
|
||||
Cell cell(p);
|
||||
cell.data.Part.reserved = ALL_DISTRICT;
|
||||
|
||||
Trinity::AnyUnfriendlyVisibleUnitInObjectRangeCheck u_check(caster, caster, radius);
|
||||
Trinity::UnitListSearcher<Trinity::AnyUnfriendlyVisibleUnitInObjectRangeCheck> checker(caster,targets, u_check);
|
||||
Trinity::UnitListSearcher<Trinity::AnyUnfriendlyVisibleUnitInObjectRangeCheck> checker(caster, targets, u_check);
|
||||
|
||||
TypeContainerVisitor<Trinity::UnitListSearcher<Trinity::AnyUnfriendlyVisibleUnitInObjectRangeCheck>, GridTypeMapContainer > grid_object_checker(checker);
|
||||
TypeContainerVisitor<Trinity::UnitListSearcher<Trinity::AnyUnfriendlyVisibleUnitInObjectRangeCheck>, WorldTypeMapContainer > world_object_checker(checker);
|
||||
@@ -2251,7 +2251,7 @@ void AuraEffect::TriggerSpell(Unit * target, Unit * caster) const
|
||||
if (!creature->GetCreatureInfo()->SkinLootId)
|
||||
return;
|
||||
|
||||
player->AutoStoreLoot(creature->GetCreatureInfo()->SkinLootId,LootTemplates_Skinning,true);
|
||||
player->AutoStoreLoot(creature->GetCreatureInfo()->SkinLootId, LootTemplates_Skinning, true);
|
||||
|
||||
creature->DespawnOrUnsummon();
|
||||
}
|
||||
@@ -2264,7 +2264,7 @@ void AuraEffect::TriggerSpell(Unit * target, Unit * caster) const
|
||||
// so instakill will be naturally done before trigger spell
|
||||
case 31347:
|
||||
{
|
||||
target->CastSpell(target,31350,true, NULL, this);
|
||||
target->CastSpell(target, 31350, true, NULL, this);
|
||||
target->Kill(target);
|
||||
return;
|
||||
}
|
||||
@@ -2280,9 +2280,9 @@ void AuraEffect::TriggerSpell(Unit * target, Unit * caster) const
|
||||
{
|
||||
// cast 24 spells 34269-34289, 34314-34316
|
||||
for (uint32 spell_id = 34269; spell_id != 34290; ++spell_id)
|
||||
caster->CastSpell(target,spell_id,true, NULL, this);
|
||||
caster->CastSpell(target, spell_id, true, NULL, this);
|
||||
for (uint32 spell_id = 34314; spell_id != 34317; ++spell_id)
|
||||
caster->CastSpell(target,spell_id,true, NULL, this);
|
||||
caster->CastSpell(target, spell_id, true, NULL, this);
|
||||
return;
|
||||
}
|
||||
// Remote Toy
|
||||
@@ -2306,7 +2306,7 @@ void AuraEffect::TriggerSpell(Unit * target, Unit * caster) const
|
||||
creatureTarget->DespawnOrUnsummon();
|
||||
return;
|
||||
}
|
||||
// Tear of Azzinoth Summon Channel - it's not really supposed to do anything,and this only prevents the console spam
|
||||
// Tear of Azzinoth Summon Channel - it's not really supposed to do anything, and this only prevents the console spam
|
||||
case 39857:
|
||||
triggerSpellId = 39856;
|
||||
break;
|
||||
@@ -2356,7 +2356,7 @@ void AuraEffect::TriggerSpell(Unit * target, Unit * caster) const
|
||||
case 28820:
|
||||
{
|
||||
// Need remove self if Lightning Shield not active
|
||||
if (!target->GetAuraEffect(SPELL_AURA_PROC_TRIGGER_SPELL, SPELLFAMILY_SHAMAN,0x400))
|
||||
if (!target->GetAuraEffect(SPELL_AURA_PROC_TRIGGER_SPELL, SPELLFAMILY_SHAMAN, 0x400))
|
||||
target->RemoveAurasDueToSpell(28820);
|
||||
return;
|
||||
}
|
||||
@@ -2374,7 +2374,7 @@ void AuraEffect::TriggerSpell(Unit * target, Unit * caster) const
|
||||
}
|
||||
|
||||
if (all)
|
||||
caster->CastSpell(target,38437,true, NULL, this);
|
||||
caster->CastSpell(target, 38437, true, NULL, this);
|
||||
else
|
||||
target->RemoveAurasDueToSpell(38437);
|
||||
return;
|
||||
@@ -2460,7 +2460,7 @@ void AuraEffect::TriggerSpell(Unit * target, Unit * caster) const
|
||||
Creature* c = triggerTarget->ToCreature();
|
||||
if (!c || (c && !sScriptMgr->OnDummyEffect(caster, GetId(), SpellEffIndex(GetEffIndex()), triggerTarget->ToCreature())) ||
|
||||
(c && !c->AI()->sOnDummyEffect(caster, GetId(), SpellEffIndex(GetEffIndex()))))
|
||||
sLog->outError("AuraEffect::TriggerSpell: Spell %u has value 0 in EffectTriggered[%d] and is therefor not handled. Define as custom case?",GetId(),GetEffIndex());
|
||||
sLog->outError("AuraEffect::TriggerSpell: Spell %u has value 0 in EffectTriggered[%d] and is therefor not handled. Define as custom case?", GetId(), GetEffIndex());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2482,7 +2482,7 @@ void AuraEffect::TriggerSpellWithValue(Unit * target, Unit * caster) const
|
||||
triggerCaster->CastCustomSpell(triggerTarget, triggerSpellId, &basepoints0, 0, 0, true, 0, this);
|
||||
}
|
||||
else
|
||||
sLog->outError("AuraEffect::TriggerSpellWithValue: Spell %u has value 0 in EffectTriggered[%d] and is therefor not handled. Define as custom case?",GetId(),GetEffIndex());
|
||||
sLog->outError("AuraEffect::TriggerSpellWithValue: Spell %u has value 0 in EffectTriggered[%d] and is therefor not handled. Define as custom case?", GetId(), GetEffIndex());
|
||||
}
|
||||
|
||||
bool AuraEffect::IsAffectedOnSpell(SpellEntry const *spell) const
|
||||
@@ -2733,7 +2733,7 @@ void AuraEffect::HandleShapeshiftBoosts(Unit * target, bool apply) const
|
||||
if (pl->HasSpell(63410) || pl->HasSpell(63411))
|
||||
{
|
||||
target->RemoveAurasDueToSpell(66530);
|
||||
target->CastSpell(target,66530,true);
|
||||
target->CastSpell(target, 66530, true);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3145,7 +3145,7 @@ void AuraEffect::HandleAuraModShapeshift(AuraApplication const * aurApp, uint8 m
|
||||
break;
|
||||
case FORM_BEAR:
|
||||
case FORM_DIREBEAR:
|
||||
if (urand(0,99) < FurorChance)
|
||||
if (urand(0, 99) < FurorChance)
|
||||
target->CastSpell(target, 17057, true);
|
||||
default:
|
||||
{
|
||||
@@ -3206,7 +3206,7 @@ void AuraEffect::HandleAuraModShapeshift(AuraApplication const * aurApp, uint8 m
|
||||
// Defensive Tactics
|
||||
if (form == FORM_DEFENSIVESTANCE)
|
||||
{
|
||||
if (AuraEffect const * aurEff = target->IsScriptOverriden(m_spellProto,831))
|
||||
if (AuraEffect const * aurEff = target->IsScriptOverriden(m_spellProto, 831))
|
||||
Rage_val += aurEff->GetAmount() * 10;
|
||||
}
|
||||
// Stance mastery + Tactical mastery (both passive, and last have aura only in defense stance, but need apply at any stance switch)
|
||||
@@ -3218,11 +3218,11 @@ void AuraEffect::HandleAuraModShapeshift(AuraApplication const * aurApp, uint8 m
|
||||
if (itr->second->state == PLAYERSPELL_REMOVED || itr->second->disabled) continue;
|
||||
SpellEntry const *spellInfo = sSpellStore.LookupEntry(itr->first);
|
||||
if (spellInfo && spellInfo->SpellFamilyName == SPELLFAMILY_WARRIOR && spellInfo->SpellIconID == 139)
|
||||
Rage_val += target->CalculateSpellDamage(target,spellInfo,0) * 10;
|
||||
Rage_val += target->CalculateSpellDamage(target, spellInfo, 0) * 10;
|
||||
}
|
||||
}
|
||||
if (target->GetPower(POWER_RAGE) > Rage_val)
|
||||
target->SetPower(POWER_RAGE,Rage_val);
|
||||
target->SetPower(POWER_RAGE, Rage_val);
|
||||
break;
|
||||
}
|
||||
default:
|
||||
@@ -3374,7 +3374,7 @@ void AuraEffect::HandleAuraTransform(AuraApplication const * aurApp, uint8 mode,
|
||||
|
||||
// Dragonmaw Illusion (set mount model also)
|
||||
if (GetId() == 42016 && target->GetMountID() && !target->GetAuraEffectsByType(SPELL_AURA_MOD_INCREASE_MOUNTED_FLIGHT_SPEED).empty())
|
||||
target->SetUInt32Value(UNIT_FIELD_MOUNTDISPLAYID,16314);
|
||||
target->SetUInt32Value(UNIT_FIELD_MOUNTDISPLAYID, 16314);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -3416,11 +3416,11 @@ void AuraEffect::HandleAuraTransform(AuraApplication const * aurApp, uint8 mode,
|
||||
if (target->GetTypeId() == TYPEID_PLAYER)
|
||||
team = target->ToPlayer()->GetTeam();
|
||||
|
||||
uint32 displayID = sObjectMgr->ChooseDisplayId(team,ci);
|
||||
uint32 displayID = sObjectMgr->ChooseDisplayId(team, ci);
|
||||
|
||||
CreatureModelInfo const *minfo = sObjectMgr->GetCreatureModelRandomGender(displayID);
|
||||
|
||||
target->SetUInt32Value(UNIT_FIELD_MOUNTDISPLAYID,displayID);
|
||||
target->SetUInt32Value(UNIT_FIELD_MOUNTDISPLAYID, displayID);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -3434,7 +3434,7 @@ void AuraEffect::HandleAuraModScale(AuraApplication const * aurApp, uint8 mode,
|
||||
|
||||
Unit * target = aurApp->GetTarget();
|
||||
|
||||
target->ApplyPercentModFloatValue(OBJECT_FIELD_SCALE_X,(float)GetAmount(),apply);
|
||||
target->ApplyPercentModFloatValue(OBJECT_FIELD_SCALE_X, (float)GetAmount(), apply);
|
||||
}
|
||||
|
||||
void AuraEffect::HandleAuraCloneCaster(AuraApplication const * aurApp, uint8 mode, bool apply) const
|
||||
@@ -3483,7 +3483,7 @@ void AuraEffect::HandleFeignDeath(AuraApplication const * aurApp, uint8 mode, bo
|
||||
WorldPacket data(SMSG_FEIGN_DEATH_RESISTED, 9);
|
||||
data<<target->GetGUID();
|
||||
data<<uint8(0);
|
||||
target->SendMessageToSet(&data,true);
|
||||
target->SendMessageToSet(&data, true);
|
||||
*/
|
||||
|
||||
UnitList targets;
|
||||
@@ -3531,7 +3531,7 @@ void AuraEffect::HandleFeignDeath(AuraApplication const * aurApp, uint8 mode, bo
|
||||
WorldPacket data(SMSG_FEIGN_DEATH_RESISTED, 9);
|
||||
data<<target->GetGUID();
|
||||
data<<uint8(1);
|
||||
target->SendMessageToSet(&data,true);
|
||||
target->SendMessageToSet(&data, true);
|
||||
*/
|
||||
// blizz like 2.0.x
|
||||
target->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_UNK_29);
|
||||
@@ -3767,7 +3767,7 @@ void AuraEffect::HandleAuraTrackStealthed(AuraApplication const * aurApp, uint8
|
||||
if (target->HasAuraType(GetAuraType()))
|
||||
return;
|
||||
}
|
||||
target->ApplyModFlag(PLAYER_FIELD_BYTES,PLAYER_FIELD_BYTE_TRACK_STEALTHED,apply);
|
||||
target->ApplyModFlag(PLAYER_FIELD_BYTES, PLAYER_FIELD_BYTE_TRACK_STEALTHED, apply);
|
||||
}
|
||||
|
||||
void AuraEffect::HandleAuraModStalked(AuraApplication const * aurApp, uint8 mode, bool apply) const
|
||||
@@ -3837,7 +3837,7 @@ void AuraEffect::HandleAuraModSkill(AuraApplication const * aurApp, uint8 /*mode
|
||||
uint32 prot = GetMiscValue();
|
||||
int32 points = GetAmount();
|
||||
|
||||
target->ToPlayer()->ModifySkillBonus(prot,((apply) ? points: -points),GetAuraType() == SPELL_AURA_MOD_SKILL_TALENT);
|
||||
target->ToPlayer()->ModifySkillBonus(prot, ((apply) ? points: -points), GetAuraType() == SPELL_AURA_MOD_SKILL_TALENT);
|
||||
if (prot == SKILL_DEFENSE)
|
||||
target->ToPlayer()->UpdateDefenseBonusesMod();
|
||||
}
|
||||
@@ -3869,7 +3869,7 @@ void AuraEffect::HandleAuraMounted(AuraApplication const * aurApp, uint8 mode, b
|
||||
CreatureTemplate const* ci = sObjectMgr->GetCreatureTemplate(creatureEntry);
|
||||
if (!ci)
|
||||
{
|
||||
sLog->outErrorDb("AuraMounted: `creature_template`='%u' not found in database (only need its modelid)",GetMiscValue());
|
||||
sLog->outErrorDb("AuraMounted: `creature_template`='%u' not found in database (only need its modelid)", GetMiscValue());
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -3877,7 +3877,7 @@ void AuraEffect::HandleAuraMounted(AuraApplication const * aurApp, uint8 mode, b
|
||||
if (target->GetTypeId() == TYPEID_PLAYER)
|
||||
team = target->ToPlayer()->GetTeam();
|
||||
|
||||
uint32 displayID = sObjectMgr->ChooseDisplayId(team,ci);
|
||||
uint32 displayID = sObjectMgr->ChooseDisplayId(team, ci);
|
||||
CreatureModelInfo const *minfo = sObjectMgr->GetCreatureModelRandomGender(displayID);
|
||||
|
||||
//some spell has one aura of mount and one of vehicle
|
||||
@@ -3951,7 +3951,7 @@ void AuraEffect::HandleAuraWaterWalk(AuraApplication const * aurApp, uint8 mode,
|
||||
data.Initialize(SMSG_MOVE_LAND_WALK, 8+4);
|
||||
data.append(target->GetPackGUID());
|
||||
data << uint32(0);
|
||||
target->SendMessageToSet(&data,true);
|
||||
target->SendMessageToSet(&data, true);
|
||||
}
|
||||
|
||||
void AuraEffect::HandleAuraFeatherFall(AuraApplication const * aurApp, uint8 mode, bool apply) const
|
||||
@@ -4003,7 +4003,7 @@ void AuraEffect::HandleAuraHover(AuraApplication const * aurApp, uint8 mode, boo
|
||||
data.Initialize(SMSG_MOVE_UNSET_HOVER, 8+4);
|
||||
data.append(target->GetPackGUID());
|
||||
data << uint32(0);
|
||||
target->SendMessageToSet(&data,true);
|
||||
target->SendMessageToSet(&data, true);
|
||||
}
|
||||
|
||||
void AuraEffect::HandleWaterBreathing(AuraApplication const * aurApp, uint8 mode, bool /*apply*/) const
|
||||
@@ -4334,11 +4334,11 @@ void AuraEffect::HandleAuraModIncreaseFlightSpeed(AuraApplication const * aurApp
|
||||
{
|
||||
//Players on flying mounts must be immune to polymorph
|
||||
if (target->GetTypeId() == TYPEID_PLAYER)
|
||||
target->ApplySpellImmune(GetId(),IMMUNITY_MECHANIC,MECHANIC_POLYMORPH,apply);
|
||||
target->ApplySpellImmune(GetId(), IMMUNITY_MECHANIC, MECHANIC_POLYMORPH, apply);
|
||||
|
||||
// Dragonmaw Illusion (overwrite mount model, mounted aura already applied)
|
||||
if (apply && target->HasAuraEffect(42016,0) && target->GetMountID())
|
||||
target->SetUInt32Value(UNIT_FIELD_MOUNTDISPLAYID,16314);
|
||||
if (apply && target->HasAuraEffect(42016, 0) && target->GetMountID())
|
||||
target->SetUInt32Value(UNIT_FIELD_MOUNTDISPLAYID, 16314);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4504,14 +4504,14 @@ void AuraEffect::HandleAuraModEffectImmunity(AuraApplication const * aurApp, uin
|
||||
bg->EventPlayerDroppedFlag(target->ToPlayer());
|
||||
}
|
||||
else
|
||||
sOutdoorPvPMgr->HandleDropFlag((Player*)target,GetSpellProto()->Id);
|
||||
sOutdoorPvPMgr->HandleDropFlag((Player*)target, GetSpellProto()->Id);
|
||||
}
|
||||
}
|
||||
// stop handling the effect if it was removed by linked event
|
||||
if (apply && aurApp->GetRemoveMode())
|
||||
return;
|
||||
|
||||
target->ApplySpellImmune(GetId(),IMMUNITY_EFFECT,GetMiscValue(),apply);
|
||||
target->ApplySpellImmune(GetId(), IMMUNITY_EFFECT, GetMiscValue(), apply);
|
||||
}
|
||||
|
||||
void AuraEffect::HandleAuraModStateImmunity(AuraApplication const * aurApp, uint8 mode, bool apply) const
|
||||
@@ -4545,7 +4545,7 @@ void AuraEffect::HandleAuraModSchoolImmunity(AuraApplication const * aurApp, uin
|
||||
if (apply && aurApp->GetRemoveMode())
|
||||
return;
|
||||
|
||||
target->ApplySpellImmune(GetId(),IMMUNITY_SCHOOL,GetMiscValue(),(apply));
|
||||
target->ApplySpellImmune(GetId(), IMMUNITY_SCHOOL, GetMiscValue(), (apply));
|
||||
|
||||
// remove all flag auras (they are positive, but they must be removed when you are immune)
|
||||
if (GetSpellProto()->AttributesEx & SPELL_ATTR1_DISPEL_AURAS_ON_IMMUNITY
|
||||
@@ -4563,7 +4563,7 @@ void AuraEffect::HandleAuraModSchoolImmunity(AuraApplication const * aurApp, uin
|
||||
{
|
||||
SpellEntry const *spell = iter->second->GetBase()->GetSpellProto();
|
||||
if ((GetSpellSchoolMask(spell) & school_mask)//Check for school mask
|
||||
&& CanSpellDispelAura(GetSpellProto(),spell)
|
||||
&& CanSpellDispelAura(GetSpellProto(), spell)
|
||||
&& !iter->second->IsPositive() //Don't remove positive spells
|
||||
&& spell->Id != GetId()) //Don't remove self
|
||||
{
|
||||
@@ -4605,7 +4605,7 @@ void AuraEffect::HandleAuraModDmgImmunity(AuraApplication const * aurApp, uint8
|
||||
|
||||
Unit * target = aurApp->GetTarget();
|
||||
|
||||
target->ApplySpellImmune(GetId(),IMMUNITY_DAMAGE,GetMiscValue(), apply);
|
||||
target->ApplySpellImmune(GetId(), IMMUNITY_DAMAGE, GetMiscValue(), apply);
|
||||
}
|
||||
|
||||
void AuraEffect::HandleAuraModDispelImmunity(AuraApplication const * aurApp, uint8 mode, bool apply) const
|
||||
@@ -4661,7 +4661,7 @@ void AuraEffect::HandleAuraModResistance(AuraApplication const * aurApp, uint8 m
|
||||
{
|
||||
target->HandleStatModifier(UnitMods(UNIT_MOD_RESISTANCE_START + x), TOTAL_VALUE, float(GetAmount()), apply);
|
||||
if (target->GetTypeId() == TYPEID_PLAYER || target->ToCreature()->isPet())
|
||||
target->ApplyResistanceBuffModsMod(SpellSchools(x),GetAmount() > 0,(float)GetAmount(), apply);
|
||||
target->ApplyResistanceBuffModsMod(SpellSchools(x), GetAmount() > 0, (float)GetAmount(), apply);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -4704,8 +4704,8 @@ void AuraEffect::HandleModResistancePercent(AuraApplication const * aurApp, uint
|
||||
target->HandleStatModifier(UnitMods(UNIT_MOD_RESISTANCE_START + i), TOTAL_PCT, float(GetAmount()), apply);
|
||||
if (target->GetTypeId() == TYPEID_PLAYER || target->ToCreature()->isPet())
|
||||
{
|
||||
target->ApplyResistanceBuffModsPercentMod(SpellSchools(i),true,(float)GetAmount(), apply);
|
||||
target->ApplyResistanceBuffModsPercentMod(SpellSchools(i),false,(float)GetAmount(), apply);
|
||||
target->ApplyResistanceBuffModsPercentMod(SpellSchools(i), true, (float)GetAmount(), apply);
|
||||
target->ApplyResistanceBuffModsPercentMod(SpellSchools(i), false, (float)GetAmount(), apply);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -4744,11 +4744,11 @@ void AuraEffect::HandleModTargetResistance(AuraApplication const * aurApp, uint8
|
||||
|
||||
// show armor penetration
|
||||
if (target->GetTypeId() == TYPEID_PLAYER && (GetMiscValue() & SPELL_SCHOOL_MASK_NORMAL))
|
||||
target->ApplyModInt32Value(PLAYER_FIELD_MOD_TARGET_PHYSICAL_RESISTANCE,GetAmount(), apply);
|
||||
target->ApplyModInt32Value(PLAYER_FIELD_MOD_TARGET_PHYSICAL_RESISTANCE, GetAmount(), apply);
|
||||
|
||||
// show as spell penetration only full spell penetration bonuses (all resistances except armor and holy
|
||||
if (target->GetTypeId() == TYPEID_PLAYER && (GetMiscValue() & SPELL_SCHOOL_MASK_SPELL) == SPELL_SCHOOL_MASK_SPELL)
|
||||
target->ApplyModInt32Value(PLAYER_FIELD_MOD_TARGET_RESISTANCE,GetAmount(), apply);
|
||||
target->ApplyModInt32Value(PLAYER_FIELD_MOD_TARGET_RESISTANCE, GetAmount(), apply);
|
||||
}
|
||||
|
||||
/********************************/
|
||||
@@ -4764,7 +4764,7 @@ void AuraEffect::HandleAuraModStat(AuraApplication const * aurApp, uint8 mode, b
|
||||
|
||||
if (GetMiscValue() < -2 || GetMiscValue() > 4)
|
||||
{
|
||||
sLog->outError("WARNING: Spell %u effect %u has an unsupported misc value (%i) for SPELL_AURA_MOD_STAT ",GetId(),GetEffIndex(),GetMiscValue());
|
||||
sLog->outError("WARNING: Spell %u effect %u has an unsupported misc value (%i) for SPELL_AURA_MOD_STAT ", GetId(), GetEffIndex(), GetMiscValue());
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -4773,10 +4773,10 @@ void AuraEffect::HandleAuraModStat(AuraApplication const * aurApp, uint8 mode, b
|
||||
// -1 or -2 is all stats (misc < -2 checked in function beginning)
|
||||
if (GetMiscValue() < 0 || GetMiscValue() == i)
|
||||
{
|
||||
//target->ApplyStatMod(Stats(i), m_amount,apply);
|
||||
//target->ApplyStatMod(Stats(i), m_amount, apply);
|
||||
target->HandleStatModifier(UnitMods(UNIT_MOD_STAT_START + i), TOTAL_VALUE, float(GetAmount()), apply);
|
||||
if (target->GetTypeId() == TYPEID_PLAYER || target->ToCreature()->isPet())
|
||||
target->ApplyStatBuffMod(Stats(i),(float)GetAmount(),apply);
|
||||
target->ApplyStatBuffMod(Stats(i), (float)GetAmount(), apply);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -5162,7 +5162,7 @@ void AuraEffect::HandleAuraModWeaponCritPercent(AuraApplication const * aurApp,
|
||||
|
||||
for (int i = 0; i < MAX_ATTACK; ++i)
|
||||
if (Item* pItem = target->ToPlayer()->GetWeaponForAttack(WeaponAttackType(i), true))
|
||||
target->ToPlayer()->_ApplyWeaponDependentAuraCritMod(pItem,WeaponAttackType(i),this,apply);
|
||||
target->ToPlayer()->_ApplyWeaponDependentAuraCritMod(pItem, WeaponAttackType(i), this, apply);
|
||||
|
||||
// mods must be applied base at equipped weapon class and subclass comparison
|
||||
// with spell->EquippedItemClass and EquippedItemSubClassMask and EquippedItemInventoryTypeMask
|
||||
@@ -5272,7 +5272,7 @@ void AuraEffect::HandleModCastingSpeed(AuraApplication const * aurApp, uint8 mod
|
||||
|
||||
Unit * target = aurApp->GetTarget();
|
||||
|
||||
target->ApplyCastTimePercentMod((float)GetAmount(),apply);
|
||||
target->ApplyCastTimePercentMod((float)GetAmount(), apply);
|
||||
}
|
||||
|
||||
void AuraEffect::HandleModMeleeRangedSpeedPct(AuraApplication const * aurApp, uint8 mode, bool apply) const
|
||||
@@ -5282,8 +5282,8 @@ void AuraEffect::HandleModMeleeRangedSpeedPct(AuraApplication const * aurApp, ui
|
||||
|
||||
Unit * target = aurApp->GetTarget();
|
||||
|
||||
target->ApplyAttackTimePercentMod(BASE_ATTACK,(float)GetAmount(),apply);
|
||||
target->ApplyAttackTimePercentMod(OFF_ATTACK,(float)GetAmount(),apply);
|
||||
target->ApplyAttackTimePercentMod(BASE_ATTACK, (float)GetAmount(), apply);
|
||||
target->ApplyAttackTimePercentMod(OFF_ATTACK, (float)GetAmount(), apply);
|
||||
target->ApplyAttackTimePercentMod(RANGED_ATTACK, (float)GetAmount(), apply);
|
||||
}
|
||||
|
||||
@@ -5294,9 +5294,9 @@ void AuraEffect::HandleModCombatSpeedPct(AuraApplication const * aurApp, uint8 m
|
||||
|
||||
Unit * target = aurApp->GetTarget();
|
||||
|
||||
target->ApplyCastTimePercentMod(float(m_amount),apply);
|
||||
target->ApplyAttackTimePercentMod(BASE_ATTACK,float(GetAmount()),apply);
|
||||
target->ApplyAttackTimePercentMod(OFF_ATTACK,float(GetAmount()),apply);
|
||||
target->ApplyCastTimePercentMod(float(m_amount), apply);
|
||||
target->ApplyAttackTimePercentMod(BASE_ATTACK, float(GetAmount()), apply);
|
||||
target->ApplyAttackTimePercentMod(OFF_ATTACK, float(GetAmount()), apply);
|
||||
target->ApplyAttackTimePercentMod(RANGED_ATTACK, float(GetAmount()), apply);
|
||||
}
|
||||
|
||||
@@ -5475,7 +5475,7 @@ void AuraEffect::HandleModDamageDone(AuraApplication const * aurApp, uint8 mode,
|
||||
{
|
||||
for (int i = 0; i < MAX_ATTACK; ++i)
|
||||
if (Item* pItem = target->ToPlayer()->GetWeaponForAttack(WeaponAttackType(i), true))
|
||||
target->ToPlayer()->_ApplyWeaponDependentAuraDamageMod(pItem,WeaponAttackType(i),this,apply);
|
||||
target->ToPlayer()->_ApplyWeaponDependentAuraDamageMod(pItem, WeaponAttackType(i), this, apply);
|
||||
}
|
||||
|
||||
// GetMiscValue() is bitmask of spell schools
|
||||
@@ -5499,9 +5499,9 @@ void AuraEffect::HandleModDamageDone(AuraApplication const * aurApp, uint8 mode,
|
||||
if (target->GetTypeId() == TYPEID_PLAYER)
|
||||
{
|
||||
if (GetAmount() > 0)
|
||||
target->ApplyModUInt32Value(PLAYER_FIELD_MOD_DAMAGE_DONE_POS,GetAmount(),apply);
|
||||
target->ApplyModUInt32Value(PLAYER_FIELD_MOD_DAMAGE_DONE_POS, GetAmount(), apply);
|
||||
else
|
||||
target->ApplyModUInt32Value(PLAYER_FIELD_MOD_DAMAGE_DONE_NEG,GetAmount(),apply);
|
||||
target->ApplyModUInt32Value(PLAYER_FIELD_MOD_DAMAGE_DONE_NEG, GetAmount(), apply);
|
||||
}
|
||||
}
|
||||
else
|
||||
@@ -5532,7 +5532,7 @@ void AuraEffect::HandleModDamageDone(AuraApplication const * aurApp, uint8 mode,
|
||||
for (int i = SPELL_SCHOOL_HOLY; i < MAX_SPELL_SCHOOL; i++)
|
||||
{
|
||||
if ((GetMiscValue() & (1<<i)) != 0)
|
||||
target->ApplyModUInt32Value(PLAYER_FIELD_MOD_DAMAGE_DONE_POS+i,GetAmount(),apply);
|
||||
target->ApplyModUInt32Value(PLAYER_FIELD_MOD_DAMAGE_DONE_POS+i, GetAmount(), apply);
|
||||
}
|
||||
}
|
||||
else
|
||||
@@ -5540,7 +5540,7 @@ void AuraEffect::HandleModDamageDone(AuraApplication const * aurApp, uint8 mode,
|
||||
for (int i = SPELL_SCHOOL_HOLY; i < MAX_SPELL_SCHOOL; i++)
|
||||
{
|
||||
if ((GetMiscValue() & (1<<i)) != 0)
|
||||
target->ApplyModUInt32Value(PLAYER_FIELD_MOD_DAMAGE_DONE_NEG+i,GetAmount(),apply);
|
||||
target->ApplyModUInt32Value(PLAYER_FIELD_MOD_DAMAGE_DONE_NEG+i, GetAmount(), apply);
|
||||
}
|
||||
}
|
||||
if (Guardian* pet = target->ToPlayer()->GetGuardianPet())
|
||||
@@ -5612,7 +5612,7 @@ void AuraEffect::HandleModPowerCost(AuraApplication const * aurApp, uint8 mode,
|
||||
|
||||
for (int i = 0; i < MAX_SPELL_SCHOOL; ++i)
|
||||
if (GetMiscValue() & (1<<i))
|
||||
target->ApplyModInt32Value(UNIT_FIELD_POWER_COST_MODIFIER+i,GetAmount(),apply);
|
||||
target->ApplyModInt32Value(UNIT_FIELD_POWER_COST_MODIFIER+i, GetAmount(), apply);
|
||||
}
|
||||
|
||||
void AuraEffect::HandleArenaPreparation(AuraApplication const * aurApp, uint8 mode, bool apply) const
|
||||
@@ -5666,7 +5666,7 @@ void AuraEffect::HandleAuraRetainComboPoints(AuraApplication const * aurApp, uin
|
||||
// combo points was added in SPELL_EFFECT_ADD_COMBO_POINTS handler
|
||||
// remove only if aura expire by time (in case combo points amount change aura removed without combo points lost)
|
||||
if (!(apply) && GetBase()->GetDuration() == 0 && target->ToPlayer()->GetComboTarget())
|
||||
if (Unit* unit = ObjectAccessor::GetUnit(*target,target->ToPlayer()->GetComboTarget()))
|
||||
if (Unit* unit = ObjectAccessor::GetUnit(*target, target->ToPlayer()->GetComboTarget()))
|
||||
target->ToPlayer()->AddComboPoints(unit, -GetAmount());
|
||||
}
|
||||
|
||||
@@ -5702,11 +5702,11 @@ void AuraEffect::HandleAuraDummy(AuraApplication const * aurApp, uint8 mode, boo
|
||||
{
|
||||
// Unrelenting Assault, rank 1
|
||||
case 46859:
|
||||
target->CastSpell(target,64849,true,NULL,aurEff);
|
||||
target->CastSpell(target, 64849, true, NULL, aurEff);
|
||||
break;
|
||||
// Unrelenting Assault, rank 2
|
||||
case 46860:
|
||||
target->CastSpell(target,64850,true,NULL,aurEff);
|
||||
target->CastSpell(target, 64850, true, NULL, aurEff);
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -5720,7 +5720,7 @@ void AuraEffect::HandleAuraDummy(AuraApplication const * aurApp, uint8 mode, boo
|
||||
case 13139: // net-o-matic
|
||||
// root to self part of (root_target->charge->root_self sequence
|
||||
if (caster)
|
||||
caster->CastSpell(caster,13138,true,NULL,this);
|
||||
caster->CastSpell(caster, 13138, true, NULL, this);
|
||||
break;
|
||||
case 34026: // kill command
|
||||
{
|
||||
@@ -5728,10 +5728,10 @@ void AuraEffect::HandleAuraDummy(AuraApplication const * aurApp, uint8 mode, boo
|
||||
if (!pet)
|
||||
break;
|
||||
|
||||
target->CastSpell(target,34027,true,NULL,this);
|
||||
target->CastSpell(target, 34027, true, NULL, this);
|
||||
|
||||
// set 3 stacks and 3 charges (to make all auras not disappear at once)
|
||||
Aura * owner_aura = target->GetAura(34027,GetCasterGUID());
|
||||
Aura * owner_aura = target->GetAura(34027, GetCasterGUID());
|
||||
Aura * pet_aura = pet->GetAura(58914, GetCasterGUID());
|
||||
if (owner_aura)
|
||||
{
|
||||
@@ -5751,10 +5751,10 @@ void AuraEffect::HandleAuraDummy(AuraApplication const * aurApp, uint8 mode, boo
|
||||
switch(caster->getGender())
|
||||
{
|
||||
case GENDER_FEMALE:
|
||||
caster->CastSpell(target,37095,true,NULL,this); // Blood Elf Disguise
|
||||
caster->CastSpell(target, 37095, true, NULL, this); // Blood Elf Disguise
|
||||
break;
|
||||
case GENDER_MALE:
|
||||
caster->CastSpell(target,37093,true,NULL,this);
|
||||
caster->CastSpell(target, 37093, true, NULL, this);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
@@ -5764,9 +5764,9 @@ void AuraEffect::HandleAuraDummy(AuraApplication const * aurApp, uint8 mode, boo
|
||||
}
|
||||
case 55198: // Tidal Force
|
||||
{
|
||||
target->CastSpell(target,55166,true,NULL,this);
|
||||
target->CastSpell(target, 55166, true, NULL, this);
|
||||
// set 3 stacks and 3 charges (to make all auras not disappear at once)
|
||||
Aura * owner_aura = target->GetAura(55166,GetCasterGUID());
|
||||
Aura * owner_aura = target->GetAura(55166, GetCasterGUID());
|
||||
if (owner_aura)
|
||||
{
|
||||
// This aura lasts 2 sec, need this hack to properly proc spells
|
||||
@@ -5791,10 +5791,10 @@ void AuraEffect::HandleAuraDummy(AuraApplication const * aurApp, uint8 mode, boo
|
||||
switch(caster->getGender())
|
||||
{
|
||||
case GENDER_FEMALE:
|
||||
caster->CastSpell(target,46356,true,NULL,this);
|
||||
caster->CastSpell(target, 46356, true, NULL, this);
|
||||
break;
|
||||
case GENDER_MALE:
|
||||
caster->CastSpell(target,46355,true,NULL,this);
|
||||
caster->CastSpell(target, 46355, true, NULL, this);
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -5818,7 +5818,7 @@ void AuraEffect::HandleAuraDummy(AuraApplication const * aurApp, uint8 mode, boo
|
||||
break;
|
||||
case 52916: // Honor Among Thieves
|
||||
if (target->GetTypeId() == TYPEID_PLAYER)
|
||||
if (Unit * spellTarget = ObjectAccessor::GetUnit(*target,target->ToPlayer()->GetComboTarget()))
|
||||
if (Unit * spellTarget = ObjectAccessor::GetUnit(*target, target->ToPlayer()->GetComboTarget()))
|
||||
target->CastSpell(spellTarget, 51699, true);
|
||||
break;
|
||||
case 28832: // Mark of Korth'azz
|
||||
@@ -5914,10 +5914,10 @@ void AuraEffect::HandleAuraDummy(AuraApplication const * aurApp, uint8 mode, boo
|
||||
break;
|
||||
}
|
||||
case 42783: // Wrath of the Astromancer
|
||||
target->CastSpell(target,GetAmount(),true,NULL,this);
|
||||
target->CastSpell(target, GetAmount(), true, NULL, this);
|
||||
break;
|
||||
case 46308: // Burning Winds casted only at creatures at spawn
|
||||
target->CastSpell(target,47287,true,NULL,this);
|
||||
target->CastSpell(target, 47287, true, NULL, this);
|
||||
break;
|
||||
case 52172: // Coyote Spirit Despawn Aura
|
||||
case 60244: // Blood Parrot Despawn Aura
|
||||
@@ -5974,7 +5974,7 @@ void AuraEffect::HandleAuraDummy(AuraApplication const * aurApp, uint8 mode, boo
|
||||
{
|
||||
int32 damage = aurEff->GetAmount()*4;
|
||||
// backfire damage
|
||||
target->CastCustomSpell(target, 64085, &damage, NULL, NULL, true, NULL, NULL,GetCasterGUID());
|
||||
target->CastCustomSpell(target, 64085, &damage, NULL, NULL, true, NULL, NULL, GetCasterGUID());
|
||||
}
|
||||
}
|
||||
break;
|
||||
@@ -5986,7 +5986,7 @@ void AuraEffect::HandleAuraDummy(AuraApplication const * aurApp, uint8 mode, boo
|
||||
case SPELLFAMILY_DEATHKNIGHT:
|
||||
// Summon Gargoyle (will start feeding gargoyle)
|
||||
if (GetId() == 61777)
|
||||
target->CastSpell(target,m_spellProto->EffectTriggerSpell[m_effIndex],true);
|
||||
target->CastSpell(target, m_spellProto->EffectTriggerSpell[m_effIndex], true);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
@@ -6054,7 +6054,7 @@ void AuraEffect::HandleAuraDummy(AuraApplication const * aurApp, uint8 mode, boo
|
||||
if (owner && owner->GetTypeId() == TYPEID_PLAYER)
|
||||
{
|
||||
if (apply)
|
||||
owner->CastSpell(owner,8985,true);
|
||||
owner->CastSpell(owner, 8985, true);
|
||||
else
|
||||
owner->ToPlayer()->RemovePet(NULL, PET_SAVE_NOT_IN_SLOT, true);
|
||||
}
|
||||
@@ -6070,7 +6070,7 @@ void AuraEffect::HandleAuraDummy(AuraApplication const * aurApp, uint8 mode, boo
|
||||
if (owner && owner->GetTypeId() == TYPEID_PLAYER)
|
||||
{
|
||||
if (apply)
|
||||
owner->CastSpell(owner,19704,true);
|
||||
owner->CastSpell(owner, 19704, true);
|
||||
else
|
||||
owner->ToPlayer()->RemovePet(NULL, PET_SAVE_NOT_IN_SLOT, true);
|
||||
}
|
||||
@@ -6364,7 +6364,7 @@ void AuraEffect::HandleForceReaction(AuraApplication const * aurApp, uint8 mode,
|
||||
uint32 faction_id = GetMiscValue();
|
||||
ReputationRank faction_rank = ReputationRank(m_amount);
|
||||
|
||||
player->GetReputationMgr().ApplyForceReaction(faction_id,faction_rank,apply);
|
||||
player->GetReputationMgr().ApplyForceReaction(faction_id, faction_rank, apply);
|
||||
player->GetReputationMgr().SendForceReactions();
|
||||
|
||||
// stop fighting if at apply forced rank friendly or at remove real rank friendly
|
||||
@@ -6484,7 +6484,7 @@ void AuraEffect::HandleAuraLinked(AuraApplication const * aurApp, uint8 mode, bo
|
||||
if (GetAmount())
|
||||
caster->CastCustomSpell(target, m_spellProto->EffectTriggerSpell[m_effIndex], &m_amount, NULL, NULL, true, NULL, this);
|
||||
else
|
||||
caster->CastSpell(target, m_spellProto->EffectTriggerSpell[m_effIndex],true, NULL, this);
|
||||
caster->CastSpell(target, m_spellProto->EffectTriggerSpell[m_effIndex], true, NULL, this);
|
||||
}
|
||||
else
|
||||
target->RemoveAura(m_spellProto->EffectTriggerSpell[m_effIndex], GetCasterGUID(), 0, AuraRemoveMode(aurApp->GetRemoveMode()));
|
||||
|
||||
@@ -190,7 +190,7 @@ void AuraApplication::ClientUpdate(bool remove)
|
||||
{
|
||||
ASSERT(!m_target->GetVisibleAura(m_slot));
|
||||
data << uint32(0);
|
||||
sLog->outDebug(LOG_FILTER_SPELLS_AURAS, "Aura %u removed slot %u",GetBase()->GetId(), m_slot);
|
||||
sLog->outDebug(LOG_FILTER_SPELLS_AURAS, "Aura %u removed slot %u", GetBase()->GetId(), m_slot);
|
||||
m_target->SendMessageToSet(&data, true);
|
||||
return;
|
||||
}
|
||||
@@ -245,7 +245,7 @@ Aura * Aura::TryCreate(SpellEntry const* spellproto, uint8 tryEffMask, WorldObje
|
||||
break;
|
||||
}
|
||||
if (uint8 realMask = effMask & tryEffMask)
|
||||
return Create(spellproto,realMask,owner,caster,baseAmount,castItem,casterGUID);
|
||||
return Create(spellproto, realMask, owner, caster, baseAmount, castItem, casterGUID);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
@@ -276,7 +276,7 @@ Aura * Aura::TryCreate(SpellEntry const* spellproto, WorldObject * owner, Unit *
|
||||
break;
|
||||
}
|
||||
if (effMask)
|
||||
return Create(spellproto,effMask,owner,caster,baseAmount,castItem,casterGUID);
|
||||
return Create(spellproto, effMask, owner, caster, baseAmount, castItem, casterGUID);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
@@ -424,7 +424,7 @@ void Aura::_ApplyForTarget(Unit * target, Unit * caster, AuraApplication * auraA
|
||||
if (m_spellProto->Attributes & SPELL_ATTR0_DISABLED_WHILE_ACTIVE)
|
||||
{
|
||||
Item* castItem = m_castItemGuid ? caster->ToPlayer()->GetItemByGuid(m_castItemGuid) : NULL;
|
||||
caster->ToPlayer()->AddSpellAndCategoryCooldowns(m_spellProto,castItem ? castItem->GetEntry() : 0, NULL,true);
|
||||
caster->ToPlayer()->AddSpellAndCategoryCooldowns(m_spellProto, castItem ? castItem->GetEntry() : 0, NULL, true);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -902,18 +902,18 @@ void Aura::HandleAuraSpecificMods(AuraApplication const * aurApp, Unit * caster,
|
||||
if (saBounds.first != saBounds.second)
|
||||
{
|
||||
uint32 zone, area;
|
||||
target->GetZoneAndAreaId(zone,area);
|
||||
target->GetZoneAndAreaId(zone, area);
|
||||
|
||||
for (SpellAreaForAreaMap::const_iterator itr = saBounds.first; itr != saBounds.second; ++itr)
|
||||
{
|
||||
// some auras remove at aura remove
|
||||
if (!itr->second->IsFitToRequirements((Player*)target,zone,area))
|
||||
if (!itr->second->IsFitToRequirements((Player*)target, zone, area))
|
||||
target->RemoveAurasDueToSpell(itr->second->spellId);
|
||||
// some auras applied at aura apply
|
||||
else if (itr->second->autocast)
|
||||
{
|
||||
if (!target->HasAura(itr->second->spellId))
|
||||
target->CastSpell(target,itr->second->spellId,true);
|
||||
target->CastSpell(target, itr->second->spellId, true);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -978,9 +978,9 @@ void Aura::HandleAuraSpecificMods(AuraApplication const * aurApp, Unit * caster,
|
||||
{
|
||||
// Glyph of the Penguin
|
||||
if (caster->HasAura(52648))
|
||||
caster->CastSpell(target,61635,true);
|
||||
caster->CastSpell(target, 61635, true);
|
||||
else
|
||||
caster->CastSpell(target,61634,true);
|
||||
caster->CastSpell(target, 61634, true);
|
||||
}
|
||||
}
|
||||
switch(GetId())
|
||||
@@ -1026,7 +1026,7 @@ void Aura::HandleAuraSpecificMods(AuraApplication const * aurApp, Unit * caster,
|
||||
if (target->GetTypeId() == TYPEID_PLAYER)
|
||||
if (GameObject* obj = target->GetGameObject(48018))
|
||||
{
|
||||
target->ToPlayer()->TeleportTo(obj->GetMapId(),obj->GetPositionX(),obj->GetPositionY(),obj->GetPositionZ(),obj->GetOrientation());
|
||||
target->ToPlayer()->TeleportTo(obj->GetMapId(), obj->GetPositionX(), obj->GetPositionY(), obj->GetPositionZ(), obj->GetOrientation());
|
||||
target->ToPlayer()->RemoveMovementImpairingAuras();
|
||||
}
|
||||
break;
|
||||
@@ -1059,7 +1059,7 @@ void Aura::HandleAuraSpecificMods(AuraApplication const * aurApp, Unit * caster,
|
||||
else if (m_spellProto->SpellFamilyFlags[0] & 0x1 && m_spellProto->SpellFamilyFlags[2] & 0x400 && GetEffect(0))
|
||||
{
|
||||
// Glyph of Power Word: Shield
|
||||
if (AuraEffect* glyph = caster->GetAuraEffect(55672,0))
|
||||
if (AuraEffect* glyph = caster->GetAuraEffect(55672, 0))
|
||||
{
|
||||
// instantly heal m_amount% of the absorb-value
|
||||
int32 heal = glyph->GetAmount() * GetEffect(0)->GetAmount()/100;
|
||||
@@ -1217,7 +1217,7 @@ void Aura::HandleAuraSpecificMods(AuraApplication const * aurApp, Unit * caster,
|
||||
if (removeMode != AURA_REMOVE_BY_DEFAULT)
|
||||
{
|
||||
// Improved Spell Reflection
|
||||
if (caster->GetDummyAuraEffect(SPELLFAMILY_WARRIOR,1935, 1))
|
||||
if (caster->GetDummyAuraEffect(SPELLFAMILY_WARRIOR, 1935, 1))
|
||||
{
|
||||
// aura remove - remove auras from all party members
|
||||
std::list<Unit*> PartyMembers;
|
||||
@@ -1413,7 +1413,7 @@ void Aura::HandleAuraSpecificMods(AuraApplication const * aurApp, Unit * caster,
|
||||
if (apply)
|
||||
target->CastSpell(caster, 59665, true, 0, 0, caster->GetGUID());
|
||||
else
|
||||
target->SetReducedThreatPercent(0,0);
|
||||
target->SetReducedThreatPercent(0, 0);
|
||||
break;
|
||||
}
|
||||
break;
|
||||
@@ -1425,20 +1425,20 @@ void Aura::HandleAuraSpecificMods(AuraApplication const * aurApp, Unit * caster,
|
||||
if (AuraEffect const * aurEff = target->GetAuraEffectOfRankedSpell(31221, 0))
|
||||
{
|
||||
if (!apply)
|
||||
target->CastSpell(target,31666,true);
|
||||
target->CastSpell(target, 31666, true);
|
||||
else
|
||||
{
|
||||
int32 basepoints0 = aurEff->GetAmount();
|
||||
target->CastCustomSpell(target,31665, &basepoints0, NULL, NULL ,true);
|
||||
target->CastCustomSpell(target, 31665, &basepoints0, NULL, NULL , true);
|
||||
}
|
||||
}
|
||||
// Overkill
|
||||
if (target->HasAura(58426))
|
||||
{
|
||||
if (!apply)
|
||||
target->CastSpell(target,58428,true);
|
||||
target->CastSpell(target, 58428, true);
|
||||
else
|
||||
target->CastSpell(target,58427,true);
|
||||
target->CastSpell(target, 58427, true);
|
||||
}
|
||||
break;
|
||||
}
|
||||
@@ -1477,7 +1477,7 @@ void Aura::HandleAuraSpecificMods(AuraApplication const * aurApp, Unit * caster,
|
||||
if (apply)
|
||||
{
|
||||
if ((GetSpellProto()->Id == 31821 && target->HasAura(19746, GetCasterGUID())) || (GetSpellProto()->Id == 19746 && target->HasAura(31821)))
|
||||
target->CastSpell(target,64364,true);
|
||||
target->CastSpell(target, 64364, true);
|
||||
}
|
||||
else
|
||||
target->RemoveAurasDueToSpell(64364, GetCasterGUID());
|
||||
@@ -1530,7 +1530,7 @@ void Aura::HandleAuraSpecificMods(AuraApplication const * aurApp, Unit * caster,
|
||||
else if (bloodPresenceAura)
|
||||
{
|
||||
int32 basePoints1=bloodPresenceAura->GetAmount();
|
||||
target->CastCustomSpell(target,63611,NULL,&basePoints1,NULL,true,0,bloodPresenceAura);
|
||||
target->CastCustomSpell(target, 63611, NULL, &basePoints1, NULL, true, 0, bloodPresenceAura);
|
||||
}
|
||||
// Frost Presence bonus
|
||||
if (presence == 48263)
|
||||
@@ -1538,7 +1538,7 @@ void Aura::HandleAuraSpecificMods(AuraApplication const * aurApp, Unit * caster,
|
||||
else if (frostPresenceAura)
|
||||
{
|
||||
int32 basePoints0=frostPresenceAura->GetAmount();
|
||||
target->CastCustomSpell(target,61261,&basePoints0,NULL,NULL,true,0,frostPresenceAura);
|
||||
target->CastCustomSpell(target, 61261, &basePoints0, NULL, NULL, true, 0, frostPresenceAura);
|
||||
}
|
||||
// Unholy Presence bonus
|
||||
if (presence == 48265)
|
||||
@@ -1547,15 +1547,15 @@ void Aura::HandleAuraSpecificMods(AuraApplication const * aurApp, Unit * caster,
|
||||
{
|
||||
// Not listed as any effect, only base points set
|
||||
int32 basePoints0 = SpellMgr::CalculateSpellEffectAmount(unholyPresenceAura->GetSpellProto(), 1);
|
||||
target->CastCustomSpell(target,63622,&basePoints0 ,&basePoints0,&basePoints0,true,0,unholyPresenceAura);
|
||||
target->CastCustomSpell(target,65095,&basePoints0 ,NULL,NULL,true,0,unholyPresenceAura);
|
||||
target->CastCustomSpell(target, 63622, &basePoints0 , &basePoints0, &basePoints0, true, 0, unholyPresenceAura);
|
||||
target->CastCustomSpell(target, 65095, &basePoints0 , NULL, NULL, true, 0, unholyPresenceAura);
|
||||
}
|
||||
target->CastSpell(target,49772, true);
|
||||
target->CastSpell(target, 49772, true);
|
||||
}
|
||||
else if (unholyPresenceAura)
|
||||
{
|
||||
int32 basePoints0=unholyPresenceAura->GetAmount();
|
||||
target->CastCustomSpell(target,49772,&basePoints0,NULL,NULL,true,0,unholyPresenceAura);
|
||||
target->CastCustomSpell(target, 49772, &basePoints0, NULL, NULL, true, 0, unholyPresenceAura);
|
||||
}
|
||||
}
|
||||
else
|
||||
@@ -1880,7 +1880,7 @@ void UnitAura::_ApplyForTarget(Unit * target, Unit * caster, AuraApplication * a
|
||||
|
||||
// register aura diminishing on apply
|
||||
if (DiminishingGroup group = GetDiminishGroup())
|
||||
target->ApplyDiminishingAura(group,true);
|
||||
target->ApplyDiminishingAura(group, true);
|
||||
}
|
||||
|
||||
void UnitAura::_UnapplyForTarget(Unit * target, Unit * caster, AuraApplication * aurApp)
|
||||
@@ -1889,7 +1889,7 @@ void UnitAura::_UnapplyForTarget(Unit * target, Unit * caster, AuraApplication *
|
||||
|
||||
// unregister aura diminishing (and store last time)
|
||||
if (DiminishingGroup group = GetDiminishGroup())
|
||||
target->ApplyDiminishingAura(group,false);
|
||||
target->ApplyDiminishingAura(group, false);
|
||||
}
|
||||
|
||||
void UnitAura::Remove(AuraRemoveMode removeMode)
|
||||
|
||||
@@ -770,7 +770,7 @@ void Spell::SelectSpellTargets()
|
||||
AddUnitTarget(m_targets.getUnitTarget(), i);
|
||||
else if (m_targets.getCorpseTargetGUID())
|
||||
{
|
||||
Corpse *corpse = ObjectAccessor::GetCorpse(*m_caster,m_targets.getCorpseTargetGUID());
|
||||
Corpse *corpse = ObjectAccessor::GetCorpse(*m_caster, m_targets.getCorpseTargetGUID());
|
||||
if (corpse)
|
||||
{
|
||||
Player* owner = ObjectAccessor::FindPlayer(corpse->GetOwnerGUID());
|
||||
@@ -1111,7 +1111,7 @@ void Spell::DoAllEffectOnTarget(TargetInfo *target)
|
||||
// Get mask of effects for target
|
||||
uint8 mask = target->effectMask;
|
||||
|
||||
Unit* unit = m_caster->GetGUID() == target->targetGUID ? m_caster : ObjectAccessor::GetUnit(*m_caster,target->targetGUID);
|
||||
Unit* unit = m_caster->GetGUID() == target->targetGUID ? m_caster : ObjectAccessor::GetUnit(*m_caster, target->targetGUID);
|
||||
if (!unit)
|
||||
{
|
||||
uint8 farMask = 0;
|
||||
@@ -1133,7 +1133,7 @@ void Spell::DoAllEffectOnTarget(TargetInfo *target)
|
||||
for(uint8 i = 0; i < MAX_SPELL_EFFECTS; ++i)
|
||||
{
|
||||
if (farMask & (1<<i))
|
||||
HandleEffects(unit,NULL,NULL,i);
|
||||
HandleEffects(unit, NULL, NULL, i);
|
||||
}
|
||||
return;
|
||||
}
|
||||
@@ -1286,7 +1286,7 @@ void Spell::DoAllEffectOnTarget(TargetInfo *target)
|
||||
|
||||
// Add bonuses and fill damageInfo struct
|
||||
caster->CalculateSpellDamageTaken(&damageInfo, m_damage, m_spellInfo, m_attackType, target->crit);
|
||||
caster->DealDamageMods(damageInfo.target,damageInfo.damage,&damageInfo.absorb);
|
||||
caster->DealDamageMods(damageInfo.target, damageInfo.damage, &damageInfo.absorb);
|
||||
|
||||
// Send log damage message to client
|
||||
caster->SendSpellNonMeleeDamageLog(&damageInfo);
|
||||
@@ -1354,7 +1354,7 @@ void Spell::DoAllEffectOnTarget(TargetInfo *target)
|
||||
// ignore pets or autorepeat/melee casts for speed (not exist quest for spells (hm...)
|
||||
if (m_originalCaster && m_originalCaster->IsControlledByPlayer() && !spellHitTarget->ToCreature()->isPet() && !IsAutoRepeat() && !IsNextMeleeSwingSpell() && !IsChannelActive())
|
||||
if (Player* p = m_originalCaster->GetCharmerOrOwnerPlayerOrPlayerItself())
|
||||
p->CastedCreatureOrGO(spellHitTarget->GetEntry(),spellHitTarget->GetGUID(),m_spellInfo->Id);
|
||||
p->CastedCreatureOrGO(spellHitTarget->GetEntry(), spellHitTarget->GetGUID(), m_spellInfo->Id);
|
||||
}
|
||||
|
||||
if (m_caster && m_caster->GetTypeId() == TYPEID_UNIT && m_caster->ToCreature()->IsAIEnabled)
|
||||
@@ -1441,7 +1441,7 @@ SpellMissInfo Spell::DoSpellHitOnUnit(Unit *unit, const uint32 effectMask, bool
|
||||
}
|
||||
|
||||
// Get Data Needed for Diminishing Returns, some effects may have multiple auras, so this must be done on spell hit, not aura add
|
||||
m_diminishGroup = GetDiminishingReturnsGroupForSpell(m_spellInfo,m_triggeredByAuraSpell);
|
||||
m_diminishGroup = GetDiminishingReturnsGroupForSpell(m_spellInfo, m_triggeredByAuraSpell);
|
||||
if (m_diminishGroup)
|
||||
{
|
||||
m_diminishLevel = unit->GetDiminishing(m_diminishGroup);
|
||||
@@ -1464,7 +1464,7 @@ SpellMissInfo Spell::DoSpellHitOnUnit(Unit *unit, const uint32 effectMask, bool
|
||||
int32 basePoints[3];
|
||||
if (scaleAura)
|
||||
{
|
||||
aurSpellInfo = sSpellMgr->SelectAuraRankForPlayerLevel(m_spellInfo,unitTarget->getLevel());
|
||||
aurSpellInfo = sSpellMgr->SelectAuraRankForPlayerLevel(m_spellInfo, unitTarget->getLevel());
|
||||
ASSERT(aurSpellInfo);
|
||||
for (uint8 i = 0; i < MAX_SPELL_EFFECTS; ++i)
|
||||
{
|
||||
@@ -1480,13 +1480,13 @@ SpellMissInfo Spell::DoSpellHitOnUnit(Unit *unit, const uint32 effectMask, bool
|
||||
if (m_originalCaster)
|
||||
{
|
||||
m_spellAura = Aura::TryCreate(aurSpellInfo, effectMask, unit,
|
||||
m_originalCaster,(aurSpellInfo == m_spellInfo)? &m_spellValue->EffectBasePoints[0] : &basePoints[0], m_CastItem);
|
||||
m_originalCaster, (aurSpellInfo == m_spellInfo)? &m_spellValue->EffectBasePoints[0] : &basePoints[0], m_CastItem);
|
||||
if (m_spellAura)
|
||||
{
|
||||
// Now Reduce spell duration using data received at spell hit
|
||||
int32 duration = m_spellAura->GetMaxDuration();
|
||||
int32 limitduration = GetDiminishingReturnsLimitDuration(m_diminishGroup,aurSpellInfo);
|
||||
float diminishMod = unit->ApplyDiminishingToDuration(m_diminishGroup, duration, m_originalCaster, m_diminishLevel,limitduration);
|
||||
int32 limitduration = GetDiminishingReturnsLimitDuration(m_diminishGroup, aurSpellInfo);
|
||||
float diminishMod = unit->ApplyDiminishingToDuration(m_diminishGroup, duration, m_originalCaster, m_diminishLevel, limitduration);
|
||||
|
||||
// unit is immune to aura if it was diminished to 0 duration
|
||||
if (diminishMod == 0.0f)
|
||||
@@ -1525,7 +1525,7 @@ SpellMissInfo Spell::DoSpellHitOnUnit(Unit *unit, const uint32 effectMask, bool
|
||||
for (uint32 effectNumber = 0; effectNumber < MAX_SPELL_EFFECTS; ++effectNumber)
|
||||
{
|
||||
if (effectMask & (1<<effectNumber))
|
||||
HandleEffects(unit,NULL,NULL,effectNumber);
|
||||
HandleEffects(unit, NULL, NULL, effectNumber);
|
||||
}
|
||||
|
||||
return SPELL_MISS_NONE;
|
||||
@@ -1623,7 +1623,7 @@ void Spell::DoAllEffectOnTarget(GOTargetInfo *target)
|
||||
if (m_originalCaster && m_originalCaster->IsControlledByPlayer() && !IsAutoRepeat() && !IsNextMeleeSwingSpell() && !IsChannelActive())
|
||||
{
|
||||
if (Player* p = m_originalCaster->GetCharmerOrOwnerPlayerOrPlayerItself())
|
||||
p->CastedCreatureOrGO(go->GetEntry(),go->GetGUID(),m_spellInfo->Id);
|
||||
p->CastedCreatureOrGO(go->GetEntry(), go->GetGUID(), m_spellInfo->Id);
|
||||
}
|
||||
CallScriptAfterHitHandlers();
|
||||
}
|
||||
@@ -1683,7 +1683,7 @@ bool Spell::UpdateChanneledTargetList()
|
||||
{
|
||||
if (AuraApplication * aurApp = unit->GetAuraApplication(m_spellInfo->Id, m_originalCasterGUID))
|
||||
{
|
||||
if (m_caster != unit && !m_caster->IsWithinDistInMap(unit,range))
|
||||
if (m_caster != unit && !m_caster->IsWithinDistInMap(unit, range))
|
||||
{
|
||||
ihit->effectMask &= ~aurApp->GetEffectMask();
|
||||
unit->RemoveAura(aurApp);
|
||||
@@ -2307,7 +2307,7 @@ void Spell::SelectEffectTargets(uint32 i, uint32 cur)
|
||||
break;
|
||||
case TARGET_DST_HOME:
|
||||
if (m_caster->GetTypeId() == TYPEID_PLAYER)
|
||||
m_targets.setDst(m_caster->ToPlayer()->m_homebindX,m_caster->ToPlayer()->m_homebindY,m_caster->ToPlayer()->m_homebindZ, m_caster->ToPlayer()->GetOrientation(), m_caster->ToPlayer()->m_homebindMapId);
|
||||
m_targets.setDst(m_caster->ToPlayer()->m_homebindX, m_caster->ToPlayer()->m_homebindY, m_caster->ToPlayer()->m_homebindZ, m_caster->ToPlayer()->GetOrientation(), m_caster->ToPlayer()->m_homebindMapId);
|
||||
break;
|
||||
case TARGET_DST_NEARBY_ENTRY:
|
||||
{
|
||||
@@ -2559,7 +2559,7 @@ void Spell::SelectEffectTargets(uint32 i, uint32 cur)
|
||||
else
|
||||
{
|
||||
if (m_caster->GetTypeId() == TYPEID_PLAYER)
|
||||
m_caster->ToPlayer()->RemoveSpellCooldown(m_spellInfo->Id,true);
|
||||
m_caster->ToPlayer()->RemoveSpellCooldown(m_spellInfo->Id, true);
|
||||
SendCastResult(SPELL_FAILED_CANT_DO_THAT_RIGHT_NOW);
|
||||
finish(false);
|
||||
}
|
||||
@@ -3057,7 +3057,7 @@ void Spell::cancel()
|
||||
m_caster->ToPlayer()->RemoveGlobalCooldown(m_spellInfo);
|
||||
|
||||
m_caster->RemoveDynObject(m_spellInfo->Id);
|
||||
m_caster->RemoveGameObject(m_spellInfo->Id,true);
|
||||
m_caster->RemoveGameObject(m_spellInfo->Id, true);
|
||||
|
||||
//set state back so finish will be processed
|
||||
m_spellState = oldState;
|
||||
@@ -3265,7 +3265,7 @@ void Spell::cast(bool skipCheck)
|
||||
case SPELL_EFFECT_JUMP_DEST:
|
||||
case SPELL_EFFECT_LEAP_BACK:
|
||||
case SPELL_EFFECT_ACTIVATE_RUNE:
|
||||
HandleEffects(NULL,NULL,NULL,i);
|
||||
HandleEffects(NULL, NULL, NULL, i);
|
||||
m_effectMask |= (1<<i);
|
||||
break;
|
||||
}
|
||||
@@ -3544,7 +3544,7 @@ void Spell::SendSpellCooldown()
|
||||
if (m_spellInfo->Attributes & (SPELL_ATTR0_DISABLED_WHILE_ACTIVE | SPELL_ATTR0_PASSIVE) || m_IsTriggeredSpell)
|
||||
return;
|
||||
|
||||
_player->AddSpellAndCategoryCooldowns(m_spellInfo,m_CastItem ? m_CastItem->GetEntry() : 0, this);
|
||||
_player->AddSpellAndCategoryCooldowns(m_spellInfo, m_CastItem ? m_CastItem->GetEntry() : 0, this);
|
||||
}
|
||||
|
||||
void Spell::update(uint32 difftime)
|
||||
@@ -4313,7 +4313,7 @@ void Spell::TakeCastItem()
|
||||
{
|
||||
// This code is to avoid a crash
|
||||
// I'm not sure, if this is really an error, but I guess every item needs a prototype
|
||||
sLog->outError("Cast item has no item prototype highId=%d, lowId=%d",m_CastItem->GetGUIDHigh(), m_CastItem->GetGUIDLow());
|
||||
sLog->outError("Cast item has no item prototype highId=%d, lowId=%d", m_CastItem->GetGUIDHigh(), m_CastItem->GetGUIDLow());
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -4641,7 +4641,7 @@ void Spell::HandleThreatSpells(uint32 spellId)
|
||||
sLog->outStaticDebug("Spell %u, rank %u, added an additional %i threat", spellId, sSpellMgr->GetSpellRank(spellId), threat);
|
||||
}
|
||||
|
||||
void Spell::HandleEffects(Unit *pUnitTarget,Item *pItemTarget,GameObject *pGOTarget,uint32 i)
|
||||
void Spell::HandleEffects(Unit *pUnitTarget, Item *pItemTarget, GameObject *pGOTarget, uint32 i)
|
||||
{
|
||||
//effect has been handled, skip it
|
||||
if (m_effectMask & (1<<i))
|
||||
@@ -4904,7 +4904,7 @@ SpellCastResult Spell::CheckCast(bool strict)
|
||||
}
|
||||
|
||||
// who can give me an example to show what is the use of this
|
||||
// even if we need check, check by effect rather than whole spell, otherwise 57108,57143 are broken
|
||||
// even if we need check, check by effect rather than whole spell, otherwise 57108, 57143 are broken
|
||||
/*
|
||||
// TODO: this check can be applied and for player to prevent cheating when IsPositiveSpell will return always correct result.
|
||||
// check target for pet/charmed casts (not self targeted), self targeted cast used for area effects and etc
|
||||
@@ -4933,7 +4933,7 @@ SpellCastResult Spell::CheckCast(bool strict)
|
||||
//Must be behind the target.
|
||||
if (m_spellInfo->AttributesEx2 == SPELL_ATTR2_UNK20 && m_spellInfo->AttributesEx & SPELL_ATTR1_UNK9 && target->HasInArc(static_cast<float>(M_PI), m_caster)
|
||||
//Exclusion for Pounce: Facing Limitation was removed in 2.0.1, but it still uses the same, old Ex-Flags
|
||||
&& (!(m_spellInfo->SpellFamilyName == SPELLFAMILY_DRUID && m_spellInfo->SpellFamilyFlags.IsEqual(0x20000,0,0)))
|
||||
&& (!(m_spellInfo->SpellFamilyName == SPELLFAMILY_DRUID && m_spellInfo->SpellFamilyFlags.IsEqual(0x20000, 0, 0)))
|
||||
//Mutilate no longer requires you be behind the target as of patch 3.0.3
|
||||
&& (!(m_spellInfo->SpellFamilyName == SPELLFAMILY_ROGUE && m_spellInfo->SpellFamilyFlags[1] & 0x200000))
|
||||
//Exclusion for Throw: Facing limitation was added in 3.2.x, but that shouldn't be
|
||||
@@ -4973,9 +4973,9 @@ SpellCastResult Spell::CheckCast(bool strict)
|
||||
if (m_caster->GetTypeId() == TYPEID_UNIT || !m_caster->ToPlayer()->isGameMaster())
|
||||
{
|
||||
uint32 zone, area;
|
||||
m_caster->GetZoneAndAreaId(zone,area);
|
||||
m_caster->GetZoneAndAreaId(zone, area);
|
||||
|
||||
SpellCastResult locRes= sSpellMgr->GetSpellAllowedInLocationError(m_spellInfo,m_caster->GetMapId(),zone,area,
|
||||
SpellCastResult locRes= sSpellMgr->GetSpellAllowedInLocationError(m_spellInfo, m_caster->GetMapId(), zone, area,
|
||||
m_caster->GetTypeId() == TYPEID_PLAYER ? m_caster->ToPlayer() : NULL);
|
||||
if (locRes != SPELL_CAST_OK)
|
||||
return locRes;
|
||||
@@ -5061,7 +5061,7 @@ SpellCastResult Spell::CheckCast(bool strict)
|
||||
}
|
||||
else if (m_spellInfo->Id == 52264) // Deliver Stolen Horse
|
||||
{
|
||||
if (!m_caster->FindNearestCreature(28653,5))
|
||||
if (!m_caster->FindNearestCreature(28653, 5))
|
||||
return SPELL_FAILED_OUT_OF_RANGE;
|
||||
}
|
||||
else if (m_spellInfo->Id == 31789) // Righteous Defense
|
||||
@@ -5989,7 +5989,7 @@ SpellCastResult Spell::CheckItems()
|
||||
cell.data.Part.reserved = ALL_DISTRICT;
|
||||
|
||||
GameObject* ok = NULL;
|
||||
Trinity::GameObjectFocusCheck go_check(m_caster,m_spellInfo->RequiresSpellFocus);
|
||||
Trinity::GameObjectFocusCheck go_check(m_caster, m_spellInfo->RequiresSpellFocus);
|
||||
Trinity::GameObjectSearcher<Trinity::GameObjectFocusCheck> checker(m_caster, ok, go_check);
|
||||
|
||||
TypeContainerVisitor<Trinity::GameObjectSearcher<Trinity::GameObjectFocusCheck>, GridTypeMapContainer > object_checker(checker);
|
||||
@@ -6051,7 +6051,7 @@ SpellCastResult Spell::CheckItems()
|
||||
{
|
||||
if (m_spellInfo->Totem[i] != 0)
|
||||
{
|
||||
if (p_caster->HasItemCount(m_spellInfo->Totem[i],1))
|
||||
if (p_caster->HasItemCount(m_spellInfo->Totem[i], 1))
|
||||
{
|
||||
totems -= 1;
|
||||
continue;
|
||||
@@ -6106,10 +6106,10 @@ SpellCastResult Spell::CheckItems()
|
||||
{
|
||||
if (!(m_spellInfo->SpellFamilyName == SPELLFAMILY_MAGE && (m_spellInfo->SpellFamilyFlags[0] & 0x40000000)))
|
||||
return SPELL_FAILED_TOO_MANY_OF_ITEM;
|
||||
else if (!(p_caster->HasItemCount(m_spellInfo->EffectItemType[i],1)))
|
||||
else if (!(p_caster->HasItemCount(m_spellInfo->EffectItemType[i], 1)))
|
||||
return SPELL_FAILED_TOO_MANY_OF_ITEM;
|
||||
else
|
||||
p_caster->CastSpell(m_caster,SpellMgr::CalculateSpellEffectAmount(m_spellInfo, 1),false); // move this to anywhere
|
||||
p_caster->CastSpell(m_caster, SpellMgr::CalculateSpellEffectAmount(m_spellInfo, 1), false); // move this to anywhere
|
||||
return SPELL_FAILED_DONT_REPORT;
|
||||
}
|
||||
}
|
||||
@@ -6479,7 +6479,7 @@ void Spell::UpdatePointers()
|
||||
m_originalCaster = m_caster;
|
||||
else
|
||||
{
|
||||
m_originalCaster = ObjectAccessor::GetUnit(*m_caster,m_originalCasterGUID);
|
||||
m_originalCaster = ObjectAccessor::GetUnit(*m_caster, m_originalCasterGUID);
|
||||
if (m_originalCaster && !m_originalCaster->IsInWorld())
|
||||
m_originalCaster = NULL;
|
||||
}
|
||||
|
||||
@@ -492,7 +492,7 @@ class Spell
|
||||
void SendResurrectRequest(Player* target);
|
||||
void SendPlaySpellVisual(uint32 SpellID);
|
||||
|
||||
void HandleEffects(Unit *pUnitTarget,Item *pItemTarget,GameObject *pGOTarget,uint32 i);
|
||||
void HandleEffects(Unit *pUnitTarget, Item *pItemTarget, GameObject *pGOTarget, uint32 i);
|
||||
void HandleThreatSpells(uint32 spellId);
|
||||
|
||||
const SpellEntry * const m_spellInfo;
|
||||
|
||||
@@ -577,7 +577,7 @@ void Spell::SpellDamageSchoolDmg(SpellEffIndex effIndex)
|
||||
// We are in Shadow Form
|
||||
if (m_caster->GetShapeshiftForm() == FORM_SHADOW)
|
||||
// We have Improved Mind Blast
|
||||
if (AuraEffect * aurEff = m_caster->GetDummyAuraEffect(SPELLFAMILY_PRIEST,95,0))
|
||||
if (AuraEffect * aurEff = m_caster->GetDummyAuraEffect(SPELLFAMILY_PRIEST, 95, 0))
|
||||
// Chance has been successfully rolled
|
||||
if (roll_chance_i(aurEff->GetAmount()))
|
||||
m_caster->CastSpell(unitTarget, 48301, true);
|
||||
@@ -809,7 +809,7 @@ void Spell::EffectDummy(SpellEffIndex effIndex)
|
||||
case 12850: damage *= 0.32f; break; // Rank 2
|
||||
case 12868: damage *= 0.48f; break; // Rank 3
|
||||
default:
|
||||
sLog->outError("Spell::EffectDummy: Spell %u not handled in DW",m_spellInfo->Id);
|
||||
sLog->outError("Spell::EffectDummy: Spell %u not handled in DW", m_spellInfo->Id);
|
||||
return;
|
||||
};
|
||||
|
||||
@@ -838,7 +838,7 @@ void Spell::EffectDummy(SpellEffIndex effIndex)
|
||||
m_caster->CastCustomSpell(unitTarget, 26470, &damage, NULL, NULL, true);
|
||||
break;
|
||||
default:
|
||||
sLog->outError("EffectDummy: Non-handled case for spell 13567 for triggered aura %u",m_triggeredByAuraSpell->Id);
|
||||
sLog->outError("EffectDummy: Non-handled case for spell 13567 for triggered aura %u", m_triggeredByAuraSpell->Id);
|
||||
break;
|
||||
}
|
||||
return;
|
||||
@@ -942,13 +942,13 @@ void Spell::EffectDummy(SpellEffIndex effIndex)
|
||||
? 29277 // Summon Purified Helboar Meat
|
||||
: 29278; // Summon Toxic Helboar Meat
|
||||
|
||||
m_caster->CastSpell(m_caster,spell_id,true,NULL);
|
||||
m_caster->CastSpell(m_caster, spell_id, true, NULL);
|
||||
return;
|
||||
}
|
||||
case 29858: // Soulshatter
|
||||
if (unitTarget && unitTarget->CanHaveThreatList()
|
||||
&& unitTarget->getThreatManager().getThreat(m_caster) > 0.0f)
|
||||
m_caster->CastSpell(unitTarget,32835,true);
|
||||
m_caster->CastSpell(unitTarget, 32835, true);
|
||||
return;
|
||||
case 30458: // Nigh Invulnerability
|
||||
if (!m_CastItem) return;
|
||||
@@ -1196,10 +1196,10 @@ void Spell::EffectDummy(SpellEffIndex effIndex)
|
||||
}
|
||||
case 64385: // Unusual Compass
|
||||
{
|
||||
m_caster->SetOrientation(float(urand(0,62832)) / 10000.0f);
|
||||
m_caster->SetOrientation(float(urand(0, 62832)) / 10000.0f);
|
||||
WorldPacket data;
|
||||
m_caster->BuildHeartBeatMsg(&data);
|
||||
m_caster->SendMessageToSet(&data,true);
|
||||
m_caster->SendMessageToSet(&data, true);
|
||||
return;
|
||||
}
|
||||
case 53808: // Pygmy Oil
|
||||
@@ -1542,7 +1542,7 @@ void Spell::EffectDummy(SpellEffIndex effIndex)
|
||||
}
|
||||
|
||||
// pet auras
|
||||
if (PetAura const* petSpell = sSpellMgr->GetPetAura(m_spellInfo->Id,effIndex))
|
||||
if (PetAura const* petSpell = sSpellMgr->GetPetAura(m_spellInfo->Id, effIndex))
|
||||
{
|
||||
m_caster->AddPetAura(petSpell);
|
||||
return;
|
||||
@@ -1571,14 +1571,14 @@ void Spell::EffectTriggerSpellWithValue(SpellEffIndex effIndex)
|
||||
|
||||
if (!spellInfo)
|
||||
{
|
||||
sLog->outError("EffectTriggerSpellWithValue of spell %u: triggering unknown spell id %i", m_spellInfo->Id,triggered_spell_id);
|
||||
sLog->outError("EffectTriggerSpellWithValue of spell %u: triggering unknown spell id %i", m_spellInfo->Id, triggered_spell_id);
|
||||
return;
|
||||
}
|
||||
|
||||
int32 bp = damage;
|
||||
Unit * caster = GetTriggeredSpellCaster(spellInfo, m_caster, unitTarget);
|
||||
|
||||
caster->CastCustomSpell(unitTarget,triggered_spell_id,&bp,&bp,&bp,true);
|
||||
caster->CastCustomSpell(unitTarget, triggered_spell_id, &bp, &bp, &bp, true);
|
||||
}
|
||||
|
||||
void Spell::EffectTriggerRitualOfSummoning(SpellEffIndex effIndex)
|
||||
@@ -1588,13 +1588,13 @@ void Spell::EffectTriggerRitualOfSummoning(SpellEffIndex effIndex)
|
||||
|
||||
if (!spellInfo)
|
||||
{
|
||||
sLog->outError("EffectTriggerRitualOfSummoning of spell %u: triggering unknown spell id %i", m_spellInfo->Id,triggered_spell_id);
|
||||
sLog->outError("EffectTriggerRitualOfSummoning of spell %u: triggering unknown spell id %i", m_spellInfo->Id, triggered_spell_id);
|
||||
return;
|
||||
}
|
||||
|
||||
finish();
|
||||
|
||||
m_caster->CastSpell(unitTarget,spellInfo,false);
|
||||
m_caster->CastSpell(unitTarget, spellInfo, false);
|
||||
}
|
||||
|
||||
void Spell::EffectForceCast(SpellEffIndex effIndex)
|
||||
@@ -1609,7 +1609,7 @@ void Spell::EffectForceCast(SpellEffIndex effIndex)
|
||||
|
||||
if (!spellInfo)
|
||||
{
|
||||
sLog->outError("EffectForceCast of spell %u: triggering unknown spell id %i", m_spellInfo->Id,triggered_spell_id);
|
||||
sLog->outError("EffectForceCast of spell %u: triggering unknown spell id %i", m_spellInfo->Id, triggered_spell_id);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -1649,7 +1649,7 @@ void Spell::EffectForceCastWithValue(SpellEffIndex effIndex)
|
||||
|
||||
if (!spellInfo)
|
||||
{
|
||||
sLog->outError("EffectForceCastWithValue of spell %u: triggering unknown spell id %i", m_spellInfo->Id,triggered_spell_id);
|
||||
sLog->outError("EffectForceCastWithValue of spell %u: triggering unknown spell id %i", m_spellInfo->Id, triggered_spell_id);
|
||||
return;
|
||||
}
|
||||
int32 bp = damage;
|
||||
@@ -1664,7 +1664,7 @@ void Spell::EffectTriggerSpell(SpellEffIndex effIndex)
|
||||
if (!unitTarget)
|
||||
{
|
||||
if (gameObjTarget || itemTarget)
|
||||
sLog->outError("Spell::EffectTriggerSpell (Spell: %u): Unsupported non-unit case!",m_spellInfo->Id);
|
||||
sLog->outError("Spell::EffectTriggerSpell (Spell: %u): Unsupported non-unit case!", m_spellInfo->Id);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -1793,7 +1793,7 @@ void Spell::EffectTriggerSpell(SpellEffIndex effIndex)
|
||||
SpellEntry const *spellInfo = sSpellStore.LookupEntry(triggered_spell_id);
|
||||
if (!spellInfo)
|
||||
{
|
||||
sLog->outError("EffectTriggerSpell of spell %u: triggering unknown spell id %i", m_spellInfo->Id,triggered_spell_id);
|
||||
sLog->outError("EffectTriggerSpell of spell %u: triggering unknown spell id %i", m_spellInfo->Id, triggered_spell_id);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -1807,7 +1807,7 @@ void Spell::EffectTriggerSpell(SpellEffIndex effIndex)
|
||||
// so this just for speedup places in else
|
||||
Unit * caster = GetTriggeredSpellCaster(spellInfo, m_caster, unitTarget);
|
||||
|
||||
caster->CastSpell(unitTarget,spellInfo,true, 0, 0, (originalCaster ? originalCaster->GetGUID() : 0));
|
||||
caster->CastSpell(unitTarget, spellInfo, true, 0, 0, (originalCaster ? originalCaster->GetGUID() : 0));
|
||||
}
|
||||
|
||||
void Spell::EffectTriggerMissileSpell(SpellEffIndex effIndex)
|
||||
@@ -1820,7 +1820,7 @@ void Spell::EffectTriggerMissileSpell(SpellEffIndex effIndex)
|
||||
if (!spellInfo)
|
||||
{
|
||||
sLog->outError("EffectTriggerMissileSpell of spell %u (eff: %u): triggering unknown spell id %u",
|
||||
m_spellInfo->Id,effIndex,triggered_spell_id);
|
||||
m_spellInfo->Id, effIndex, triggered_spell_id);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -1843,15 +1843,15 @@ void Spell::EffectJump(SpellEffIndex effIndex)
|
||||
if (m_caster->isInFlight())
|
||||
return;
|
||||
|
||||
float x,y,z,o;
|
||||
float x, y, z, o;
|
||||
if (m_targets.getUnitTarget())
|
||||
{
|
||||
m_targets.getUnitTarget()->GetContactPoint(m_caster,x,y,z,CONTACT_DISTANCE);
|
||||
m_targets.getUnitTarget()->GetContactPoint(m_caster, x, y, z, CONTACT_DISTANCE);
|
||||
o = m_caster->GetOrientation();
|
||||
}
|
||||
else if (m_targets.getGOTarget())
|
||||
{
|
||||
m_targets.getGOTarget()->GetContactPoint(m_caster,x,y,z,CONTACT_DISTANCE);
|
||||
m_targets.getGOTarget()->GetContactPoint(m_caster, x, y, z, CONTACT_DISTANCE);
|
||||
o = m_caster->GetOrientation();
|
||||
}
|
||||
else
|
||||
@@ -1871,7 +1871,7 @@ void Spell::EffectJumpDest(SpellEffIndex effIndex)
|
||||
return;
|
||||
|
||||
// Init dest coordinates
|
||||
float x,y,z,o;
|
||||
float x, y, z, o;
|
||||
if (m_targets.HasDst())
|
||||
{
|
||||
m_targets.m_dstPos.GetPosition(x, y, z);
|
||||
@@ -1935,7 +1935,7 @@ void Spell::EffectTeleportUnits(SpellEffIndex /*effIndex*/)
|
||||
|
||||
if (unitTarget->getLevel() > uiMaxSafeLevel)
|
||||
{
|
||||
unitTarget->AddAura(60444,unitTarget); //Apply Lost! Aura
|
||||
unitTarget->AddAura(60444, unitTarget); //Apply Lost! Aura
|
||||
return;
|
||||
}
|
||||
break;
|
||||
@@ -1943,18 +1943,18 @@ void Spell::EffectTeleportUnits(SpellEffIndex /*effIndex*/)
|
||||
if (Player* pTarget = unitTarget->ToPlayer())
|
||||
{
|
||||
if (pTarget->GetTeamId() == TEAM_ALLIANCE)
|
||||
m_targets.setDst(442.24f,-835.25f,44.30f,0.06f,628);
|
||||
m_targets.setDst(442.24f, -835.25f, 44.30f, 0.06f, 628);
|
||||
else
|
||||
m_targets.setDst(1120.43f,-762.11f,47.92f,2.94f,628);
|
||||
m_targets.setDst(1120.43f, -762.11f, 47.92f, 2.94f, 628);
|
||||
}
|
||||
break;
|
||||
case 66551: // teleports inside (Isle of Conquest)
|
||||
if (Player* pTarget = unitTarget->ToPlayer())
|
||||
{
|
||||
if (pTarget->GetTeamId() == TEAM_ALLIANCE)
|
||||
m_targets.setDst(389.57f,-832.38f,48.65f,3.00f,628);
|
||||
m_targets.setDst(389.57f, -832.38f, 48.65f, 3.00f, 628);
|
||||
else
|
||||
m_targets.setDst(1174.85f,-763.24f,48.72f,6.26f,628);
|
||||
m_targets.setDst(1174.85f, -763.24f, 48.72f, 6.26f, 628);
|
||||
}
|
||||
break;
|
||||
}
|
||||
@@ -2276,7 +2276,7 @@ void Spell::SpellDamageHeal(SpellEffIndex /*effIndex*/)
|
||||
unitTarget->RemoveAura(targetAura->GetId(), targetAura->GetCasterGUID());
|
||||
|
||||
//addhealth += tickheal * tickcount;
|
||||
//addhealth = caster->SpellHealingBonus(m_spellInfo, addhealth,HEAL, unitTarget);
|
||||
//addhealth = caster->SpellHealingBonus(m_spellInfo, addhealth, HEAL, unitTarget);
|
||||
}
|
||||
// Glyph of Nourish
|
||||
else if (m_spellInfo->SpellFamilyName == SPELLFAMILY_DRUID && m_spellInfo->SpellFamilyFlags[1] & 0x2000000)
|
||||
@@ -2482,7 +2482,7 @@ void Spell::DoCreateItem(uint32 /*i*/, uint32 itemtype)
|
||||
|
||||
void Spell::EffectCreateItem(SpellEffIndex effIndex)
|
||||
{
|
||||
DoCreateItem(effIndex,m_spellInfo->EffectItemType[effIndex]);
|
||||
DoCreateItem(effIndex, m_spellInfo->EffectItemType[effIndex]);
|
||||
ExecuteLogEffectCreateItem(effIndex, m_spellInfo->EffectItemType[effIndex]);
|
||||
}
|
||||
|
||||
@@ -2660,10 +2660,10 @@ void Spell::EffectEnergize(SpellEffIndex effIndex)
|
||||
if (!avalibleElixirs.empty())
|
||||
{
|
||||
// cast random elixir on target
|
||||
uint32 rand_spell = urand(0,avalibleElixirs.size()-1);
|
||||
uint32 rand_spell = urand(0, avalibleElixirs.size()-1);
|
||||
std::set<uint32>::iterator itr = avalibleElixirs.begin();
|
||||
std::advance(itr, rand_spell);
|
||||
m_caster->CastSpell(unitTarget,*itr,true,m_CastItem);
|
||||
m_caster->CastSpell(unitTarget, *itr, true, m_CastItem);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -2732,20 +2732,20 @@ void Spell::SendLoot(uint64 guid, LootType loottype)
|
||||
case GAMEOBJECT_TYPE_SPELL_FOCUS:
|
||||
// triggering linked GO
|
||||
if (uint32 trapEntry = gameObjTarget->GetGOInfo()->spellFocus.linkedTrapId)
|
||||
gameObjTarget->TriggeringLinkedGameObject(trapEntry,m_caster);
|
||||
gameObjTarget->TriggeringLinkedGameObject(trapEntry, m_caster);
|
||||
return;
|
||||
|
||||
case GAMEOBJECT_TYPE_CHEST:
|
||||
// TODO: possible must be moved to loot release (in different from linked triggering)
|
||||
if (gameObjTarget->GetGOInfo()->chest.eventId)
|
||||
{
|
||||
sLog->outDebug(LOG_FILTER_SPELLS_AURAS, "Chest ScriptStart id %u for GO %u", gameObjTarget->GetGOInfo()->chest.eventId,gameObjTarget->GetDBTableGUIDLow());
|
||||
sLog->outDebug(LOG_FILTER_SPELLS_AURAS, "Chest ScriptStart id %u for GO %u", gameObjTarget->GetGOInfo()->chest.eventId, gameObjTarget->GetDBTableGUIDLow());
|
||||
player->GetMap()->ScriptsStart(sEventScripts, gameObjTarget->GetGOInfo()->chest.eventId, player, gameObjTarget);
|
||||
}
|
||||
|
||||
// triggering linked GO
|
||||
if (uint32 trapEntry = gameObjTarget->GetGOInfo()->chest.linkedTrapId)
|
||||
gameObjTarget->TriggeringLinkedGameObject(trapEntry,m_caster);
|
||||
gameObjTarget->TriggeringLinkedGameObject(trapEntry, m_caster);
|
||||
|
||||
// Don't return, let loots been taken
|
||||
default:
|
||||
@@ -3351,7 +3351,7 @@ void Spell::EffectPickPocket(SpellEffIndex /*effIndex*/)
|
||||
|
||||
// victim have to be alive and humanoid or undead
|
||||
if (unitTarget->isAlive() && (unitTarget->GetCreatureTypeMask() &CREATURE_TYPEMASK_HUMANOID_OR_UNDEAD) != 0)
|
||||
m_caster->ToPlayer()->SendLoot(unitTarget->GetGUID(),LOOT_PICKPOCKETING);
|
||||
m_caster->ToPlayer()->SendLoot(unitTarget->GetGUID(), LOOT_PICKPOCKETING);
|
||||
}
|
||||
|
||||
void Spell::EffectAddFarsight(SpellEffIndex effIndex)
|
||||
@@ -3398,10 +3398,10 @@ void Spell::EffectTeleUnitsFaceCaster(SpellEffIndex effIndex)
|
||||
|
||||
float dis = (float)m_caster->GetSpellRadiusForTarget(unitTarget, sSpellRadiusStore.LookupEntry(m_spellInfo->EffectRadiusIndex[effIndex]));
|
||||
|
||||
float fx,fy,fz;
|
||||
m_caster->GetClosePoint(fx,fy,fz,unitTarget->GetObjectSize(),dis);
|
||||
float fx, fy, fz;
|
||||
m_caster->GetClosePoint(fx, fy, fz, unitTarget->GetObjectSize(), dis);
|
||||
|
||||
unitTarget->NearTeleportTo(fx,fy,fz,-m_caster->GetOrientation(),unitTarget == m_caster);
|
||||
unitTarget->NearTeleportTo(fx, fy, fz, -m_caster->GetOrientation(), unitTarget == m_caster);
|
||||
}
|
||||
|
||||
void Spell::EffectLearnSkill(SpellEffIndex effIndex)
|
||||
@@ -3426,7 +3426,7 @@ void Spell::EffectAddHonor(SpellEffIndex /*effIndex*/)
|
||||
if (m_CastItem)
|
||||
{
|
||||
unitTarget->ToPlayer()->RewardHonor(NULL, 1, damage/10);
|
||||
sLog->outDebug(LOG_FILTER_SPELLS_AURAS, "SpellEffect::AddHonor (spell_id %u) rewards %d honor points (item %u) for player: %u", m_spellInfo->Id, damage/10, m_CastItem->GetEntry(),unitTarget->ToPlayer()->GetGUIDLow());
|
||||
sLog->outDebug(LOG_FILTER_SPELLS_AURAS, "SpellEffect::AddHonor (spell_id %u) rewards %d honor points (item %u) for player: %u", m_spellInfo->Id, damage/10, m_CastItem->GetEntry(), unitTarget->ToPlayer()->GetGUIDLow());
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -3451,7 +3451,7 @@ void Spell::EffectTradeSkill(SpellEffIndex /*effIndex*/)
|
||||
return;
|
||||
// uint32 skillid = m_spellInfo->EffectMiscValue[i];
|
||||
// uint16 skillmax = unitTarget->ToPlayer()->(skillid);
|
||||
// unitTarget->ToPlayer()->SetSkill(skillid,skillval?skillval:1,skillmax+75);
|
||||
// unitTarget->ToPlayer()->SetSkill(skillid, skillval?skillval:1, skillmax+75);
|
||||
}
|
||||
|
||||
void Spell::EffectEnchantItemPerm(SpellEffIndex effIndex)
|
||||
@@ -3468,10 +3468,10 @@ void Spell::EffectEnchantItemPerm(SpellEffIndex effIndex)
|
||||
{
|
||||
// destroy one vellum from stack
|
||||
uint32 count = 1;
|
||||
p_caster->DestroyItemCount(itemTarget,count,true);
|
||||
p_caster->DestroyItemCount(itemTarget, count, true);
|
||||
unitTarget=p_caster;
|
||||
// and add a scroll
|
||||
DoCreateItem(effIndex,m_spellInfo->EffectItemType[effIndex]);
|
||||
DoCreateItem(effIndex, m_spellInfo->EffectItemType[effIndex]);
|
||||
itemTarget=NULL;
|
||||
m_targets.setItemTarget(NULL);
|
||||
}
|
||||
@@ -3496,19 +3496,19 @@ void Spell::EffectEnchantItemPerm(SpellEffIndex effIndex)
|
||||
|
||||
if (item_owner != p_caster && p_caster->GetSession()->GetSecurity() > SEC_PLAYER && sWorld->getBoolConfig(CONFIG_GM_LOG_TRADE))
|
||||
{
|
||||
sLog->outCommand(p_caster->GetSession()->GetAccountId(),"GM %s (Account: %u) enchanting(perm): %s (Entry: %d) for player: %s (Account: %u)",
|
||||
p_caster->GetName(),p_caster->GetSession()->GetAccountId(),
|
||||
sLog->outCommand(p_caster->GetSession()->GetAccountId(), "GM %s (Account: %u) enchanting(perm): %s (Entry: %d) for player: %s (Account: %u)",
|
||||
p_caster->GetName(), p_caster->GetSession()->GetAccountId(),
|
||||
itemTarget->GetTemplate()->Name1.c_str(), itemTarget->GetEntry(),
|
||||
item_owner->GetName(),item_owner->GetSession()->GetAccountId());
|
||||
item_owner->GetName(), item_owner->GetSession()->GetAccountId());
|
||||
}
|
||||
|
||||
// remove old enchanting before applying new if equipped
|
||||
item_owner->ApplyEnchantment(itemTarget,PERM_ENCHANTMENT_SLOT,false);
|
||||
item_owner->ApplyEnchantment(itemTarget, PERM_ENCHANTMENT_SLOT, false);
|
||||
|
||||
itemTarget->SetEnchantment(PERM_ENCHANTMENT_SLOT, enchant_id, 0, 0);
|
||||
|
||||
// add new enchanting if equipped
|
||||
item_owner->ApplyEnchantment(itemTarget,PERM_ENCHANTMENT_SLOT,true);
|
||||
item_owner->ApplyEnchantment(itemTarget, PERM_ENCHANTMENT_SLOT, true);
|
||||
|
||||
itemTarget->SetSoulboundTradeable(NULL, item_owner, false);
|
||||
}
|
||||
@@ -3545,7 +3545,7 @@ void Spell::EffectEnchantItemPrismatic(SpellEffIndex effIndex)
|
||||
if (!add_socket)
|
||||
{
|
||||
sLog->outError("Spell::EffectEnchantItemPrismatic: attempt apply enchant spell %u with SPELL_EFFECT_ENCHANT_ITEM_PRISMATIC (%u) but without ITEM_ENCHANTMENT_TYPE_PRISMATIC_SOCKET (%u), not suppoted yet.",
|
||||
m_spellInfo->Id,SPELL_EFFECT_ENCHANT_ITEM_PRISMATIC,ITEM_ENCHANTMENT_TYPE_PRISMATIC_SOCKET);
|
||||
m_spellInfo->Id, SPELL_EFFECT_ENCHANT_ITEM_PRISMATIC, ITEM_ENCHANTMENT_TYPE_PRISMATIC_SOCKET);
|
||||
return;
|
||||
}
|
||||
}
|
||||
@@ -3557,19 +3557,19 @@ void Spell::EffectEnchantItemPrismatic(SpellEffIndex effIndex)
|
||||
|
||||
if (item_owner != p_caster && p_caster->GetSession()->GetSecurity() > SEC_PLAYER && sWorld->getBoolConfig(CONFIG_GM_LOG_TRADE))
|
||||
{
|
||||
sLog->outCommand(p_caster->GetSession()->GetAccountId(),"GM %s (Account: %u) enchanting(perm): %s (Entry: %d) for player: %s (Account: %u)",
|
||||
p_caster->GetName(),p_caster->GetSession()->GetAccountId(),
|
||||
sLog->outCommand(p_caster->GetSession()->GetAccountId(), "GM %s (Account: %u) enchanting(perm): %s (Entry: %d) for player: %s (Account: %u)",
|
||||
p_caster->GetName(), p_caster->GetSession()->GetAccountId(),
|
||||
itemTarget->GetTemplate()->Name1.c_str(), itemTarget->GetEntry(),
|
||||
item_owner->GetName(),item_owner->GetSession()->GetAccountId());
|
||||
item_owner->GetName(), item_owner->GetSession()->GetAccountId());
|
||||
}
|
||||
|
||||
// remove old enchanting before applying new if equipped
|
||||
item_owner->ApplyEnchantment(itemTarget,PRISMATIC_ENCHANTMENT_SLOT,false);
|
||||
item_owner->ApplyEnchantment(itemTarget, PRISMATIC_ENCHANTMENT_SLOT, false);
|
||||
|
||||
itemTarget->SetEnchantment(PRISMATIC_ENCHANTMENT_SLOT, enchant_id, 0, 0);
|
||||
|
||||
// add new enchanting if equipped
|
||||
item_owner->ApplyEnchantment(itemTarget,PRISMATIC_ENCHANTMENT_SLOT,true);
|
||||
item_owner->ApplyEnchantment(itemTarget, PRISMATIC_ENCHANTMENT_SLOT, true);
|
||||
|
||||
itemTarget->SetSoulboundTradeable(NULL, item_owner, false);
|
||||
}
|
||||
@@ -3606,7 +3606,7 @@ void Spell::EffectEnchantItemTmp(SpellEffIndex effIndex)
|
||||
case 10: spell_id = 36758; break; // 14%
|
||||
case 11: spell_id = 36760; break; // 20%
|
||||
default:
|
||||
sLog->outError("Spell::EffectEnchantItemTmp: Damage %u not handled in S'RW",damage);
|
||||
sLog->outError("Spell::EffectEnchantItemTmp: Damage %u not handled in S'RW", damage);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -3640,14 +3640,14 @@ void Spell::EffectEnchantItemTmp(SpellEffIndex effIndex)
|
||||
|
||||
if (!enchant_id)
|
||||
{
|
||||
sLog->outError("Spell %u Effect %u (SPELL_EFFECT_ENCHANT_ITEM_TEMPORARY) have 0 as enchanting id",m_spellInfo->Id,effIndex);
|
||||
sLog->outError("Spell %u Effect %u (SPELL_EFFECT_ENCHANT_ITEM_TEMPORARY) have 0 as enchanting id", m_spellInfo->Id, effIndex);
|
||||
return;
|
||||
}
|
||||
|
||||
SpellItemEnchantmentEntry const *pEnchant = sSpellItemEnchantmentStore.LookupEntry(enchant_id);
|
||||
if (!pEnchant)
|
||||
{
|
||||
sLog->outError("Spell %u Effect %u (SPELL_EFFECT_ENCHANT_ITEM_TEMPORARY) have not existed enchanting id %u ",m_spellInfo->Id,effIndex,enchant_id);
|
||||
sLog->outError("Spell %u Effect %u (SPELL_EFFECT_ENCHANT_ITEM_TEMPORARY) have not existed enchanting id %u ", m_spellInfo->Id, effIndex, enchant_id);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -3687,14 +3687,14 @@ void Spell::EffectEnchantItemTmp(SpellEffIndex effIndex)
|
||||
|
||||
if (item_owner != p_caster && p_caster->GetSession()->GetSecurity() > SEC_PLAYER && sWorld->getBoolConfig(CONFIG_GM_LOG_TRADE))
|
||||
{
|
||||
sLog->outCommand(p_caster->GetSession()->GetAccountId(),"GM %s (Account: %u) enchanting(temp): %s (Entry: %d) for player: %s (Account: %u)",
|
||||
sLog->outCommand(p_caster->GetSession()->GetAccountId(), "GM %s (Account: %u) enchanting(temp): %s (Entry: %d) for player: %s (Account: %u)",
|
||||
p_caster->GetName(), p_caster->GetSession()->GetAccountId(),
|
||||
itemTarget->GetTemplate()->Name1.c_str(), itemTarget->GetEntry(),
|
||||
item_owner->GetName(), item_owner->GetSession()->GetAccountId());
|
||||
}
|
||||
|
||||
// remove old enchanting before applying new if equipped
|
||||
item_owner->ApplyEnchantment(itemTarget,TEMP_ENCHANTMENT_SLOT, false);
|
||||
item_owner->ApplyEnchantment(itemTarget, TEMP_ENCHANTMENT_SLOT, false);
|
||||
|
||||
itemTarget->SetEnchantment(TEMP_ENCHANTMENT_SLOT, enchant_id, duration * 1000, 0);
|
||||
|
||||
@@ -3725,7 +3725,7 @@ void Spell::EffectTameCreature(SpellEffIndex /*effIndex*/)
|
||||
//SendChannelUpdate(0);
|
||||
finish();
|
||||
|
||||
Pet* pet = m_caster->CreateTamedPetFrom(creatureTarget,m_spellInfo->Id);
|
||||
Pet* pet = m_caster->CreateTamedPetFrom(creatureTarget, m_spellInfo->Id);
|
||||
if (!pet) // in very specific state like near world end/etc.
|
||||
return;
|
||||
|
||||
@@ -3789,7 +3789,7 @@ void Spell::EffectSummonPet(SpellEffIndex effIndex)
|
||||
|
||||
ASSERT(OldSummon->GetMap() == owner->GetMap());
|
||||
|
||||
//OldSummon->GetMap()->Remove(OldSummon->ToCreature(),false);
|
||||
//OldSummon->GetMap()->Remove(OldSummon->ToCreature(), false);
|
||||
|
||||
float px, py, pz;
|
||||
owner->GetClosePoint(px, py, pz, OldSummon->GetObjectSize());
|
||||
@@ -3806,7 +3806,7 @@ void Spell::EffectSummonPet(SpellEffIndex effIndex)
|
||||
}
|
||||
|
||||
if (owner->GetTypeId() == TYPEID_PLAYER)
|
||||
owner->ToPlayer()->RemovePet(OldSummon,(OldSummon->getPetType() == HUNTER_PET ? PET_SAVE_AS_DELETED : PET_SAVE_NOT_IN_SLOT),false);
|
||||
owner->ToPlayer()->RemovePet(OldSummon, (OldSummon->getPetType() == HUNTER_PET ? PET_SAVE_AS_DELETED : PET_SAVE_NOT_IN_SLOT), false);
|
||||
else
|
||||
return;
|
||||
}
|
||||
@@ -4318,7 +4318,7 @@ void Spell::EffectSummonObjectWild(SpellEffIndex effIndex)
|
||||
if (pl->GetTeam() == team)
|
||||
team = HORDE;
|
||||
|
||||
((BattlegroundWS*)bg)->SetDroppedFlagGUID(pGameObj->GetGUID(),team);
|
||||
((BattlegroundWS*)bg)->SetDroppedFlagGUID(pGameObj->GetGUID(), team);
|
||||
}
|
||||
break;
|
||||
}
|
||||
@@ -4369,7 +4369,7 @@ void Spell::EffectScriptEffect(SpellEffIndex effIndex)
|
||||
// Glyph of Backstab
|
||||
case 63975:
|
||||
{
|
||||
if (AuraEffect const * aurEff = unitTarget->GetAuraEffect(SPELL_AURA_PERIODIC_DAMAGE,SPELLFAMILY_ROGUE,0x00100000,0,0,m_caster->GetGUID()))
|
||||
if (AuraEffect const * aurEff = unitTarget->GetAuraEffect(SPELL_AURA_PERIODIC_DAMAGE, SPELLFAMILY_ROGUE, 0x00100000, 0, 0, m_caster->GetGUID()))
|
||||
{
|
||||
uint32 countMin = aurEff->GetBase()->GetMaxDuration();
|
||||
uint32 countMax = 12000;
|
||||
@@ -4399,11 +4399,11 @@ void Spell::EffectScriptEffect(SpellEffIndex effIndex)
|
||||
|
||||
// check presence
|
||||
for (uint8 j = 0; j < 4; ++j)
|
||||
if (unitTarget->HasAuraEffect(spells[j],0))
|
||||
if (unitTarget->HasAuraEffect(spells[j], 0))
|
||||
return;
|
||||
|
||||
// select spell
|
||||
uint32 iTmpSpellId = spells[urand(0,3)];
|
||||
uint32 iTmpSpellId = spells[urand(0, 3)];
|
||||
|
||||
// cast
|
||||
unitTarget->CastSpell(unitTarget, iTmpSpellId, true);
|
||||
@@ -4422,7 +4422,7 @@ void Spell::EffectScriptEffect(SpellEffIndex effIndex)
|
||||
default: spell_id = 8855; break;
|
||||
}
|
||||
|
||||
m_caster->CastSpell(m_caster,spell_id,true,NULL);
|
||||
m_caster->CastSpell(m_caster, spell_id, true, NULL);
|
||||
return;
|
||||
}
|
||||
// Brittle Armor - need remove one 24575 Brittle Armor aura
|
||||
@@ -4498,7 +4498,7 @@ void Spell::EffectScriptEffect(SpellEffIndex effIndex)
|
||||
item = 23586; break; // Aerie Peak Pale Ale
|
||||
}
|
||||
if (item)
|
||||
DoCreateItem(effIndex,item);
|
||||
DoCreateItem(effIndex, item);
|
||||
break;
|
||||
}
|
||||
// Improved Sprint
|
||||
@@ -4642,8 +4642,8 @@ void Spell::EffectScriptEffect(SpellEffIndex effIndex)
|
||||
}
|
||||
if (bag)
|
||||
{
|
||||
if (m_caster->ToPlayer()->GetItemByPos(bag,slot)->GetCount() == 1) m_caster->ToPlayer()->RemoveItem(bag,slot,true);
|
||||
else m_caster->ToPlayer()->GetItemByPos(bag,slot)->SetCount(m_caster->ToPlayer()->GetItemByPos(bag,slot)->GetCount()-1);
|
||||
if (m_caster->ToPlayer()->GetItemByPos(bag, slot)->GetCount() == 1) m_caster->ToPlayer()->RemoveItem(bag, slot, true);
|
||||
else m_caster->ToPlayer()->GetItemByPos(bag, slot)->SetCount(m_caster->ToPlayer()->GetItemByPos(bag, slot)->GetCount()-1);
|
||||
// Spell 42518 (Braufest - Gratisprobe des Braufest herstellen)
|
||||
m_caster->CastSpell(m_caster, 42518, true);
|
||||
return;
|
||||
@@ -4678,7 +4678,7 @@ void Spell::EffectScriptEffect(SpellEffIndex effIndex)
|
||||
unitTarget->CastSpell(unitTarget, spellId, true);
|
||||
break;
|
||||
}
|
||||
// 5,000 Gold
|
||||
// 5, 000 Gold
|
||||
case 46642:
|
||||
{
|
||||
if (!unitTarget || unitTarget->GetTypeId() != TYPEID_PLAYER)
|
||||
@@ -4695,7 +4695,7 @@ void Spell::EffectScriptEffect(SpellEffIndex effIndex)
|
||||
const char *gender = "his";
|
||||
if (m_caster->getGender() > 0)
|
||||
gender = "her";
|
||||
sprintf(buf, "%s rubs %s [Decahedral Dwarven Dice] between %s hands and rolls. One %u and one %u.", m_caster->GetName(), gender, gender, urand(1,10), urand(1,10));
|
||||
sprintf(buf, "%s rubs %s [Decahedral Dwarven Dice] between %s hands and rolls. One %u and one %u.", m_caster->GetName(), gender, gender, urand(1, 10), urand(1, 10));
|
||||
m_caster->MonsterTextEmote(buf, 0);
|
||||
break;
|
||||
}
|
||||
@@ -4706,7 +4706,7 @@ void Spell::EffectScriptEffect(SpellEffIndex effIndex)
|
||||
const char *gender = "his";
|
||||
if (m_caster->getGender() > 0)
|
||||
gender = "her";
|
||||
sprintf(buf, "%s causually tosses %s [Worn Troll Dice]. One %u and one %u.", m_caster->GetName(), gender, urand(1,6), urand(1,6));
|
||||
sprintf(buf, "%s causually tosses %s [Worn Troll Dice]. One %u and one %u.", m_caster->GetName(), gender, urand(1, 6), urand(1, 6));
|
||||
m_caster->MonsterTextEmote(buf, 0);
|
||||
break;
|
||||
}
|
||||
@@ -5187,10 +5187,10 @@ void Spell::EffectScriptEffect(SpellEffIndex effIndex)
|
||||
}
|
||||
case 66545: //Summon Memory
|
||||
{
|
||||
uint8 uiRandom = urand(0,25);
|
||||
uint32 uiSpells[26] = {66704,66705,66706,66707,66709,66710,66711,66712,66713,66714,66715,66708,66708,66691,66692,66694,66695,66696,66697,66698,66699,66700,66701,66702,66703,66543};
|
||||
uint8 uiRandom = urand(0, 25);
|
||||
uint32 uiSpells[26] = {66704, 66705, 66706, 66707, 66709, 66710, 66711, 66712, 66713, 66714, 66715, 66708, 66708, 66691, 66692, 66694, 66695, 66696, 66697, 66698, 66699, 66700, 66701, 66702, 66703, 66543};
|
||||
|
||||
m_caster->CastSpell(m_caster,uiSpells[uiRandom],true);
|
||||
m_caster->CastSpell(m_caster, uiSpells[uiRandom], true);
|
||||
break;
|
||||
}
|
||||
case 45668: // Ultra-Advanced Proto-Typical Shortening Blaster
|
||||
@@ -5218,8 +5218,8 @@ void Spell::EffectScriptEffect(SpellEffIndex effIndex)
|
||||
45683 // Polymorph
|
||||
};
|
||||
|
||||
m_caster->CastSpell(m_caster, spellPlayer[urand(0,4)], true);
|
||||
unitTarget->CastSpell(unitTarget, spellTarget[urand(0,4)], true);
|
||||
m_caster->CastSpell(m_caster, spellPlayer[urand(0, 4)], true);
|
||||
unitTarget->CastSpell(unitTarget, spellTarget[urand(0, 4)], true);
|
||||
break;
|
||||
}
|
||||
case 64142: // Upper Deck - Create Foam Sword
|
||||
@@ -5231,7 +5231,7 @@ void Spell::EffectScriptEffect(SpellEffIndex effIndex)
|
||||
for (uint32 const *itr = &itemId[0]; *itr; ++itr)
|
||||
if (plr->HasItemCount(*itr, 1, true))
|
||||
return;
|
||||
DoCreateItem(effIndex, itemId[urand(0,4)]);
|
||||
DoCreateItem(effIndex, itemId[urand(0, 4)]);
|
||||
return;
|
||||
}
|
||||
break;
|
||||
@@ -5255,7 +5255,7 @@ void Spell::EffectScriptEffect(SpellEffIndex effIndex)
|
||||
case 57774: spellId1 = 20185; break; // Judgement of Light
|
||||
case 53408: spellId1 = 20186; break; // Judgement of Wisdom
|
||||
default:
|
||||
sLog->outError("Unsupported Judgement (seal trigger) spell (Id: %u) in Spell::EffectScriptEffect",m_spellInfo->Id);
|
||||
sLog->outError("Unsupported Judgement (seal trigger) spell (Id: %u) in Spell::EffectScriptEffect", m_spellInfo->Id);
|
||||
return;
|
||||
}
|
||||
// all seals have aura dummy in 2 effect
|
||||
@@ -5544,7 +5544,7 @@ void Spell::EffectStuck(SpellEffIndex /*effIndex*/)
|
||||
|
||||
pTarget->TeleportTo(pTarget->GetStartPosition(), unitTarget == m_caster ? TELE_TO_SPELL : 0);
|
||||
// homebind location is loaded always
|
||||
// pTarget->TeleportTo(pTarget->m_homebindMapId,pTarget->m_homebindX,pTarget->m_homebindY,pTarget->m_homebindZ,pTarget->GetOrientation(), (unitTarget == m_caster ? TELE_TO_SPELL : 0));
|
||||
// pTarget->TeleportTo(pTarget->m_homebindMapId, pTarget->m_homebindX, pTarget->m_homebindY, pTarget->m_homebindZ, pTarget->GetOrientation(), (unitTarget == m_caster ? TELE_TO_SPELL : 0));
|
||||
|
||||
// Stuck spell trigger Hearthstone cooldown
|
||||
SpellEntry const *spellInfo = sSpellStore.LookupEntry(8690);
|
||||
@@ -5566,7 +5566,7 @@ void Spell::EffectSummonPlayer(SpellEffIndex /*effIndex*/)
|
||||
float x, y, z;
|
||||
m_caster->GetClosePoint(x, y, z, unitTarget->GetObjectSize());
|
||||
|
||||
unitTarget->ToPlayer()->SetSummonPoint(m_caster->GetMapId(),x,y,z);
|
||||
unitTarget->ToPlayer()->SetSummonPoint(m_caster->GetMapId(), x, y, z);
|
||||
|
||||
WorldPacket data(SMSG_SUMMON_REQUEST, 8+4+4);
|
||||
data << uint64(m_caster->GetGUID()); // summoner guid
|
||||
@@ -5702,7 +5702,7 @@ void Spell::EffectDisEnchant(SpellEffIndex /*effIndex*/)
|
||||
|
||||
p_caster->UpdateCraftSkill(m_spellInfo->Id);
|
||||
|
||||
m_caster->ToPlayer()->SendLoot(itemTarget->GetGUID(),LOOT_DISENCHANTING);
|
||||
m_caster->ToPlayer()->SendLoot(itemTarget->GetGUID(), LOOT_DISENCHANTING);
|
||||
|
||||
// item will be removed at disenchanting end
|
||||
}
|
||||
@@ -5817,7 +5817,7 @@ void Spell::EffectSummonObject(SpellEffIndex effIndex)
|
||||
return;
|
||||
}
|
||||
|
||||
//pGameObj->SetUInt32Value(GAMEOBJECT_LEVEL,m_caster->getLevel());
|
||||
//pGameObj->SetUInt32Value(GAMEOBJECT_LEVEL, m_caster->getLevel());
|
||||
int32 duration = GetSpellDuration(m_spellInfo);
|
||||
pGameObj->SetRespawnTime(duration > 0 ? duration/IN_MILLISECONDS : 0);
|
||||
pGameObj->SetSpellId(m_spellInfo->Id);
|
||||
@@ -6023,7 +6023,7 @@ void Spell::EffectSkinning(SpellEffIndex /*effIndex*/)
|
||||
|
||||
uint32 skill = creature->GetCreatureInfo()->GetRequiredLootSkill();
|
||||
|
||||
m_caster->ToPlayer()->SendLoot(creature->GetGUID(),LOOT_SKINNING);
|
||||
m_caster->ToPlayer()->SendLoot(creature->GetGUID(), LOOT_SKINNING);
|
||||
creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_SKINNABLE);
|
||||
|
||||
int32 reqValue = targetLevel < 10 ? 0 : targetLevel < 20 ? (targetLevel-10)*10 : targetLevel*5;
|
||||
@@ -6170,7 +6170,7 @@ void Spell::EffectSendTaxi(SpellEffIndex effIndex)
|
||||
if (!unitTarget || unitTarget->GetTypeId() != TYPEID_PLAYER)
|
||||
return;
|
||||
|
||||
unitTarget->ToPlayer()->ActivateTaxiPathTo(m_spellInfo->EffectMiscValue[effIndex],m_spellInfo->Id);
|
||||
unitTarget->ToPlayer()->ActivateTaxiPathTo(m_spellInfo->EffectMiscValue[effIndex], m_spellInfo->Id);
|
||||
}
|
||||
|
||||
void Spell::EffectPullTowards(SpellEffIndex effIndex)
|
||||
@@ -6236,7 +6236,7 @@ void Spell::EffectSummonDeadPet(SpellEffIndex /*effIndex*/)
|
||||
if (damage < 0)
|
||||
return;
|
||||
|
||||
float x,y,z;
|
||||
float x, y, z;
|
||||
_player->GetPosition(x, y, z);
|
||||
_player->GetMap()->CreatureRelocation(pet, x, y, z, _player->GetOrientation());
|
||||
|
||||
@@ -6344,7 +6344,7 @@ void Spell::EffectTransmitted(SpellEffIndex effIndex)
|
||||
|
||||
if (!goinfo)
|
||||
{
|
||||
sLog->outErrorDb("Gameobject (Entry: %u) not exist and not created at spell (ID: %u) cast",name_id, m_spellInfo->Id);
|
||||
sLog->outErrorDb("Gameobject (Entry: %u) not exist and not created at spell (ID: %u) cast", name_id, m_spellInfo->Id);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -6404,7 +6404,7 @@ void Spell::EffectTransmitted(SpellEffIndex effIndex)
|
||||
{
|
||||
case GAMEOBJECT_TYPE_FISHINGNODE:
|
||||
{
|
||||
m_caster->SetUInt64Value(UNIT_FIELD_CHANNEL_OBJECT,pGameObj->GetGUID());
|
||||
m_caster->SetUInt64Value(UNIT_FIELD_CHANNEL_OBJECT, pGameObj->GetGUID());
|
||||
m_caster->AddGameObject(pGameObj); // will removed at spell cancel
|
||||
|
||||
// end time of range when possible catch fish (FISHING_BOBBER_READY_TIME..GetDuration(m_spellInfo))
|
||||
@@ -6967,7 +6967,7 @@ void Spell::GetSummonPosition(uint32 i, Position &pos, float radius, uint32 coun
|
||||
else
|
||||
{
|
||||
float x, y, z;
|
||||
m_caster->GetClosePoint(x,y,z,3.0f);
|
||||
m_caster->GetClosePoint(x, y, z, 3.0f);
|
||||
pos.Relocate(x, y, z);
|
||||
}
|
||||
}
|
||||
@@ -6990,7 +6990,7 @@ void Spell::EffectPlayMusic(SpellEffIndex effIndex)
|
||||
|
||||
if (!sSoundEntriesStore.LookupEntry(soundid))
|
||||
{
|
||||
sLog->outError("EffectPlayMusic: Sound (Id: %u) not exist in spell %u.",soundid,m_spellInfo->Id);
|
||||
sLog->outError("EffectPlayMusic: Sound (Id: %u) not exist in spell %u.", soundid, m_spellInfo->Id);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -7105,8 +7105,8 @@ void Spell::EffectRechargeManaGem(SpellEffIndex /*effIndex*/)
|
||||
if (Item* pItem = player->GetItemByEntry(item_id))
|
||||
{
|
||||
for (int x = 0; x < MAX_ITEM_PROTO_SPELLS; ++x)
|
||||
pItem->SetSpellCharges(x,pProto->Spells[x].SpellCharges);
|
||||
pItem->SetState(ITEM_CHANGED,player);
|
||||
pItem->SetSpellCharges(x, pProto->Spells[x].SpellCharges);
|
||||
pItem->SetState(ITEM_CHANGED, player);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -668,7 +668,7 @@ SpellSpecific GetSpellSpecific(SpellEntry const * spellInfo)
|
||||
}
|
||||
|
||||
// target not allow have more one spell specific from same caster
|
||||
bool IsSingleFromSpellSpecificPerCaster(SpellSpecific spellSpec1,SpellSpecific spellSpec2)
|
||||
bool IsSingleFromSpellSpecificPerCaster(SpellSpecific spellSpec1, SpellSpecific spellSpec2)
|
||||
{
|
||||
switch(spellSpec1)
|
||||
{
|
||||
@@ -872,7 +872,7 @@ bool SpellMgr::_isPositiveEffect(uint32 spellId, uint32 effIndex, bool deep) con
|
||||
continue;
|
||||
// if non-positive trigger cast targeted to positive target this main cast is non-positive
|
||||
// this will place this spell auras as debuffs
|
||||
if (IsPositiveTarget(spellTriggeredProto->EffectImplicitTargetA[effIndex],spellTriggeredProto->EffectImplicitTargetB[effIndex]) && !_isPositiveEffect(spellTriggeredId,i, true))
|
||||
if (IsPositiveTarget(spellTriggeredProto->EffectImplicitTargetA[effIndex], spellTriggeredProto->EffectImplicitTargetB[effIndex]) && !_isPositiveEffect(spellTriggeredId, i, true))
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@@ -963,7 +963,7 @@ bool SpellMgr::_isPositiveEffect(uint32 spellId, uint32 effIndex, bool deep) con
|
||||
}
|
||||
|
||||
// non-positive targets
|
||||
if (!IsPositiveTarget(spellproto->EffectImplicitTargetA[effIndex],spellproto->EffectImplicitTargetB[effIndex]))
|
||||
if (!IsPositiveTarget(spellproto->EffectImplicitTargetA[effIndex], spellproto->EffectImplicitTargetB[effIndex]))
|
||||
return false;
|
||||
|
||||
// AttributesEx check
|
||||
@@ -972,7 +972,7 @@ bool SpellMgr::_isPositiveEffect(uint32 spellId, uint32 effIndex, bool deep) con
|
||||
|
||||
if (!deep && spellproto->EffectTriggerSpell[effIndex]
|
||||
&& !spellproto->EffectApplyAuraName[effIndex]
|
||||
&& IsPositiveTarget(spellproto->EffectImplicitTargetA[effIndex],spellproto->EffectImplicitTargetB[effIndex])
|
||||
&& IsPositiveTarget(spellproto->EffectImplicitTargetA[effIndex], spellproto->EffectImplicitTargetB[effIndex])
|
||||
&& !_isPositiveSpell(spellproto->EffectTriggerSpell[effIndex], true))
|
||||
return false;
|
||||
|
||||
@@ -1144,20 +1144,20 @@ void SpellMgr::LoadSpellTargetPositions()
|
||||
MapEntry const* mapEntry = sMapStore.LookupEntry(st.target_mapId);
|
||||
if (!mapEntry)
|
||||
{
|
||||
sLog->outErrorDb("Spell (ID:%u) target map (ID: %u) does not exist in `Map.dbc`.",Spell_ID,st.target_mapId);
|
||||
sLog->outErrorDb("Spell (ID:%u) target map (ID: %u) does not exist in `Map.dbc`.", Spell_ID, st.target_mapId);
|
||||
continue;
|
||||
}
|
||||
|
||||
if (st.target_X==0 && st.target_Y==0 && st.target_Z==0)
|
||||
{
|
||||
sLog->outErrorDb("Spell (ID:%u) target coordinates not provided.",Spell_ID);
|
||||
sLog->outErrorDb("Spell (ID:%u) target coordinates not provided.", Spell_ID);
|
||||
continue;
|
||||
}
|
||||
|
||||
SpellEntry const* spellInfo = sSpellStore.LookupEntry(Spell_ID);
|
||||
if (!spellInfo)
|
||||
{
|
||||
sLog->outErrorDb("Spell (ID:%u) listed in `spell_target_position` does not exist.",Spell_ID);
|
||||
sLog->outErrorDb("Spell (ID:%u) listed in `spell_target_position` does not exist.", Spell_ID);
|
||||
continue;
|
||||
}
|
||||
|
||||
@@ -1172,7 +1172,7 @@ void SpellMgr::LoadSpellTargetPositions()
|
||||
uint32 area_id = sMapMgr->GetAreaId(st.target_mapId, st.target_X, st.target_Y, st.target_Z);
|
||||
if (area_id != uint32(spellInfo->EffectMiscValue[i]))
|
||||
{
|
||||
sLog->outErrorDb("Spell (Id: %u) listed in `spell_target_position` expected point to zone %u bit point to zone %u.",Spell_ID, spellInfo->EffectMiscValue[i], area_id);
|
||||
sLog->outErrorDb("Spell (Id: %u) listed in `spell_target_position` expected point to zone %u bit point to zone %u.", Spell_ID, spellInfo->EffectMiscValue[i], area_id);
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -1183,7 +1183,7 @@ void SpellMgr::LoadSpellTargetPositions()
|
||||
}
|
||||
if (!found)
|
||||
{
|
||||
sLog->outErrorDb("Spell (Id: %u) listed in `spell_target_position` does not have target TARGET_DST_DB (17).",Spell_ID);
|
||||
sLog->outErrorDb("Spell (Id: %u) listed in `spell_target_position` does not have target TARGET_DST_DB (17).", Spell_ID);
|
||||
continue;
|
||||
}
|
||||
|
||||
@@ -1658,7 +1658,7 @@ void SpellMgr::LoadSpellThreats()
|
||||
sLog->outString();
|
||||
}
|
||||
|
||||
bool SpellMgr::IsRankSpellDueToSpell(SpellEntry const *spellInfo_1,uint32 spellId_2) const
|
||||
bool SpellMgr::IsRankSpellDueToSpell(SpellEntry const *spellInfo_1, uint32 spellId_2) const
|
||||
{
|
||||
SpellEntry const *spellInfo_2 = sSpellStore.LookupEntry(spellId_2);
|
||||
if (!spellInfo_1 || !spellInfo_2) return false;
|
||||
@@ -2016,7 +2016,7 @@ void SpellMgr::LoadSpellLearnSpells()
|
||||
continue;
|
||||
}
|
||||
|
||||
mSpellLearnSpells.insert(SpellLearnSpellMap::value_type(spell_id,node));
|
||||
mSpellLearnSpells.insert(SpellLearnSpellMap::value_type(spell_id, node));
|
||||
|
||||
++count;
|
||||
} while (result->NextRow());
|
||||
@@ -2045,7 +2045,7 @@ void SpellMgr::LoadSpellLearnSpells()
|
||||
// talent or passive spells or skill-step spells auto-casted and not need dependent learning,
|
||||
// pet teaching spells don't must be dependent learning (casted)
|
||||
// other required explicit dependent learning
|
||||
dbc_node.autoLearned = entry->EffectImplicitTargetA[i] == TARGET_UNIT_PET || GetTalentSpellCost(spell) > 0 || IsPassiveSpell(spell) || IsSpellHaveEffect(entry,SPELL_EFFECT_SKILL_STEP);
|
||||
dbc_node.autoLearned = entry->EffectImplicitTargetA[i] == TARGET_UNIT_PET || GetTalentSpellCost(spell) > 0 || IsPassiveSpell(spell) || IsSpellHaveEffect(entry, SPELL_EFFECT_SKILL_STEP);
|
||||
|
||||
SpellLearnSpellMapBounds db_node_bounds = GetSpellLearnSpellMapBounds(spell);
|
||||
|
||||
@@ -2055,7 +2055,7 @@ void SpellMgr::LoadSpellLearnSpells()
|
||||
if (itr->second.spell == dbc_node.spell)
|
||||
{
|
||||
sLog->outErrorDb("Spell %u auto-learn spell %u in spell.dbc then the record in `spell_learn_spell` is redundant, please fix DB.",
|
||||
spell,dbc_node.spell);
|
||||
spell, dbc_node.spell);
|
||||
found = true;
|
||||
break;
|
||||
}
|
||||
@@ -2063,7 +2063,7 @@ void SpellMgr::LoadSpellLearnSpells()
|
||||
|
||||
if (!found) // add new spell-spell pair if not found
|
||||
{
|
||||
mSpellLearnSpells.insert(SpellLearnSpellMap::value_type(spell,dbc_node));
|
||||
mSpellLearnSpells.insert(SpellLearnSpellMap::value_type(spell, dbc_node));
|
||||
++dbc_count;
|
||||
}
|
||||
}
|
||||
@@ -2185,7 +2185,7 @@ void SpellMgr::LoadPetLevelupSpellMap()
|
||||
if (spellSet.empty())
|
||||
++family_count;
|
||||
|
||||
spellSet.insert(PetLevelupSpellSet::value_type(spell->spellLevel,spell->Id));
|
||||
spellSet.insert(PetLevelupSpellSet::value_type(spell->spellLevel, spell->Id));
|
||||
++count;
|
||||
}
|
||||
}
|
||||
@@ -2354,9 +2354,9 @@ bool SpellMgr::IsSpellValid(SpellEntry const *spellInfo, Player *pl, bool msg)
|
||||
if (msg)
|
||||
{
|
||||
if (pl)
|
||||
ChatHandler(pl).PSendSysMessage("Craft spell %u not have create item entry.",spellInfo->Id);
|
||||
ChatHandler(pl).PSendSysMessage("Craft spell %u not have create item entry.", spellInfo->Id);
|
||||
else
|
||||
sLog->outErrorDb("Craft spell %u not have create item entry.",spellInfo->Id);
|
||||
sLog->outErrorDb("Craft spell %u not have create item entry.", spellInfo->Id);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
@@ -2368,9 +2368,9 @@ bool SpellMgr::IsSpellValid(SpellEntry const *spellInfo, Player *pl, bool msg)
|
||||
if (msg)
|
||||
{
|
||||
if (pl)
|
||||
ChatHandler(pl).PSendSysMessage("Craft spell %u create not-exist in DB item (Entry: %u) and then...",spellInfo->Id,spellInfo->EffectItemType[i]);
|
||||
ChatHandler(pl).PSendSysMessage("Craft spell %u create not-exist in DB item (Entry: %u) and then...", spellInfo->Id, spellInfo->EffectItemType[i]);
|
||||
else
|
||||
sLog->outErrorDb("Craft spell %u create not-exist in DB item (Entry: %u) and then...",spellInfo->Id,spellInfo->EffectItemType[i]);
|
||||
sLog->outErrorDb("Craft spell %u create not-exist in DB item (Entry: %u) and then...", spellInfo->Id, spellInfo->EffectItemType[i]);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
@@ -2381,14 +2381,14 @@ bool SpellMgr::IsSpellValid(SpellEntry const *spellInfo, Player *pl, bool msg)
|
||||
case SPELL_EFFECT_LEARN_SPELL:
|
||||
{
|
||||
SpellEntry const *spellInfo2 = sSpellStore.LookupEntry(spellInfo->EffectTriggerSpell[i]);
|
||||
if (!IsSpellValid(spellInfo2,pl,msg))
|
||||
if (!IsSpellValid(spellInfo2, pl, msg))
|
||||
{
|
||||
if (msg)
|
||||
{
|
||||
if (pl)
|
||||
ChatHandler(pl).PSendSysMessage("Spell %u learn to broken spell %u, and then...",spellInfo->Id,spellInfo->EffectTriggerSpell[i]);
|
||||
ChatHandler(pl).PSendSysMessage("Spell %u learn to broken spell %u, and then...", spellInfo->Id, spellInfo->EffectTriggerSpell[i]);
|
||||
else
|
||||
sLog->outErrorDb("Spell %u learn to invalid spell %u, and then...",spellInfo->Id,spellInfo->EffectTriggerSpell[i]);
|
||||
sLog->outErrorDb("Spell %u learn to invalid spell %u, and then...", spellInfo->Id, spellInfo->EffectTriggerSpell[i]);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
@@ -2406,9 +2406,9 @@ bool SpellMgr::IsSpellValid(SpellEntry const *spellInfo, Player *pl, bool msg)
|
||||
if (msg)
|
||||
{
|
||||
if (pl)
|
||||
ChatHandler(pl).PSendSysMessage("Craft spell %u have not-exist reagent in DB item (Entry: %u) and then...",spellInfo->Id,spellInfo->Reagent[j]);
|
||||
ChatHandler(pl).PSendSysMessage("Craft spell %u have not-exist reagent in DB item (Entry: %u) and then...", spellInfo->Id, spellInfo->Reagent[j]);
|
||||
else
|
||||
sLog->outErrorDb("Craft spell %u have not-exist reagent in DB item (Entry: %u) and then...",spellInfo->Id,spellInfo->Reagent[j]);
|
||||
sLog->outErrorDb("Craft spell %u have not-exist reagent in DB item (Entry: %u) and then...", spellInfo->Id, spellInfo->Reagent[j]);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
@@ -2499,13 +2499,13 @@ void SpellMgr::LoadSpellAreas()
|
||||
|
||||
if (spellArea.areaId && !GetAreaEntryByAreaID(spellArea.areaId))
|
||||
{
|
||||
sLog->outErrorDb("Spell %u listed in `spell_area` have wrong area (%u) requirement", spell,spellArea.areaId);
|
||||
sLog->outErrorDb("Spell %u listed in `spell_area` have wrong area (%u) requirement", spell, spellArea.areaId);
|
||||
continue;
|
||||
}
|
||||
|
||||
if (spellArea.questStart && !sObjectMgr->GetQuestTemplate(spellArea.questStart))
|
||||
{
|
||||
sLog->outErrorDb("Spell %u listed in `spell_area` have wrong start quest (%u) requirement", spell,spellArea.questStart);
|
||||
sLog->outErrorDb("Spell %u listed in `spell_area` have wrong start quest (%u) requirement", spell, spellArea.questStart);
|
||||
continue;
|
||||
}
|
||||
|
||||
@@ -2513,13 +2513,13 @@ void SpellMgr::LoadSpellAreas()
|
||||
{
|
||||
if (!sObjectMgr->GetQuestTemplate(spellArea.questEnd))
|
||||
{
|
||||
sLog->outErrorDb("Spell %u listed in `spell_area` have wrong end quest (%u) requirement", spell,spellArea.questEnd);
|
||||
sLog->outErrorDb("Spell %u listed in `spell_area` have wrong end quest (%u) requirement", spell, spellArea.questEnd);
|
||||
continue;
|
||||
}
|
||||
|
||||
if (spellArea.questEnd == spellArea.questStart && !spellArea.questStartCanActive)
|
||||
{
|
||||
sLog->outErrorDb("Spell %u listed in `spell_area` have quest (%u) requirement for start and end in same time", spell,spellArea.questEnd);
|
||||
sLog->outErrorDb("Spell %u listed in `spell_area` have quest (%u) requirement for start and end in same time", spell, spellArea.questEnd);
|
||||
continue;
|
||||
}
|
||||
}
|
||||
@@ -2529,13 +2529,13 @@ void SpellMgr::LoadSpellAreas()
|
||||
SpellEntry const* spellInfo = sSpellStore.LookupEntry(abs(spellArea.auraSpell));
|
||||
if (!spellInfo)
|
||||
{
|
||||
sLog->outErrorDb("Spell %u listed in `spell_area` have wrong aura spell (%u) requirement", spell,abs(spellArea.auraSpell));
|
||||
sLog->outErrorDb("Spell %u listed in `spell_area` have wrong aura spell (%u) requirement", spell, abs(spellArea.auraSpell));
|
||||
continue;
|
||||
}
|
||||
|
||||
if (uint32(abs(spellArea.auraSpell)) == spellArea.spellId)
|
||||
{
|
||||
sLog->outErrorDb("Spell %u listed in `spell_area` have aura spell (%u) requirement for itself", spell,abs(spellArea.auraSpell));
|
||||
sLog->outErrorDb("Spell %u listed in `spell_area` have aura spell (%u) requirement for itself", spell, abs(spellArea.auraSpell));
|
||||
continue;
|
||||
}
|
||||
|
||||
@@ -2555,7 +2555,7 @@ void SpellMgr::LoadSpellAreas()
|
||||
|
||||
if (chain)
|
||||
{
|
||||
sLog->outErrorDb("Spell %u listed in `spell_area` have aura spell (%u) requirement that itself autocast from aura", spell,spellArea.auraSpell);
|
||||
sLog->outErrorDb("Spell %u listed in `spell_area` have aura spell (%u) requirement that itself autocast from aura", spell, spellArea.auraSpell);
|
||||
continue;
|
||||
}
|
||||
|
||||
@@ -2571,7 +2571,7 @@ void SpellMgr::LoadSpellAreas()
|
||||
|
||||
if (chain)
|
||||
{
|
||||
sLog->outErrorDb("Spell %u listed in `spell_area` have aura spell (%u) requirement that itself autocast from aura", spell,spellArea.auraSpell);
|
||||
sLog->outErrorDb("Spell %u listed in `spell_area` have aura spell (%u) requirement that itself autocast from aura", spell, spellArea.auraSpell);
|
||||
continue;
|
||||
}
|
||||
}
|
||||
@@ -2579,7 +2579,7 @@ void SpellMgr::LoadSpellAreas()
|
||||
|
||||
if (spellArea.raceMask && (spellArea.raceMask & RACEMASK_ALL_PLAYABLE) == 0)
|
||||
{
|
||||
sLog->outErrorDb("Spell %u listed in `spell_area` have wrong race mask (%u) requirement", spell,spellArea.raceMask);
|
||||
sLog->outErrorDb("Spell %u listed in `spell_area` have wrong race mask (%u) requirement", spell, spellArea.raceMask);
|
||||
continue;
|
||||
}
|
||||
|
||||
@@ -2589,28 +2589,28 @@ void SpellMgr::LoadSpellAreas()
|
||||
continue;
|
||||
}
|
||||
|
||||
SpellArea const* sa = &mSpellAreaMap.insert(SpellAreaMap::value_type(spell,spellArea))->second;
|
||||
SpellArea const* sa = &mSpellAreaMap.insert(SpellAreaMap::value_type(spell, spellArea))->second;
|
||||
|
||||
// for search by current zone/subzone at zone/subzone change
|
||||
if (spellArea.areaId)
|
||||
mSpellAreaForAreaMap.insert(SpellAreaForAreaMap::value_type(spellArea.areaId,sa));
|
||||
mSpellAreaForAreaMap.insert(SpellAreaForAreaMap::value_type(spellArea.areaId, sa));
|
||||
|
||||
// for search at quest start/reward
|
||||
if (spellArea.questStart)
|
||||
{
|
||||
if (spellArea.questStartCanActive)
|
||||
mSpellAreaForActiveQuestMap.insert(SpellAreaForQuestMap::value_type(spellArea.questStart,sa));
|
||||
mSpellAreaForActiveQuestMap.insert(SpellAreaForQuestMap::value_type(spellArea.questStart, sa));
|
||||
else
|
||||
mSpellAreaForQuestMap.insert(SpellAreaForQuestMap::value_type(spellArea.questStart,sa));
|
||||
mSpellAreaForQuestMap.insert(SpellAreaForQuestMap::value_type(spellArea.questStart, sa));
|
||||
}
|
||||
|
||||
// for search at quest start/reward
|
||||
if (spellArea.questEnd)
|
||||
mSpellAreaForQuestEndMap.insert(SpellAreaForQuestMap::value_type(spellArea.questEnd,sa));
|
||||
mSpellAreaForQuestEndMap.insert(SpellAreaForQuestMap::value_type(spellArea.questEnd, sa));
|
||||
|
||||
// for search at aura apply
|
||||
if (spellArea.auraSpell)
|
||||
mSpellAreaForAuraMap.insert(SpellAreaForAuraMap::value_type(abs(spellArea.auraSpell),sa));
|
||||
mSpellAreaForAuraMap.insert(SpellAreaForAuraMap::value_type(abs(spellArea.auraSpell), sa));
|
||||
|
||||
++count;
|
||||
} while (result->NextRow());
|
||||
@@ -2664,7 +2664,7 @@ SpellCastResult SpellMgr::GetSpellAllowedInLocationError(SpellEntry const *spell
|
||||
{
|
||||
for (SpellAreaMap::const_iterator itr = saBounds.first; itr != saBounds.second; ++itr)
|
||||
{
|
||||
if (itr->second.IsFitToRequirements(player,zone_id,area_id))
|
||||
if (itr->second.IsFitToRequirements(player, zone_id, area_id))
|
||||
return SPELL_CAST_OK;
|
||||
}
|
||||
return SPELL_FAILED_INCORRECT_AREA;
|
||||
@@ -2766,7 +2766,7 @@ void SpellMgr::LoadSkillLineAbilityMap()
|
||||
if (!SkillInfo)
|
||||
continue;
|
||||
|
||||
mSkillLineAbilityMap.insert(SkillLineAbilityMap::value_type(SkillInfo->spellId,SkillInfo));
|
||||
mSkillLineAbilityMap.insert(SkillLineAbilityMap::value_type(SkillInfo->spellId, SkillInfo));
|
||||
++count;
|
||||
}
|
||||
|
||||
|
||||
@@ -288,7 +288,7 @@ inline bool IsLootCraftingSpell(SpellEntry const *spellInfo)
|
||||
(spellInfo->TotemCategory[0] != 0 || spellInfo->EffectItemType[0]==0)));
|
||||
}
|
||||
|
||||
bool IsHigherHankOfSpell(uint32 spellId_1,uint32 spellId_2);
|
||||
bool IsHigherHankOfSpell(uint32 spellId_1, uint32 spellId_2);
|
||||
bool IsSingleFromSpellSpecificPerCaster(SpellSpecific spellSpec1, SpellSpecific spellSpec2);
|
||||
bool IsSingleFromSpellSpecificPerTarget(SpellSpecific spellSpec1, SpellSpecific spellSpec2);
|
||||
bool IsPassiveSpell(uint32 spellId);
|
||||
@@ -302,7 +302,7 @@ inline bool IsPassiveSpellStackableWithRanks(SpellEntry const* spellProto)
|
||||
if (!IsPassiveSpell(spellProto->Id))
|
||||
return false;
|
||||
|
||||
return !IsSpellHaveEffect(spellProto,SPELL_EFFECT_APPLY_AURA);
|
||||
return !IsSpellHaveEffect(spellProto, SPELL_EFFECT_APPLY_AURA);
|
||||
}
|
||||
|
||||
inline bool IsDeathPersistentSpell(SpellEntry const *spellInfo)
|
||||
@@ -679,11 +679,11 @@ enum SpellGroup
|
||||
|
||||
// spell_id, group_id
|
||||
typedef std::multimap<uint32, SpellGroup > SpellSpellGroupMap;
|
||||
typedef std::pair<SpellSpellGroupMap::const_iterator,SpellSpellGroupMap::const_iterator> SpellSpellGroupMapBounds;
|
||||
typedef std::pair<SpellSpellGroupMap::const_iterator, SpellSpellGroupMap::const_iterator> SpellSpellGroupMapBounds;
|
||||
|
||||
// group_id, spell_id
|
||||
typedef std::multimap<SpellGroup, int32> SpellGroupSpellMap;
|
||||
typedef std::pair<SpellGroupSpellMap::const_iterator,SpellGroupSpellMap::const_iterator> SpellGroupSpellMapBounds;
|
||||
typedef std::pair<SpellGroupSpellMap::const_iterator, SpellGroupSpellMap::const_iterator> SpellGroupSpellMapBounds;
|
||||
|
||||
enum SpellGroupStackRule
|
||||
{
|
||||
@@ -784,12 +784,12 @@ struct SpellArea
|
||||
bool IsFitToRequirements(Player const* player, uint32 newZone, uint32 newArea) const;
|
||||
};
|
||||
|
||||
typedef std::multimap<uint32,SpellArea> SpellAreaMap;
|
||||
typedef std::multimap<uint32,SpellArea const*> SpellAreaForQuestMap;
|
||||
typedef std::multimap<uint32,SpellArea const*> SpellAreaForAuraMap;
|
||||
typedef std::multimap<uint32,SpellArea const*> SpellAreaForAreaMap;
|
||||
typedef std::pair<SpellAreaMap::const_iterator,SpellAreaMap::const_iterator> SpellAreaMapBounds;
|
||||
typedef std::pair<SpellAreaForQuestMap::const_iterator,SpellAreaForQuestMap::const_iterator> SpellAreaForQuestMapBounds;
|
||||
typedef std::multimap<uint32, SpellArea> SpellAreaMap;
|
||||
typedef std::multimap<uint32, SpellArea const*> SpellAreaForQuestMap;
|
||||
typedef std::multimap<uint32, SpellArea const*> SpellAreaForAuraMap;
|
||||
typedef std::multimap<uint32, SpellArea const*> SpellAreaForAreaMap;
|
||||
typedef std::pair<SpellAreaMap::const_iterator, SpellAreaMap::const_iterator> SpellAreaMapBounds;
|
||||
typedef std::pair<SpellAreaForQuestMap::const_iterator, SpellAreaForQuestMap::const_iterator> SpellAreaForQuestMapBounds;
|
||||
typedef std::pair<SpellAreaForAuraMap::const_iterator, SpellAreaForAuraMap::const_iterator> SpellAreaForAuraMapBounds;
|
||||
typedef std::pair<SpellAreaForAreaMap::const_iterator, SpellAreaForAreaMap::const_iterator> SpellAreaForAreaMapBounds;
|
||||
|
||||
@@ -807,11 +807,11 @@ typedef UNORDERED_MAP<uint32, SpellChainNode> SpellChainMap;
|
||||
|
||||
// spell_id req_spell
|
||||
typedef std::multimap<uint32, uint32> SpellRequiredMap;
|
||||
typedef std::pair<SpellRequiredMap::const_iterator,SpellRequiredMap::const_iterator> SpellRequiredMapBounds;
|
||||
typedef std::pair<SpellRequiredMap::const_iterator, SpellRequiredMap::const_iterator> SpellRequiredMapBounds;
|
||||
|
||||
// req_spell spell_id
|
||||
typedef std::multimap<uint32, uint32> SpellsRequiringSpellMap;
|
||||
typedef std::pair<SpellsRequiringSpellMap::const_iterator,SpellsRequiringSpellMap::const_iterator> SpellsRequiringSpellMapBounds;
|
||||
typedef std::pair<SpellsRequiringSpellMap::const_iterator, SpellsRequiringSpellMap::const_iterator> SpellsRequiringSpellMapBounds;
|
||||
|
||||
// Spell learning properties (accessed using SpellMgr functions)
|
||||
struct SpellLearnSkillNode
|
||||
@@ -832,10 +832,10 @@ struct SpellLearnSpellNode
|
||||
};
|
||||
|
||||
typedef std::multimap<uint32, SpellLearnSpellNode> SpellLearnSpellMap;
|
||||
typedef std::pair<SpellLearnSpellMap::const_iterator,SpellLearnSpellMap::const_iterator> SpellLearnSpellMapBounds;
|
||||
typedef std::pair<SpellLearnSpellMap::const_iterator, SpellLearnSpellMap::const_iterator> SpellLearnSpellMapBounds;
|
||||
|
||||
typedef std::multimap<uint32, SkillLineAbilityEntry const*> SkillLineAbilityMap;
|
||||
typedef std::pair<SkillLineAbilityMap::const_iterator,SkillLineAbilityMap::const_iterator> SkillLineAbilityMapBounds;
|
||||
typedef std::pair<SkillLineAbilityMap::const_iterator, SkillLineAbilityMap::const_iterator> SkillLineAbilityMapBounds;
|
||||
|
||||
typedef std::multimap<uint32, uint32> PetLevelupSpellSet;
|
||||
typedef std::map<uint32, PetLevelupSpellSet> PetLevelupSpellMap;
|
||||
@@ -918,7 +918,7 @@ class SpellMgr
|
||||
SpellSpellGroupMapBounds GetSpellSpellGroupMapBounds(uint32 spell_id) const
|
||||
{
|
||||
spell_id = GetFirstSpellInChain(spell_id);
|
||||
return SpellSpellGroupMapBounds(mSpellSpellGroup.lower_bound(spell_id),mSpellSpellGroup.upper_bound(spell_id));
|
||||
return SpellSpellGroupMapBounds(mSpellSpellGroup.lower_bound(spell_id), mSpellSpellGroup.upper_bound(spell_id));
|
||||
}
|
||||
uint32 IsSpellMemberOfSpellGroup(uint32 spellid, SpellGroup groupid) const
|
||||
{
|
||||
@@ -933,7 +933,7 @@ class SpellMgr
|
||||
|
||||
SpellGroupSpellMapBounds GetSpellGroupSpellMapBounds(SpellGroup group_id) const
|
||||
{
|
||||
return SpellGroupSpellMapBounds(mSpellGroupSpell.lower_bound(group_id),mSpellGroupSpell.upper_bound(group_id));
|
||||
return SpellGroupSpellMapBounds(mSpellGroupSpell.lower_bound(group_id), mSpellGroupSpell.upper_bound(group_id));
|
||||
}
|
||||
void GetSetOfSpellsInSpellGroup(SpellGroup group_id, std::set<uint32>& foundSpells) const
|
||||
{
|
||||
@@ -1152,12 +1152,12 @@ class SpellMgr
|
||||
|
||||
SpellRequiredMapBounds GetSpellsRequiredForSpellBounds(uint32 spell_id) const
|
||||
{
|
||||
return SpellRequiredMapBounds(mSpellReq.lower_bound(spell_id),mSpellReq.upper_bound(spell_id));
|
||||
return SpellRequiredMapBounds(mSpellReq.lower_bound(spell_id), mSpellReq.upper_bound(spell_id));
|
||||
}
|
||||
|
||||
SpellsRequiringSpellMapBounds GetSpellsRequiringSpellBounds(uint32 spell_id) const
|
||||
{
|
||||
return SpellsRequiringSpellMapBounds(mSpellsReqSpell.lower_bound(spell_id),mSpellsReqSpell.upper_bound(spell_id));
|
||||
return SpellsRequiringSpellMapBounds(mSpellsReqSpell.lower_bound(spell_id), mSpellsReqSpell.upper_bound(spell_id));
|
||||
}
|
||||
bool IsSpellRequiringSpell(uint32 spellid, uint32 req_spellid) const
|
||||
{
|
||||
@@ -1191,7 +1191,7 @@ class SpellMgr
|
||||
return mEnchantCustomAttr[ench_id];
|
||||
}
|
||||
|
||||
uint8 IsHighRankOfSpell(uint32 spell1,uint32 spell2) const
|
||||
uint8 IsHighRankOfSpell(uint32 spell1, uint32 spell2) const
|
||||
{
|
||||
SpellChainMap::const_iterator itr1 = mSpellChains.find(spell1);
|
||||
SpellChainMap::const_iterator itr2 = mSpellChains.find(spell2);
|
||||
@@ -1204,7 +1204,7 @@ class SpellMgr
|
||||
return false;
|
||||
}
|
||||
|
||||
bool IsRankSpellDueToSpell(SpellEntry const *spellInfo_1,uint32 spellId_2) const;
|
||||
bool IsRankSpellDueToSpell(SpellEntry const *spellInfo_1, uint32 spellId_2) const;
|
||||
static bool canStackSpellRanks(SpellEntry const *spellInfo);
|
||||
bool CanAurasStack(Aura const *aura1, Aura const *aura2, bool sameCaster) const;
|
||||
|
||||
@@ -1227,10 +1227,10 @@ class SpellMgr
|
||||
|
||||
SpellLearnSpellMapBounds GetSpellLearnSpellMapBounds(uint32 spell_id) const
|
||||
{
|
||||
return SpellLearnSpellMapBounds(mSpellLearnSpells.lower_bound(spell_id),mSpellLearnSpells.upper_bound(spell_id));
|
||||
return SpellLearnSpellMapBounds(mSpellLearnSpells.lower_bound(spell_id), mSpellLearnSpells.upper_bound(spell_id));
|
||||
}
|
||||
|
||||
bool IsSpellLearnToSpell(uint32 spell_id1,uint32 spell_id2) const
|
||||
bool IsSpellLearnToSpell(uint32 spell_id1, uint32 spell_id2) const
|
||||
{
|
||||
SpellLearnSpellMapBounds bounds = GetSpellLearnSpellMapBounds(spell_id1);
|
||||
for (SpellLearnSpellMap::const_iterator i = bounds.first; i != bounds.second; ++i)
|
||||
@@ -1256,7 +1256,7 @@ class SpellMgr
|
||||
|
||||
SkillLineAbilityMapBounds GetSkillLineAbilityMapBounds(uint32 spell_id) const
|
||||
{
|
||||
return SkillLineAbilityMapBounds(mSkillLineAbilityMap.lower_bound(spell_id),mSkillLineAbilityMap.upper_bound(spell_id));
|
||||
return SkillLineAbilityMapBounds(mSkillLineAbilityMap.lower_bound(spell_id), mSkillLineAbilityMap.upper_bound(spell_id));
|
||||
}
|
||||
|
||||
PetAura const* GetPetAura(uint32 spell_id, uint8 eff)
|
||||
@@ -1304,30 +1304,30 @@ class SpellMgr
|
||||
|
||||
SpellAreaMapBounds GetSpellAreaMapBounds(uint32 spell_id) const
|
||||
{
|
||||
return SpellAreaMapBounds(mSpellAreaMap.lower_bound(spell_id),mSpellAreaMap.upper_bound(spell_id));
|
||||
return SpellAreaMapBounds(mSpellAreaMap.lower_bound(spell_id), mSpellAreaMap.upper_bound(spell_id));
|
||||
}
|
||||
|
||||
SpellAreaForQuestMapBounds GetSpellAreaForQuestMapBounds(uint32 quest_id, bool active) const
|
||||
{
|
||||
if (active)
|
||||
return SpellAreaForQuestMapBounds(mSpellAreaForActiveQuestMap.lower_bound(quest_id),mSpellAreaForActiveQuestMap.upper_bound(quest_id));
|
||||
return SpellAreaForQuestMapBounds(mSpellAreaForActiveQuestMap.lower_bound(quest_id), mSpellAreaForActiveQuestMap.upper_bound(quest_id));
|
||||
else
|
||||
return SpellAreaForQuestMapBounds(mSpellAreaForQuestMap.lower_bound(quest_id),mSpellAreaForQuestMap.upper_bound(quest_id));
|
||||
return SpellAreaForQuestMapBounds(mSpellAreaForQuestMap.lower_bound(quest_id), mSpellAreaForQuestMap.upper_bound(quest_id));
|
||||
}
|
||||
|
||||
SpellAreaForQuestMapBounds GetSpellAreaForQuestEndMapBounds(uint32 quest_id) const
|
||||
{
|
||||
return SpellAreaForQuestMapBounds(mSpellAreaForQuestEndMap.lower_bound(quest_id),mSpellAreaForQuestEndMap.upper_bound(quest_id));
|
||||
return SpellAreaForQuestMapBounds(mSpellAreaForQuestEndMap.lower_bound(quest_id), mSpellAreaForQuestEndMap.upper_bound(quest_id));
|
||||
}
|
||||
|
||||
SpellAreaForAuraMapBounds GetSpellAreaForAuraMapBounds(uint32 spell_id) const
|
||||
{
|
||||
return SpellAreaForAuraMapBounds(mSpellAreaForAuraMap.lower_bound(spell_id),mSpellAreaForAuraMap.upper_bound(spell_id));
|
||||
return SpellAreaForAuraMapBounds(mSpellAreaForAuraMap.lower_bound(spell_id), mSpellAreaForAuraMap.upper_bound(spell_id));
|
||||
}
|
||||
|
||||
SpellAreaForAreaMapBounds GetSpellAreaForAreaMapBounds(uint32 area_id) const
|
||||
{
|
||||
return SpellAreaForAreaMapBounds(mSpellAreaForAreaMap.lower_bound(area_id),mSpellAreaForAreaMap.upper_bound(area_id));
|
||||
return SpellAreaForAreaMapBounds(mSpellAreaForAreaMap.lower_bound(area_id), mSpellAreaForAreaMap.upper_bound(area_id));
|
||||
}
|
||||
|
||||
bool IsSrcTargetSpell(SpellEntry const *spellInfo) const;
|
||||
|
||||
@@ -119,7 +119,7 @@ std::string _SpellScript::EffectNameCheck::ToString()
|
||||
return "SPELL_EFFECT_ANY";
|
||||
default:
|
||||
char num[10];
|
||||
sprintf (num,"%u",effName);
|
||||
sprintf (num, "%u", effName);
|
||||
return num;
|
||||
}
|
||||
}
|
||||
@@ -141,7 +141,7 @@ std::string _SpellScript::EffectAuraNameCheck::ToString()
|
||||
return "SPELL_AURA_ANY";
|
||||
default:
|
||||
char num[10];
|
||||
sprintf (num,"%u",effAurName);
|
||||
sprintf (num, "%u", effAurName);
|
||||
return num;
|
||||
}
|
||||
}
|
||||
@@ -156,7 +156,7 @@ SpellCastResult SpellScript::CheckCastHandler::Call(SpellScript* spellScript)
|
||||
return (spellScript->*_checkCastHandlerScript)();
|
||||
}
|
||||
|
||||
SpellScript::EffectHandler::EffectHandler(SpellEffectFnType _pEffectHandlerScript,uint8 _effIndex, uint16 _effName)
|
||||
SpellScript::EffectHandler::EffectHandler(SpellEffectFnType _pEffectHandlerScript, uint8 _effIndex, uint16 _effName)
|
||||
: _SpellScript::EffectNameCheck(_effName), _SpellScript::EffectHook(_effIndex)
|
||||
{
|
||||
pEffectHandlerScript = _pEffectHandlerScript;
|
||||
@@ -530,7 +530,7 @@ std::string AuraScript::EffectBase::ToString()
|
||||
return "Index: " + EffIndexToString() + " AuraName: " +_SpellScript::EffectAuraNameCheck::ToString();
|
||||
}
|
||||
|
||||
AuraScript::EffectPeriodicHandler::EffectPeriodicHandler(AuraEffectPeriodicFnType _pEffectHandlerScript,uint8 _effIndex, uint16 _effName)
|
||||
AuraScript::EffectPeriodicHandler::EffectPeriodicHandler(AuraEffectPeriodicFnType _pEffectHandlerScript, uint8 _effIndex, uint16 _effName)
|
||||
: AuraScript::EffectBase(_effIndex, _effName)
|
||||
{
|
||||
pEffectHandlerScript = _pEffectHandlerScript;
|
||||
@@ -541,7 +541,7 @@ void AuraScript::EffectPeriodicHandler::Call(AuraScript* auraScript, AuraEffect
|
||||
(auraScript->*pEffectHandlerScript)(_aurEff);
|
||||
}
|
||||
|
||||
AuraScript::EffectUpdatePeriodicHandler::EffectUpdatePeriodicHandler(AuraEffectUpdatePeriodicFnType _pEffectHandlerScript,uint8 _effIndex, uint16 _effName)
|
||||
AuraScript::EffectUpdatePeriodicHandler::EffectUpdatePeriodicHandler(AuraEffectUpdatePeriodicFnType _pEffectHandlerScript, uint8 _effIndex, uint16 _effName)
|
||||
: AuraScript::EffectBase(_effIndex, _effName)
|
||||
{
|
||||
pEffectHandlerScript = _pEffectHandlerScript;
|
||||
@@ -552,7 +552,7 @@ void AuraScript::EffectUpdatePeriodicHandler::Call(AuraScript* auraScript, AuraE
|
||||
(auraScript->*pEffectHandlerScript)(aurEff);
|
||||
}
|
||||
|
||||
AuraScript::EffectCalcAmountHandler::EffectCalcAmountHandler(AuraEffectCalcAmountFnType _pEffectHandlerScript,uint8 _effIndex, uint16 _effName)
|
||||
AuraScript::EffectCalcAmountHandler::EffectCalcAmountHandler(AuraEffectCalcAmountFnType _pEffectHandlerScript, uint8 _effIndex, uint16 _effName)
|
||||
: AuraScript::EffectBase(_effIndex, _effName)
|
||||
{
|
||||
pEffectHandlerScript = _pEffectHandlerScript;
|
||||
@@ -598,7 +598,7 @@ void AuraScript::EffectApplyHandler::Call(AuraScript* auraScript, AuraEffect con
|
||||
(auraScript->*pEffectHandlerScript)(_aurEff, _mode);
|
||||
}
|
||||
|
||||
AuraScript::EffectAbsorbHandler::EffectAbsorbHandler(AuraEffectAbsorbFnType _pEffectHandlerScript,uint8 _effIndex)
|
||||
AuraScript::EffectAbsorbHandler::EffectAbsorbHandler(AuraEffectAbsorbFnType _pEffectHandlerScript, uint8 _effIndex)
|
||||
: AuraScript::EffectBase(_effIndex, SPELL_AURA_SCHOOL_ABSORB)
|
||||
{
|
||||
pEffectHandlerScript = _pEffectHandlerScript;
|
||||
|
||||
@@ -159,7 +159,7 @@ class SpellScript : public _SpellScript
|
||||
class EffectHandler : public _SpellScript::EffectNameCheck, public _SpellScript::EffectHook
|
||||
{
|
||||
public:
|
||||
EffectHandler(SpellEffectFnType _pEffectHandlerScript,uint8 _effIndex, uint16 _effName);
|
||||
EffectHandler(SpellEffectFnType _pEffectHandlerScript, uint8 _effIndex, uint16 _effName);
|
||||
std::string ToString();
|
||||
bool CheckEffect(SpellEntry const* spellEntry, uint8 effIndex);
|
||||
void Call(SpellScript* spellScript, SpellEffIndex effIndex);
|
||||
@@ -190,7 +190,7 @@ class SpellScript : public _SpellScript
|
||||
|
||||
#define SPELLSCRIPT_FUNCTION_CAST_DEFINES(CLASSNAME) \
|
||||
class CheckCastHandlerFunction : public SpellScript::CheckCastHandler { public: CheckCastHandlerFunction(SpellCheckCastFnType _checkCastHandlerScript) : SpellScript::CheckCastHandler((SpellScript::SpellCheckCastFnType)_checkCastHandlerScript) {} }; \
|
||||
class EffectHandlerFunction : public SpellScript::EffectHandler { public: EffectHandlerFunction(SpellEffectFnType _pEffectHandlerScript,uint8 _effIndex, uint16 _effName) : SpellScript::EffectHandler((SpellScript::SpellEffectFnType)_pEffectHandlerScript, _effIndex, _effName) {} }; \
|
||||
class EffectHandlerFunction : public SpellScript::EffectHandler { public: EffectHandlerFunction(SpellEffectFnType _pEffectHandlerScript, uint8 _effIndex, uint16 _effName) : SpellScript::EffectHandler((SpellScript::SpellEffectFnType)_pEffectHandlerScript, _effIndex, _effName) {} }; \
|
||||
class HitHandlerFunction : public SpellScript::HitHandler { public: HitHandlerFunction(SpellHitFnType _pHitHandlerScript) : SpellScript::HitHandler((SpellScript::SpellHitFnType)_pHitHandlerScript) {} }; \
|
||||
class UnitTargetHandlerFunction : public SpellScript::UnitTargetHandler { public: UnitTargetHandlerFunction(SpellUnitTargetFnType _pUnitTargetHandlerScript, uint8 _effIndex, uint16 _targetType) : SpellScript::UnitTargetHandler((SpellScript::SpellUnitTargetFnType)_pUnitTargetHandlerScript, _effIndex, _targetType) {} }; \
|
||||
|
||||
@@ -337,7 +337,7 @@ enum AuraScriptHookType
|
||||
AURA_SCRIPT_HOOK_EFFECT_MANASHIELD,
|
||||
AURA_SCRIPT_HOOK_EFFECT_AFTER_MANASHIELD,
|
||||
/*AURA_SCRIPT_HOOK_APPLY,
|
||||
AURA_SCRIPT_HOOK_REMOVE,*/
|
||||
AURA_SCRIPT_HOOK_REMOVE, */
|
||||
};
|
||||
#define HOOK_AURA_EFFECT_START HOOK_AURA_EFFECT_APPLY
|
||||
#define HOOK_AURA_EFFECT_END HOOK_AURA_EFFECT_CALC_SPELLMOD + 1
|
||||
@@ -370,7 +370,7 @@ class AuraScript : public _SpellScript
|
||||
class EffectPeriodicHandler : public EffectBase
|
||||
{
|
||||
public:
|
||||
EffectPeriodicHandler(AuraEffectPeriodicFnType _pEffectHandlerScript,uint8 _effIndex, uint16 _effName);
|
||||
EffectPeriodicHandler(AuraEffectPeriodicFnType _pEffectHandlerScript, uint8 _effIndex, uint16 _effName);
|
||||
void Call(AuraScript * auraScript, AuraEffect const * _aurEff);
|
||||
private:
|
||||
AuraEffectPeriodicFnType pEffectHandlerScript;
|
||||
@@ -378,7 +378,7 @@ class AuraScript : public _SpellScript
|
||||
class EffectUpdatePeriodicHandler : public EffectBase
|
||||
{
|
||||
public:
|
||||
EffectUpdatePeriodicHandler(AuraEffectUpdatePeriodicFnType _pEffectHandlerScript,uint8 _effIndex, uint16 _effName);
|
||||
EffectUpdatePeriodicHandler(AuraEffectUpdatePeriodicFnType _pEffectHandlerScript, uint8 _effIndex, uint16 _effName);
|
||||
void Call(AuraScript * auraScript, AuraEffect * aurEff);
|
||||
private:
|
||||
AuraEffectUpdatePeriodicFnType pEffectHandlerScript;
|
||||
@@ -386,7 +386,7 @@ class AuraScript : public _SpellScript
|
||||
class EffectCalcAmountHandler : public EffectBase
|
||||
{
|
||||
public:
|
||||
EffectCalcAmountHandler(AuraEffectCalcAmountFnType _pEffectHandlerScript,uint8 _effIndex, uint16 _effName);
|
||||
EffectCalcAmountHandler(AuraEffectCalcAmountFnType _pEffectHandlerScript, uint8 _effIndex, uint16 _effName);
|
||||
void Call(AuraScript * auraScript, AuraEffect const* aurEff, int32 & amount, bool & canBeRecalculated);
|
||||
private:
|
||||
AuraEffectCalcAmountFnType pEffectHandlerScript;
|
||||
@@ -394,7 +394,7 @@ class AuraScript : public _SpellScript
|
||||
class EffectCalcPeriodicHandler : public EffectBase
|
||||
{
|
||||
public:
|
||||
EffectCalcPeriodicHandler(AuraEffectCalcPeriodicFnType _pEffectHandlerScript,uint8 _effIndex, uint16 _effName);
|
||||
EffectCalcPeriodicHandler(AuraEffectCalcPeriodicFnType _pEffectHandlerScript, uint8 _effIndex, uint16 _effName);
|
||||
void Call(AuraScript * auraScript, AuraEffect const* aurEff, bool & isPeriodic, int32 & periodicTimer);
|
||||
private:
|
||||
AuraEffectCalcPeriodicFnType pEffectHandlerScript;
|
||||
@@ -402,7 +402,7 @@ class AuraScript : public _SpellScript
|
||||
class EffectCalcSpellModHandler : public EffectBase
|
||||
{
|
||||
public:
|
||||
EffectCalcSpellModHandler(AuraEffectCalcSpellModFnType _pEffectHandlerScript,uint8 _effIndex, uint16 _effName);
|
||||
EffectCalcSpellModHandler(AuraEffectCalcSpellModFnType _pEffectHandlerScript, uint8 _effIndex, uint16 _effName);
|
||||
void Call(AuraScript * auraScript, AuraEffect const* aurEff, SpellModifier *& spellMod);
|
||||
private:
|
||||
AuraEffectCalcSpellModFnType pEffectHandlerScript;
|
||||
@@ -410,7 +410,7 @@ class AuraScript : public _SpellScript
|
||||
class EffectApplyHandler : public EffectBase
|
||||
{
|
||||
public:
|
||||
EffectApplyHandler(AuraEffectApplicationModeFnType _pEffectHandlerScript,uint8 _effIndex, uint16 _effName, AuraEffectHandleModes _mode);
|
||||
EffectApplyHandler(AuraEffectApplicationModeFnType _pEffectHandlerScript, uint8 _effIndex, uint16 _effName, AuraEffectHandleModes _mode);
|
||||
void Call(AuraScript * auraScript, AuraEffect const * _aurEff, AuraEffectHandleModes _mode);
|
||||
private:
|
||||
AuraEffectApplicationModeFnType pEffectHandlerScript;
|
||||
@@ -434,14 +434,14 @@ class AuraScript : public _SpellScript
|
||||
};
|
||||
|
||||
#define AURASCRIPT_FUNCTION_CAST_DEFINES(CLASSNAME) \
|
||||
class EffectPeriodicHandlerFunction : public AuraScript::EffectPeriodicHandler { public: EffectPeriodicHandlerFunction(AuraEffectPeriodicFnType _pEffectHandlerScript,uint8 _effIndex, uint16 _effName) : AuraScript::EffectPeriodicHandler((AuraScript::AuraEffectPeriodicFnType)_pEffectHandlerScript, _effIndex, _effName) {} }; \
|
||||
class EffectUpdatePeriodicHandlerFunction : public AuraScript::EffectUpdatePeriodicHandler { public: EffectUpdatePeriodicHandlerFunction(AuraEffectUpdatePeriodicFnType _pEffectHandlerScript,uint8 _effIndex, uint16 _effName) : AuraScript::EffectUpdatePeriodicHandler((AuraScript::AuraEffectUpdatePeriodicFnType)_pEffectHandlerScript, _effIndex, _effName) {} }; \
|
||||
class EffectCalcAmountHandlerFunction : public AuraScript::EffectCalcAmountHandler { public: EffectCalcAmountHandlerFunction(AuraEffectCalcAmountFnType _pEffectHandlerScript,uint8 _effIndex, uint16 _effName) : AuraScript::EffectCalcAmountHandler((AuraScript::AuraEffectCalcAmountFnType)_pEffectHandlerScript, _effIndex, _effName) {} }; \
|
||||
class EffectCalcPeriodicHandlerFunction : public AuraScript::EffectCalcPeriodicHandler { public: EffectCalcPeriodicHandlerFunction(AuraEffectCalcPeriodicFnType _pEffectHandlerScript,uint8 _effIndex, uint16 _effName) : AuraScript::EffectCalcPeriodicHandler((AuraScript::AuraEffectCalcPeriodicFnType)_pEffectHandlerScript, _effIndex, _effName) {} }; \
|
||||
class EffectCalcSpellModHandlerFunction : public AuraScript::EffectCalcSpellModHandler { public: EffectCalcSpellModHandlerFunction(AuraEffectCalcSpellModFnType _pEffectHandlerScript,uint8 _effIndex, uint16 _effName) : AuraScript::EffectCalcSpellModHandler((AuraScript::AuraEffectCalcSpellModFnType)_pEffectHandlerScript, _effIndex, _effName) {} }; \
|
||||
class EffectApplyHandlerFunction : public AuraScript::EffectApplyHandler { public: EffectApplyHandlerFunction(AuraEffectApplicationModeFnType _pEffectHandlerScript,uint8 _effIndex, uint16 _effName, AuraEffectHandleModes _mode) : AuraScript::EffectApplyHandler((AuraScript::AuraEffectApplicationModeFnType)_pEffectHandlerScript, _effIndex, _effName, _mode) {} }; \
|
||||
class EffectAbsorbFunction : public AuraScript::EffectAbsorbHandler { public: EffectAbsorbFunction(AuraEffectAbsorbFnType _pEffectHandlerScript,uint8 _effIndex) : AuraScript::EffectAbsorbHandler((AuraScript::AuraEffectAbsorbFnType)_pEffectHandlerScript, _effIndex) {} }; \
|
||||
class EffectManaShieldFunction : public AuraScript::EffectManaShieldHandler { public: EffectManaShieldFunction(AuraEffectAbsorbFnType _pEffectHandlerScript,uint8 _effIndex) : AuraScript::EffectManaShieldHandler((AuraScript::AuraEffectAbsorbFnType)_pEffectHandlerScript, _effIndex) {} }; \
|
||||
class EffectPeriodicHandlerFunction : public AuraScript::EffectPeriodicHandler { public: EffectPeriodicHandlerFunction(AuraEffectPeriodicFnType _pEffectHandlerScript, uint8 _effIndex, uint16 _effName) : AuraScript::EffectPeriodicHandler((AuraScript::AuraEffectPeriodicFnType)_pEffectHandlerScript, _effIndex, _effName) {} }; \
|
||||
class EffectUpdatePeriodicHandlerFunction : public AuraScript::EffectUpdatePeriodicHandler { public: EffectUpdatePeriodicHandlerFunction(AuraEffectUpdatePeriodicFnType _pEffectHandlerScript, uint8 _effIndex, uint16 _effName) : AuraScript::EffectUpdatePeriodicHandler((AuraScript::AuraEffectUpdatePeriodicFnType)_pEffectHandlerScript, _effIndex, _effName) {} }; \
|
||||
class EffectCalcAmountHandlerFunction : public AuraScript::EffectCalcAmountHandler { public: EffectCalcAmountHandlerFunction(AuraEffectCalcAmountFnType _pEffectHandlerScript, uint8 _effIndex, uint16 _effName) : AuraScript::EffectCalcAmountHandler((AuraScript::AuraEffectCalcAmountFnType)_pEffectHandlerScript, _effIndex, _effName) {} }; \
|
||||
class EffectCalcPeriodicHandlerFunction : public AuraScript::EffectCalcPeriodicHandler { public: EffectCalcPeriodicHandlerFunction(AuraEffectCalcPeriodicFnType _pEffectHandlerScript, uint8 _effIndex, uint16 _effName) : AuraScript::EffectCalcPeriodicHandler((AuraScript::AuraEffectCalcPeriodicFnType)_pEffectHandlerScript, _effIndex, _effName) {} }; \
|
||||
class EffectCalcSpellModHandlerFunction : public AuraScript::EffectCalcSpellModHandler { public: EffectCalcSpellModHandlerFunction(AuraEffectCalcSpellModFnType _pEffectHandlerScript, uint8 _effIndex, uint16 _effName) : AuraScript::EffectCalcSpellModHandler((AuraScript::AuraEffectCalcSpellModFnType)_pEffectHandlerScript, _effIndex, _effName) {} }; \
|
||||
class EffectApplyHandlerFunction : public AuraScript::EffectApplyHandler { public: EffectApplyHandlerFunction(AuraEffectApplicationModeFnType _pEffectHandlerScript, uint8 _effIndex, uint16 _effName, AuraEffectHandleModes _mode) : AuraScript::EffectApplyHandler((AuraScript::AuraEffectApplicationModeFnType)_pEffectHandlerScript, _effIndex, _effName, _mode) {} }; \
|
||||
class EffectAbsorbFunction : public AuraScript::EffectAbsorbHandler { public: EffectAbsorbFunction(AuraEffectAbsorbFnType _pEffectHandlerScript, uint8 _effIndex) : AuraScript::EffectAbsorbHandler((AuraScript::AuraEffectAbsorbFnType)_pEffectHandlerScript, _effIndex) {} }; \
|
||||
class EffectManaShieldFunction : public AuraScript::EffectManaShieldHandler { public: EffectManaShieldFunction(AuraEffectAbsorbFnType _pEffectHandlerScript, uint8 _effIndex) : AuraScript::EffectManaShieldHandler((AuraScript::AuraEffectAbsorbFnType)_pEffectHandlerScript, _effIndex) {} }; \
|
||||
|
||||
#define PrepareAuraScript(CLASSNAME) AURASCRIPT_FUNCTION_TYPE_DEFINES(CLASSNAME) AURASCRIPT_FUNCTION_CAST_DEFINES(CLASSNAME)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user