Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[API] Apply spells with custom buff durations and adjust existing spell buff durations. #1997

Merged
merged 20 commits into from Feb 15, 2022

Conversation

KayenEQ
Copy link
Contributor

@KayenEQ KayenEQ commented Feb 14, 2022

Added quest function that allow you to alter existing buffs durations and a function that allows you to apply new buffs with custom durations. As well, new functions to obtain buff information, such as duration, from spell id or buff slot.

$mob->SetBuffDuration(spell_id, duration)
This function will adjust an existing buff with the defined spell id to a new buff duration.
Setting spell_id to -1 will adjust ALL buffs to that duration
Setting duration to 0, will adjust the buff to its normal max duration.
Setting duration to -1, will set the buff to be permanent duration.

$mob->ApplySpellBuff(spell_id, duration)
This function will add a new spell buff to the mob with a custom duration.
Setting duration to 0 or not defined, will set the buff to its normal max duration.
Setting duration to -1, will set the buff to be permanent duration.

GetBuffStatValueBySpell(spell_id, stat_identifier)
GetBuffStatValueBySlot(slot, stat_identifier)

Obtain information about a buff from our internal buff struct, such as duration ("ticsremaining'), can be obtained by finding the buff by a spell id, or by finding the buff by buff slot (0=1st slot).

	 "caster_level"
	 "spell_id"
	 "caster_id"
	"ticsremaining" // duration
	 "counters" //cure counters
	"hit_number" //hit counter, that little box on spell buffs that tics down
	"melee_rune"
	"magic_rune"
	"dot_rune"
	"caston_x"
	"caston_y"
	"caston_z"
	"instrument_mod" //bard and base effects modifier
	"persistant_buff" // buff exists after zoning
	"client" //is on a client
	 "extra_di_chance"
	 "root_break_chance"
	 "virus_spread_time"

zone/perl_mob.cpp Outdated Show resolved Hide resolved
zone/perl_mob.cpp Outdated Show resolved Hide resolved
zone/perl_mob.cpp Outdated Show resolved Hide resolved
zone/perl_mob.cpp Outdated Show resolved Hide resolved
common/spdat.h Outdated Show resolved Hide resolved
zone/spell_effects.cpp Outdated Show resolved Hide resolved
zone/spell_effects.cpp Outdated Show resolved Hide resolved
@Kinglykrab
Copy link
Contributor

Can remove the tolower loops.

zone/perl_mob.cpp Outdated Show resolved Hide resolved
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants