mirror of
https://github.com/EQEmu/Server.git
synced 2026-03-26 13:42:29 +00:00
Kayen: Spell recourse effects / triggerable spell effects will now be applied AFTER the base spells effects have been applied (consistent with live).
This commit is contained in:
parent
7ffce01260
commit
c160b8716f
@ -1,11 +1,14 @@
|
|||||||
EQEMu Changelog (Started on Sept 24, 2003 15:50)
|
EQEMu Changelog (Started on Sept 24, 2003 15:50)
|
||||||
-------------------------------------------------------
|
-------------------------------------------------------
|
||||||
|
|
||||||
|
|
||||||
== 09/22/2014 ==
|
== 09/22/2014 ==
|
||||||
Akkadius: #resetaa now covers the function of #resetaa and #refundaa
|
Akkadius: #resetaa now covers the function of #resetaa and #refundaa
|
||||||
- #resetaa will wipe all AA data, refund the spent points into the available points and send character to character select properly
|
- #resetaa will wipe all AA data, refund the spent points into the available points and send character to character select properly
|
||||||
Akkadius: Removed #refundaa
|
Akkadius: Removed #refundaa
|
||||||
Akkadius: Removed a lot of debug code for blob conversion
|
Akkadius: Removed a lot of debug code for blob conversion
|
||||||
Akkadius: Changed status logging for loads/saves to Debug category
|
Akkadius: Changed status logging for loads/saves to Debug category
|
||||||
|
Kayen: Spell recourse effects / triggerable spell effects will now be applied AFTER the base spells effects have been applied (consistent with live)
|
||||||
|
|
||||||
== 09/21/2014 ==
|
== 09/21/2014 ==
|
||||||
Akkadius: Player Profile Blob to Database Conversion
|
Akkadius: Player Profile Blob to Database Conversion
|
||||||
|
|||||||
103
zone/spells.cpp
103
zone/spells.cpp
@ -3606,108 +3606,9 @@ bool Mob::SpellOnTarget(uint16 spell_id, Mob* spelltar, bool reflect, bool use_r
|
|||||||
spell_effectiveness = 100;
|
spell_effectiveness = 100;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Recourse means there is a spell linked to that spell in that the recourse spell will
|
|
||||||
// be automatically casted on the casters group or the caster only depending on Targettype
|
|
||||||
// this is for things like dark empathy, shadow vortex
|
|
||||||
int recourse_spell=0;
|
|
||||||
recourse_spell = spells[spell_id].RecourseLink;
|
|
||||||
if(recourse_spell)
|
|
||||||
{
|
|
||||||
if(spells[recourse_spell].targettype == ST_Group || spells[recourse_spell].targettype == ST_GroupTeleport)
|
|
||||||
{
|
|
||||||
if(IsGrouped())
|
|
||||||
{
|
|
||||||
Group *g = entity_list.GetGroupByMob(this);
|
|
||||||
if(g)
|
|
||||||
g->CastGroupSpell(this, recourse_spell);
|
|
||||||
else{
|
|
||||||
SpellOnTarget(recourse_spell, this);
|
|
||||||
#ifdef GROUP_BUFF_PETS
|
|
||||||
if (GetPet())
|
|
||||||
SpellOnTarget(recourse_spell, GetPet());
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else if(IsRaidGrouped() && IsClient())
|
|
||||||
{
|
|
||||||
Raid *r = entity_list.GetRaidByClient(CastToClient());
|
|
||||||
uint32 gid = 0xFFFFFFFF;
|
|
||||||
if(r)
|
|
||||||
gid = r->GetGroup(GetName());
|
|
||||||
else
|
|
||||||
gid = 13; // Forces ungrouped spell casting
|
|
||||||
|
|
||||||
if(gid < 12)
|
|
||||||
{
|
|
||||||
r->CastGroupSpell(this, recourse_spell, gid);
|
|
||||||
}
|
|
||||||
else{
|
|
||||||
SpellOnTarget(recourse_spell, this);
|
|
||||||
#ifdef GROUP_BUFF_PETS
|
|
||||||
if (GetPet())
|
|
||||||
SpellOnTarget(recourse_spell, GetPet());
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else if(HasOwner())
|
|
||||||
{
|
|
||||||
if(GetOwner()->IsGrouped())
|
|
||||||
{
|
|
||||||
Group *g = entity_list.GetGroupByMob(GetOwner());
|
|
||||||
if(g)
|
|
||||||
g->CastGroupSpell(this, recourse_spell);
|
|
||||||
else{
|
|
||||||
SpellOnTarget(recourse_spell, GetOwner());
|
|
||||||
SpellOnTarget(recourse_spell, this);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else if(GetOwner()->IsRaidGrouped() && GetOwner()->IsClient())
|
|
||||||
{
|
|
||||||
Raid *r = entity_list.GetRaidByClient(GetOwner()->CastToClient());
|
|
||||||
uint32 gid = 0xFFFFFFFF;
|
|
||||||
if(r)
|
|
||||||
gid = r->GetGroup(GetOwner()->GetName());
|
|
||||||
else
|
|
||||||
gid = 13; // Forces ungrouped spell casting
|
|
||||||
|
|
||||||
if(gid < 12)
|
|
||||||
{
|
|
||||||
r->CastGroupSpell(this, recourse_spell, gid);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
SpellOnTarget(recourse_spell, GetOwner());
|
|
||||||
SpellOnTarget(recourse_spell, this);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
SpellOnTarget(recourse_spell, GetOwner());
|
|
||||||
SpellOnTarget(recourse_spell, this);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
SpellOnTarget(recourse_spell, this);
|
|
||||||
#ifdef GROUP_BUFF_PETS
|
|
||||||
if (GetPet())
|
|
||||||
SpellOnTarget(recourse_spell, GetPet());
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
SpellOnTarget(recourse_spell, this);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if(spelltar->spellbonuses.SpellDamageShield && IsDetrimentalSpell(spell_id))
|
if(spelltar->spellbonuses.SpellDamageShield && IsDetrimentalSpell(spell_id))
|
||||||
spelltar->DamageShield(this, true);
|
spelltar->DamageShield(this, true);
|
||||||
|
|
||||||
TrySpellTrigger(spelltar, spell_id);
|
|
||||||
TryApplyEffect(spelltar, spell_id);
|
|
||||||
|
|
||||||
if (spelltar->IsAIControlled() && IsDetrimentalSpell(spell_id) && !IsHarmonySpell(spell_id)) {
|
if (spelltar->IsAIControlled() && IsDetrimentalSpell(spell_id) && !IsHarmonySpell(spell_id)) {
|
||||||
int32 aggro_amount = CheckAggroAmount(spell_id, isproc);
|
int32 aggro_amount = CheckAggroAmount(spell_id, isproc);
|
||||||
mlog(SPELLS__CASTING, "Spell %d cast on %s generated %d hate", spell_id, spelltar->GetName(), aggro_amount);
|
mlog(SPELLS__CASTING, "Spell %d cast on %s generated %d hate", spell_id, spelltar->GetName(), aggro_amount);
|
||||||
@ -3746,6 +3647,10 @@ bool Mob::SpellOnTarget(uint16 spell_id, Mob* spelltar, bool reflect, bool use_r
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
TrySpellTrigger(spelltar, spell_id);
|
||||||
|
TryApplyEffect(spelltar, spell_id);
|
||||||
|
if (IsValidSpell(spells[spell_id].RecourseLink))
|
||||||
|
SpellFinished(spells[spell_id].RecourseLink, this, 10, 0, -1, spells[spells[spell_id].RecourseLink].ResistDiff);
|
||||||
|
|
||||||
if (IsDetrimentalSpell(spell_id)) {
|
if (IsDetrimentalSpell(spell_id)) {
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user