Add Buff infrastructure to go through different logic paths from different patches (#5073)
Build / Linux (push) Waiting to run
Build / Windows (push) Waiting to run

This commit is contained in:
dannuic
2026-05-02 22:53:26 -06:00
committed by GitHub
parent c253734c57
commit 18df055f16
201 changed files with 2856 additions and 3105 deletions
+12 -12
View File
@@ -27,7 +27,7 @@
#include "zone/worldserver.h"
#include "zone/zonedb.h"
float Mob::GetActSpellRange(uint16 spell_id, float range)
float Mob::GetActSpellRange(int32 spell_id, float range)
{
float extrange = 100;
@@ -36,7 +36,7 @@ float Mob::GetActSpellRange(uint16 spell_id, float range)
return (range * extrange) / 100;
}
int64 Mob::GetActSpellDamage(uint16 spell_id, int64 value, Mob* target) {
int64 Mob::GetActSpellDamage(int32 spell_id, int64 value, Mob* target) {
if (spells[spell_id].target_type == ST_Self) {
return value;
}
@@ -202,7 +202,7 @@ int64 Mob::GetActSpellDamage(uint16 spell_id, int64 value, Mob* target) {
return value;
}
int64 Mob::GetActReflectedSpellDamage(uint16 spell_id, int64 value, int effectiveness) {
int64 Mob::GetActReflectedSpellDamage(int32 spell_id, int64 value, int effectiveness) {
/*
Reflected spells use the spells base damage before any modifiers or formulas applied.
That value can then be modifier by the reflect spells 'max' value, defined here as effectiveness
@@ -237,7 +237,7 @@ int64 Mob::GetActReflectedSpellDamage(uint16 spell_id, int64 value, int effectiv
return value;
}
int64 Mob::GetActDoTDamage(uint16 spell_id, int64 value, Mob* target, bool from_buff_tic) {
int64 Mob::GetActDoTDamage(int32 spell_id, int64 value, Mob* target, bool from_buff_tic) {
if (target == nullptr)
return value;
@@ -362,7 +362,7 @@ int64 Mob::GetActDoTDamage(uint16 spell_id, int64 value, Mob* target, bool from_
return value;
}
int64 Mob::GetExtraSpellAmt(uint16 spell_id, int64 extra_spell_amt, int64 base_spell_dmg)
int64 Mob::GetExtraSpellAmt(int32 spell_id, int64 extra_spell_amt, int64 base_spell_dmg)
{
if (RuleB(Spells, FlatItemExtraSpellAmt)) {
@@ -401,7 +401,7 @@ int64 Mob::GetExtraSpellAmt(uint16 spell_id, int64 extra_spell_amt, int64 base_s
return extra_spell_amt;
}
int64 Mob::GetActSpellHealing(uint16 spell_id, int64 value, Mob* target, bool from_buff_tic) {
int64 Mob::GetActSpellHealing(int32 spell_id, int64 value, Mob* target, bool from_buff_tic) {
if (target == nullptr && IsBot()) {
target = this;
}
@@ -557,7 +557,7 @@ int64 Mob::GetActSpellHealing(uint16 spell_id, int64 value, Mob* target, bool fr
}
int32 Mob::GetActSpellCost(uint16 spell_id, int32 cost)
int32 Mob::GetActSpellCost(int32 spell_id, int32 cost)
{
//FrenziedDevastation doubles mana cost of all DD spells
int16 FrenziedDevastation = itembonuses.FrenziedDevastation + spellbonuses.FrenziedDevastation + aabonuses.FrenziedDevastation;
@@ -606,7 +606,7 @@ int32 Mob::GetActSpellCost(uint16 spell_id, int32 cost)
return cost;
}
int32 Mob::GetActSpellDuration(uint16 spell_id, int32 duration)
int32 Mob::GetActSpellDuration(int32 spell_id, int32 duration)
{
// focuses don't affect discipline duration (Except War Cries)
if (
@@ -849,7 +849,7 @@ void Client::SendDisciplineUpdate() {
QueuePacket(&app);
}
bool Client::UseDiscipline(uint32 spell_id, uint32 target) {
bool Client::UseDiscipline(int32 spell_id, uint32 target) {
// Dont let client waste a reuse timer if they can't use the disc
if ((IsStunned() && !IsCastNotStandingSpell(spell_id))||
IsFeared() ||
@@ -1001,7 +1001,7 @@ void Client::ResetAllDisciplineTimers() {
}
}
bool Client::HasDisciplineLearned(uint16 spell_id) {
bool Client::HasDisciplineLearned(int32 spell_id) {
bool has_learned = false;
for (auto index = 0; index < MAX_PP_DISCIPLINES; ++index) {
if (GetPP().disciplines.values[index] == spell_id) {
@@ -1063,7 +1063,7 @@ void EntityList::AETaunt(Client* taunter, float range, int bonus_hate)
void EntityList::AESpell(
Mob* caster_mob,
Mob* center_mob,
uint16 spell_id,
int32 spell_id,
bool affect_caster,
int16 resist_adjust,
int* max_targets,
@@ -1250,7 +1250,7 @@ void EntityList::AESpell(
void EntityList::MassGroupBuff(
Mob* caster,
Mob* center,
uint16 spell_id,
int32 spell_id,
bool affect_caster
)
{