mirror of
https://github.com/EQEmu/Server.git
synced 2026-06-10 19:10:25 +00:00
Add Buff infrastructure to go through different logic paths from different patches (#5073)
This commit is contained in:
+13
-13
@@ -1774,7 +1774,7 @@ bool Mob::Attack(Mob* other, int Hand, bool bRiposte, bool IsStrikethrough, bool
|
||||
}
|
||||
}
|
||||
|
||||
void Client::Damage(Mob* other, int64 damage, uint16 spell_id, EQ::skills::SkillType attack_skill, bool avoidable, int8 buffslot, bool iBuffTic, eSpecialAttacks special)
|
||||
void Client::Damage(Mob* other, int64 damage, int32 spell_id, EQ::skills::SkillType attack_skill, bool avoidable, int8 buffslot, bool iBuffTic, eSpecialAttacks special)
|
||||
{
|
||||
if (dead || IsCorpse())
|
||||
return;
|
||||
@@ -1811,7 +1811,7 @@ void Client::Damage(Mob* other, int64 damage, uint16 spell_id, EQ::skills::Skill
|
||||
}
|
||||
}
|
||||
|
||||
bool Client::Death(Mob* killer_mob, int64 damage, uint16 spell, EQ::skills::SkillType attack_skill, KilledByTypes killed_by, bool is_buff_tic)
|
||||
bool Client::Death(Mob* killer_mob, int64 damage, int32 spell, EQ::skills::SkillType attack_skill, KilledByTypes killed_by, bool is_buff_tic)
|
||||
{
|
||||
if (!ClientFinishedLoading() || dead) {
|
||||
return false;
|
||||
@@ -2430,7 +2430,7 @@ bool NPC::Attack(Mob* other, int Hand, bool bRiposte, bool IsStrikethrough, bool
|
||||
return has_hit;
|
||||
}
|
||||
|
||||
void NPC::Damage(Mob* other, int64 damage, uint16 spell_id, EQ::skills::SkillType attack_skill, bool avoidable, int8 buffslot, bool iBuffTic, eSpecialAttacks special) {
|
||||
void NPC::Damage(Mob* other, int64 damage, int32 spell_id, EQ::skills::SkillType attack_skill, bool avoidable, int8 buffslot, bool iBuffTic, eSpecialAttacks special) {
|
||||
if (spell_id == 0)
|
||||
spell_id = SPELL_UNKNOWN;
|
||||
|
||||
@@ -2467,7 +2467,7 @@ void NPC::Damage(Mob* other, int64 damage, uint16 spell_id, EQ::skills::SkillTyp
|
||||
CommonDamage(other, damage, spell_id, attack_skill, avoidable, buffslot, iBuffTic, special);
|
||||
}
|
||||
|
||||
bool NPC::Death(Mob* killer_mob, int64 damage, uint16 spell, EQ::skills::SkillType attack_skill, KilledByTypes killed_by, bool is_buff_tic)
|
||||
bool NPC::Death(Mob* killer_mob, int64 damage, int32 spell, EQ::skills::SkillType attack_skill, KilledByTypes killed_by, bool is_buff_tic)
|
||||
{
|
||||
LogCombat(
|
||||
"Fatal blow dealt by [{}] with [{}] damage, spell [{}], skill [{}]",
|
||||
@@ -3051,7 +3051,7 @@ bool NPC::Death(Mob* killer_mob, int64 damage, uint16 spell, EQ::skills::SkillTy
|
||||
return true;
|
||||
}
|
||||
|
||||
void Mob::AddToHateList(Mob* other, int64 hate /*= 0*/, int64 damage /*= 0*/, bool iYellForHelp /*= true*/, bool bFrenzy /*= false*/, bool iBuffTic /*= false*/, uint16 spell_id, bool pet_command)
|
||||
void Mob::AddToHateList(Mob* other, int64 hate /*= 0*/, int64 damage /*= 0*/, bool iYellForHelp /*= true*/, bool bFrenzy /*= false*/, bool iBuffTic /*= false*/, int32 spell_id, bool pet_command)
|
||||
{
|
||||
if (!other)
|
||||
return;
|
||||
@@ -3312,7 +3312,7 @@ void Mob::DamageShield(Mob* attacker, bool spell_ds) {
|
||||
|
||||
int DS = 0;
|
||||
int rev_ds = 0;
|
||||
uint16 spellid = 0;
|
||||
int32 spellid = 0;
|
||||
|
||||
if (!spell_ds)
|
||||
{
|
||||
@@ -3388,7 +3388,7 @@ void Mob::DamageShield(Mob* attacker, bool spell_ds) {
|
||||
//Reverse DS
|
||||
//this is basically a DS, but the spell is on the attacker, not the attackee
|
||||
//if we've gotten to this point, we know we know "attacker" hit "this" (us) for damage & we aren't invulnerable
|
||||
uint16 rev_ds_spell_id = SPELL_UNKNOWN;
|
||||
int32 rev_ds_spell_id = SPELL_UNKNOWN;
|
||||
|
||||
if (IsValidSpell(spellbonuses.ReverseDamageShieldSpellID)) {
|
||||
rev_ds_spell_id = spellbonuses.ReverseDamageShieldSpellID;
|
||||
@@ -3676,7 +3676,7 @@ int64 Mob::ReduceDamage(int64 damage)
|
||||
return(damage);
|
||||
}
|
||||
|
||||
int64 Mob::AffectMagicalDamage(int64 damage, uint16 spell_id, const bool iBuffTic, Mob* attacker)
|
||||
int64 Mob::AffectMagicalDamage(int64 damage, int32 spell_id, const bool iBuffTic, Mob* attacker)
|
||||
{
|
||||
if (damage <= 0)
|
||||
return damage;
|
||||
@@ -4020,7 +4020,7 @@ bool Mob::CheckDoubleAttack()
|
||||
return zone->random.Int(1, 500) <= chance;
|
||||
}
|
||||
|
||||
void Mob::CommonDamage(Mob* attacker, int64 &damage, const uint16 spell_id, const EQ::skills::SkillType skill_used, bool &avoidable, const int8 buffslot, const bool iBuffTic, eSpecialAttacks special) {
|
||||
void Mob::CommonDamage(Mob* attacker, int64 &damage, const int32 spell_id, const EQ::skills::SkillType skill_used, bool &avoidable, const int8 buffslot, const bool iBuffTic, eSpecialAttacks special) {
|
||||
#ifdef LUA_EQEMU
|
||||
int64 lua_ret = 0;
|
||||
bool ignore_default = false;
|
||||
@@ -4776,7 +4776,7 @@ void Mob::CommonDamage(Mob* attacker, int64 &damage, const uint16 spell_id, cons
|
||||
}
|
||||
}
|
||||
|
||||
void Mob::HealDamage(uint64 amount, Mob* caster, uint16 spell_id)
|
||||
void Mob::HealDamage(uint64 amount, Mob* caster, int32 spell_id)
|
||||
{
|
||||
#ifdef LUA_EQEMU
|
||||
uint64 lua_ret = 0;
|
||||
@@ -5266,7 +5266,7 @@ void Mob::TrySpellProc(const EQ::ItemInstance *inst, const EQ::ItemData *weapon,
|
||||
if (poison_slot > -1) {
|
||||
bool one_shot = !RuleB(Combat, UseExtendedPoisonProcs);
|
||||
float chance = (one_shot) ? 100.0f : ProcChance * (static_cast<float>(SpellProcs[poison_slot].chance) / 100.0f);
|
||||
uint16 spell_id = SpellProcs[poison_slot].spellID;
|
||||
int32 spell_id = SpellProcs[poison_slot].spellID;
|
||||
|
||||
if (zone->random.Roll(chance)) {
|
||||
LogCombat("Poison proc [{}] procing spell [{}] ([{}] percent chance)", poison_slot, spell_id, chance);
|
||||
@@ -5986,8 +5986,8 @@ void Mob::TrySkillProc(Mob *on, EQ::skills::SkillType skill, uint16 ReuseTime, b
|
||||
*/
|
||||
bool CanProc = true;
|
||||
|
||||
uint16 base_spell_id = 0;
|
||||
uint16 proc_spell_id = 0;
|
||||
int32 base_spell_id = 0;
|
||||
int32 proc_spell_id = 0;
|
||||
float ProcMod = 0;
|
||||
float chance = 0;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user