mirror of
https://github.com/EQEmu/Server.git
synced 2025-12-12 01:11:29 +00:00
[Spells] Implemented SPA 390 SE_FcTimerLockout (#1496)
* Implemented SPA 390 SE_FcTimerLockout Implemented SPA 390 SE_FcTimerLockout This focus limited effect sets any spell that meets the criteria of the of the focus limits to be a on recast timer. Base value: recast duration in milliseconds. Note: This focus can only be applied from spells (not item or AA) Note: Although reinforced by the server, to appear visually correct both server side and client side spell values need to match (ie. need to matching spells_new values). Example spell: Suppression of Fire ID 16973. Sets any fire spell in the clients spell bar to a 2 second recast when the client is affect by the spell. * Formatting * Use range based for Co-authored-by: Akkadius <akkadius1@gmail.com>
This commit is contained in:
parent
d40d21121a
commit
bde5d6931c
@ -752,8 +752,8 @@ typedef enum {
|
|||||||
#define SE_CastOnCurer 386 // implemented - Casts a spell on the person curing
|
#define SE_CastOnCurer 386 // implemented - Casts a spell on the person curing
|
||||||
#define SE_CastOnCure 387 // implemented - Casts a spell on the cured person
|
#define SE_CastOnCure 387 // implemented - Casts a spell on the cured person
|
||||||
#define SE_SummonCorpseZone 388 // implemented - summons a corpse from any zone(nec AA)
|
#define SE_SummonCorpseZone 388 // implemented - summons a corpse from any zone(nec AA)
|
||||||
#define SE_FcTimerRefresh 389 // implemented, @Fc, On Caster, reset all recast timers, base: 1
|
#define SE_FcTimerRefresh 389 // implemented, @Fc, On Caster, reset all recast timers, base: 1, Note: Applied from casted spells only
|
||||||
//#define SE_FcTimerLockout 390 // *not implemented - Sets recast timers to specific value, focus limited.
|
#define SE_FcTimerLockout 390 // implemented, @Fc, On Caster, set a spell to be on recast timer, base: recast duration milliseconds, Note: Applied from casted spells only
|
||||||
#define SE_LimitManaMax 391 // implemented, @Ff, Mininum mana of spell that can be focused, base1: mana amt
|
#define SE_LimitManaMax 391 // implemented, @Ff, Mininum mana of spell that can be focused, base1: mana amt
|
||||||
#define SE_FcHealAmt 392 // implemented, @Fc, On Caster, spell healing mod flat amt, base: amt
|
#define SE_FcHealAmt 392 // implemented, @Fc, On Caster, spell healing mod flat amt, base: amt
|
||||||
#define SE_FcHealPctIncoming 393 // implemented, @Fc, On Target, heal received critical chance mod, base: chance pct
|
#define SE_FcHealPctIncoming 393 // implemented, @Fc, On Target, heal received critical chance mod, base: chance pct
|
||||||
|
|||||||
@ -4007,6 +4007,8 @@ uint8 Mob::IsFocusEffect(uint16 spell_id,int effect_index, bool AA,uint32 aa_eff
|
|||||||
return focusFcMute;
|
return focusFcMute;
|
||||||
case SE_FcTimerRefresh:
|
case SE_FcTimerRefresh:
|
||||||
return focusFcTimerRefresh;
|
return focusFcTimerRefresh;
|
||||||
|
case SE_FcTimerLockout:
|
||||||
|
return focusFcTimerLockout;
|
||||||
case SE_Fc_Cast_Spell_On_Land:
|
case SE_Fc_Cast_Spell_On_Land:
|
||||||
return focusFcCastSpellOnLand;
|
return focusFcCastSpellOnLand;
|
||||||
case SE_FcStunTimeMod:
|
case SE_FcStunTimeMod:
|
||||||
|
|||||||
@ -143,7 +143,8 @@ typedef enum { //focus types
|
|||||||
focusIncreaseNumHits, //@Fc, SPA: 421, SE_FcIncreaseNumHits, On Caster, numhits mod flat amt, base: amt
|
focusIncreaseNumHits, //@Fc, SPA: 421, SE_FcIncreaseNumHits, On Caster, numhits mod flat amt, base: amt
|
||||||
focusFcLimitUse, //@Fc, SPA: 420, SE_FcLimitUse, On Caster, numhits mod pct, base: pct
|
focusFcLimitUse, //@Fc, SPA: 420, SE_FcLimitUse, On Caster, numhits mod pct, base: pct
|
||||||
focusFcMute, //@Fc, SPA: 357, SE_FcMute, On Caster, prevents spell casting, base: chance pct
|
focusFcMute, //@Fc, SPA: 357, SE_FcMute, On Caster, prevents spell casting, base: chance pct
|
||||||
focusFcTimerRefresh, //@Fc, SPA: 389, SE_FcTimerRefresh, On Caster, reset all recast timers, base: 1
|
focusFcTimerRefresh, //@Fc, SPA: 389, SE_FcTimerRefresh, On Caster, reset spell recast timer, base: 1
|
||||||
|
focusFcTimerLockout, //@Fc, SPA: 390, SE_FcTimerLockout, On Caster, set a spell to be on recast timer, base: recast duration milliseconds
|
||||||
focusFcStunTimeMod, //@Fc, SPA: 133, SE_FcStunTimeMod, On Caster, stun time mod pct, base: chance pct
|
focusFcStunTimeMod, //@Fc, SPA: 133, SE_FcStunTimeMod, On Caster, stun time mod pct, base: chance pct
|
||||||
focusFcResistIncoming, //@Fc, SPA: 510, SE_Fc_Resist_Incoming, On Target, resist modifier, base: amt
|
focusFcResistIncoming, //@Fc, SPA: 510, SE_Fc_Resist_Incoming, On Target, resist modifier, base: amt
|
||||||
focusFcAmplifyMod, //@Fc, SPA: 507, SE_Fc_Amplify_Mod, On Caster, damage-heal-dot mod pct, base: pct
|
focusFcAmplifyMod, //@Fc, SPA: 507, SE_Fc_Amplify_Mod, On Caster, damage-heal-dot mod pct, base: pct
|
||||||
|
|||||||
@ -2559,6 +2559,35 @@ bool Mob::SpellEffect(Mob* caster, uint16 spell_id, float partial, int level_ove
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
case SE_FcTimerLockout: {
|
||||||
|
if (IsClient()) {
|
||||||
|
for (unsigned int mem_spell : CastToClient()->m_pp.mem_spells) {
|
||||||
|
if (IsValidSpell(mem_spell)) {
|
||||||
|
int32 new_recast_timer = CalcFocusEffect(
|
||||||
|
focusFcTimerLockout,
|
||||||
|
spell_id,
|
||||||
|
mem_spell
|
||||||
|
);
|
||||||
|
if (new_recast_timer) {
|
||||||
|
bool apply_recast_timer = true;
|
||||||
|
if (IsCasting() && casting_spell_id == mem_spell) {
|
||||||
|
apply_recast_timer = false;
|
||||||
|
}
|
||||||
|
if (apply_recast_timer) {
|
||||||
|
new_recast_timer = new_recast_timer / 1000;
|
||||||
|
CastToClient()->GetPTimers().Start(
|
||||||
|
pTimerSpellStart + mem_spell,
|
||||||
|
static_cast<uint32>(new_recast_timer)
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
SetMana(GetMana());
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
case SE_HealGroupFromMana: {
|
case SE_HealGroupFromMana: {
|
||||||
if(!caster)
|
if(!caster)
|
||||||
break;
|
break;
|
||||||
@ -5753,6 +5782,12 @@ int32 Mob::CalcFocusEffect(focusType type, uint16 focus_id, uint16 spell_id, boo
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case SE_FcTimerLockout:
|
||||||
|
if (type == focusFcTimerLockout) {
|
||||||
|
value = focus_spell.base[i];
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
|
||||||
case SE_Fc_Cast_Spell_On_Land:
|
case SE_Fc_Cast_Spell_On_Land:
|
||||||
if (type == focusFcCastSpellOnLand) {
|
if (type == focusFcCastSpellOnLand) {
|
||||||
if (zone->random.Roll(focus_spell.base[i])) {
|
if (zone->random.Roll(focus_spell.base[i])) {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user