Esempio n. 1
0
int32 Client::GetActSpellDuration(uint16 spell_id, int32 duration)
{
    int increase = 100;
    increase += GetFocusEffect(focusSpellDuration, spell_id);
    int tic_inc = 0;
    tic_inc = GetFocusEffect(focusSpellDurByTic, spell_id);

    if(IsBeneficialSpell(spell_id))
    {
        switch(GetAA(aaSpellCastingReinforcement)) {
        case 1:
            increase += 5;
            break;
        case 2:
            increase += 15;
            break;
        case 3:
            increase += 30;
            if (GetAA(aaSpellCastingReinforcementMastery) == 1)
                increase += 20;
            break;
        }
    }

    if(IsMezSpell(spell_id)) {
        tic_inc += GetAA(aaMesmerizationMastery);
    }

    return (((duration * increase) / 100) + tic_inc);
}
Esempio n. 2
0
bool IsDebuffSpell(uint16 spell_id)
{
	if (IsBeneficialSpell(spell_id) || IsEffectHitpointsSpell(spell_id) || IsStunSpell(spell_id) ||
			IsMezSpell(spell_id) || IsCharmSpell(spell_id) || IsSlowSpell(spell_id) ||
			IsEffectInSpell(spell_id, SE_Root) || IsEffectInSpell(spell_id, SE_CancelMagic) ||
			IsEffectInSpell(spell_id, SE_MovementSpeed) || IsFearSpell(spell_id) || IsEffectInSpell(spell_id, SE_InstantHate))
		return false;
	else
		return true;
}
Esempio n. 3
0
int32 Client::GetActSpellDuration(uint16 spell_id, int32 duration)
{
	if (spells[spell_id].not_extendable)
		return duration;

	int increase = 100;
	increase += GetFocusEffect(focusSpellDuration, spell_id);
	int tic_inc = 0;
	tic_inc = GetFocusEffect(focusSpellDurByTic, spell_id);

	// Only need this for clients, since the change was for bard songs, I assume we should keep non bard songs getting +1
	// However if its bard or not and is mez, charm or fear, we need to add 1 so that client is in sync
	if (!(IsShortDurationBuff(spell_id) && IsBardSong(spell_id)) ||
			IsFearSpell(spell_id) ||
			IsCharmSpell(spell_id) ||
			IsMezSpell(spell_id) ||
			IsBlindSpell(spell_id))
		tic_inc += 1;

	return (((duration * increase) / 100) + tic_inc);
}