mirror of
https://github.com/EQEmu/Server.git
synced 2025-12-13 18:51:29 +00:00
[Commands] Cleanup #nukebuffs Command. (#1795)
* [Commands] Cleanup #nukebuffs Command. - Cleanup messages and logic. - #nukebuffs now allows you to nuke all, beneficial, or detrimental buffs, also added a help menu. - Add BuffFadeBeneficial(). - Cleanup logic in some buff fade methods. - Fix several spots where we were using CalcBonuses() when it was unnecessary, i.e when you fade no buffs you do not need to recalculate bonuses. * Update spells.cpp
This commit is contained in:
parent
39c27c987d
commit
d29993fafa
@ -266,7 +266,7 @@ int command_init(void)
|
|||||||
command_add("npctype_cache", "[id] or all - Clears the npc type cache for either the id or all npcs.", AccountStatus::GMImpossible, command_npctype_cache) ||
|
command_add("npctype_cache", "[id] or all - Clears the npc type cache for either the id or all npcs.", AccountStatus::GMImpossible, command_npctype_cache) ||
|
||||||
command_add("npctypespawn", "[npctypeid] [factionid] - Spawn an NPC from the db", AccountStatus::Steward, command_npctypespawn) ||
|
command_add("npctypespawn", "[npctypeid] [factionid] - Spawn an NPC from the db", AccountStatus::Steward, command_npctypespawn) ||
|
||||||
command_add("nudge", "- Nudge your target's current position by specific values", AccountStatus::QuestTroupe, command_nudge) ||
|
command_add("nudge", "- Nudge your target's current position by specific values", AccountStatus::QuestTroupe, command_nudge) ||
|
||||||
command_add("nukebuffs", "- Strip all buffs on you or your target", AccountStatus::Guide, command_nukebuffs) ||
|
command_add("nukebuffs", "[Beneficial|Detrimental|Help] - Strip all buffs by type on you or your target (no argument to remove all buffs)", AccountStatus::Guide, command_nukebuffs) ||
|
||||||
command_add("nukeitem", "[Item ID] - Removes the specified Item ID from you or your player target's inventory", AccountStatus::GMLeadAdmin, command_nukeitem) ||
|
command_add("nukeitem", "[Item ID] - Removes the specified Item ID from you or your player target's inventory", AccountStatus::GMLeadAdmin, command_nukeitem) ||
|
||||||
command_add("object", "List|Add|Edit|Move|Rotate|Copy|Save|Undo|Delete - Manipulate static and tradeskill objects within the zone", AccountStatus::GMAdmin, command_object) ||
|
command_add("object", "List|Add|Edit|Move|Rotate|Copy|Save|Undo|Delete - Manipulate static and tradeskill objects within the zone", AccountStatus::GMAdmin, command_object) ||
|
||||||
command_add("oocmute", "[1/0] - Mutes OOC chat", AccountStatus::GMMgmt, command_oocmute) ||
|
command_add("oocmute", "[1/0] - Mutes OOC chat", AccountStatus::GMMgmt, command_oocmute) ||
|
||||||
|
|||||||
@ -2,11 +2,46 @@
|
|||||||
|
|
||||||
void command_nukebuffs(Client *c, const Seperator *sep)
|
void command_nukebuffs(Client *c, const Seperator *sep)
|
||||||
{
|
{
|
||||||
if (c->GetTarget() == 0) {
|
Mob* target = c;
|
||||||
c->BuffFadeAll();
|
if (c->GetTarget()) {
|
||||||
}
|
target = c->GetTarget();
|
||||||
else {
|
}
|
||||||
c->GetTarget()->BuffFadeAll();
|
|
||||||
}
|
std::string buff_identifier = str_tolower(sep->arg[1]);
|
||||||
|
std::string buff_type;
|
||||||
|
bool is_beneficial = buff_identifier.find("beneficial") != std::string::npos;
|
||||||
|
bool is_detrimental = buff_identifier.find("detrimental") != std::string::npos;
|
||||||
|
bool is_help = buff_identifier.find("help") != std::string::npos;
|
||||||
|
if (is_beneficial) {
|
||||||
|
target->BuffFadeBeneficial();
|
||||||
|
buff_type = " beneficial";
|
||||||
|
} else if (is_detrimental) {
|
||||||
|
target->BuffFadeDetrimental();
|
||||||
|
buff_type = " detrimental";
|
||||||
|
} else if (is_help) {
|
||||||
|
c->Message(Chat::White, "Usage: #nukebuffs");
|
||||||
|
c->Message(Chat::White, "Usage: #nukebuffs beneficial");
|
||||||
|
c->Message(Chat::White, "Usage: #nukebuffs detrimental");
|
||||||
|
return;
|
||||||
|
} else {
|
||||||
|
target->BuffFadeAll();
|
||||||
|
}
|
||||||
|
|
||||||
|
c->Message(
|
||||||
|
Chat::White,
|
||||||
|
fmt::format(
|
||||||
|
"Faded all{} buffs for {}.",
|
||||||
|
buff_type,
|
||||||
|
(
|
||||||
|
c == target ?
|
||||||
|
"yourself" :
|
||||||
|
fmt::format(
|
||||||
|
"{} ({})",
|
||||||
|
target->GetCleanName(),
|
||||||
|
target->GetID()
|
||||||
|
)
|
||||||
|
)
|
||||||
|
).c_str()
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -361,8 +361,9 @@ public:
|
|||||||
virtual void DoBuffTic(const Buffs_Struct &buff, int slot, Mob* caster = nullptr);
|
virtual void DoBuffTic(const Buffs_Struct &buff, int slot, Mob* caster = nullptr);
|
||||||
void BuffFadeBySpellID(uint16 spell_id);
|
void BuffFadeBySpellID(uint16 spell_id);
|
||||||
void BuffFadeBySpellIDAndCaster(uint16 spell_id, uint16 caster_id);
|
void BuffFadeBySpellIDAndCaster(uint16 spell_id, uint16 caster_id);
|
||||||
void BuffFadeByEffect(int effect_id, int skipslot = -1);
|
void BuffFadeByEffect(int effect_id, int slot_to_skip = -1);
|
||||||
void BuffFadeAll();
|
void BuffFadeAll();
|
||||||
|
void BuffFadeBeneficial();
|
||||||
void BuffFadeNonPersistDeath();
|
void BuffFadeNonPersistDeath();
|
||||||
void BuffFadeDetrimental();
|
void BuffFadeDetrimental();
|
||||||
void BuffFadeBySlot(int slot, bool iRecalcBonuses = true);
|
void BuffFadeBySlot(int slot, bool iRecalcBonuses = true);
|
||||||
@ -393,7 +394,7 @@ public:
|
|||||||
void DoGravityEffect();
|
void DoGravityEffect();
|
||||||
void DamageShield(Mob* other, bool spell_ds = false);
|
void DamageShield(Mob* other, bool spell_ds = false);
|
||||||
int32 RuneAbsorb(int32 damage, uint16 type);
|
int32 RuneAbsorb(int32 damage, uint16 type);
|
||||||
bool FindBuff(uint16 spellid);
|
bool FindBuff(uint16 spell_id);
|
||||||
uint16 FindBuffBySlot(int slot);
|
uint16 FindBuffBySlot(int slot);
|
||||||
uint32 BuffCount();
|
uint32 BuffCount();
|
||||||
bool FindType(uint16 type, bool bOffensive = false, uint16 threshold = 100);
|
bool FindType(uint16 type, bool bOffensive = false, uint16 threshold = 100);
|
||||||
@ -421,7 +422,7 @@ public:
|
|||||||
inline float GetTargetRingZ() const { return m_TargetRing.z; }
|
inline float GetTargetRingZ() const { return m_TargetRing.z; }
|
||||||
inline bool HasEndurUpkeep() const { return endur_upkeep; }
|
inline bool HasEndurUpkeep() const { return endur_upkeep; }
|
||||||
inline void SetEndurUpkeep(bool val) { endur_upkeep = val; }
|
inline void SetEndurUpkeep(bool val) { endur_upkeep = val; }
|
||||||
bool HasBuffWithSpellGroup(int spellgroup);
|
bool HasBuffWithSpellGroup(int spell_group);
|
||||||
|
|
||||||
//Basic Stats/Inventory
|
//Basic Stats/Inventory
|
||||||
virtual void SetLevel(uint8 in_level, bool command = false) { level = in_level; }
|
virtual void SetLevel(uint8 in_level, bool command = false) { level = in_level; }
|
||||||
|
|||||||
224
zone/spells.cpp
224
zone/spells.cpp
@ -4255,21 +4255,27 @@ void Corpse::CastRezz(uint16 spellid, Mob* Caster)
|
|||||||
safe_delete(outapp);
|
safe_delete(outapp);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool Mob::FindBuff(uint16 spellid)
|
bool Mob::FindBuff(uint16 spell_id)
|
||||||
{
|
{
|
||||||
int i;
|
|
||||||
|
|
||||||
uint32 buff_count = GetMaxTotalSlots();
|
uint32 buff_count = GetMaxTotalSlots();
|
||||||
for(i = 0; i < buff_count; i++)
|
for (int buff_slot = 0; buff_slot < buff_count; buff_slot++) {
|
||||||
if(buffs[i].spellid == spellid)
|
auto current_spell_id = buffs[buff_slot].spellid;
|
||||||
|
if (
|
||||||
|
IsValidSpell(current_spell_id) &&
|
||||||
|
current_spell_id == spell_id
|
||||||
|
) {
|
||||||
return true;
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
uint16 Mob::FindBuffBySlot(int slot) {
|
uint16 Mob::FindBuffBySlot(int slot) {
|
||||||
if (buffs[slot].spellid != SPELL_UNKNOWN)
|
auto current_spell_id = buffs[slot].spellid;
|
||||||
return buffs[slot].spellid;
|
if (IsValidSpell(current_spell_id)) {
|
||||||
|
return current_spell_id;
|
||||||
|
}
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
@ -4277,168 +4283,222 @@ uint16 Mob::FindBuffBySlot(int slot) {
|
|||||||
uint32 Mob::BuffCount() {
|
uint32 Mob::BuffCount() {
|
||||||
uint32 active_buff_count = 0;
|
uint32 active_buff_count = 0;
|
||||||
int buff_count = GetMaxTotalSlots();
|
int buff_count = GetMaxTotalSlots();
|
||||||
for (int i = 0; i < buff_count; i++)
|
for (int buff_slot = 0; buff_slot < buff_count; buff_slot++) {
|
||||||
if (buffs[i].spellid != SPELL_UNKNOWN)
|
if (IsValidSpell(buffs[buff_slot].spellid)) {
|
||||||
active_buff_count++;
|
active_buff_count++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return active_buff_count;
|
return active_buff_count;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool Mob::HasBuffWithSpellGroup(int spellgroup)
|
bool Mob::HasBuffWithSpellGroup(int spell_group)
|
||||||
{
|
{
|
||||||
for (int i = 0; i < GetMaxTotalSlots(); i++) {
|
for (int buff_slot = 0; buff_slot < GetMaxTotalSlots(); buff_slot++) {
|
||||||
if (IsValidSpell(buffs[i].spellid) && spells[buffs[i].spellid].spell_group == spellgroup) {
|
auto current_spell_id = buffs[buff_slot].spellid;
|
||||||
|
if (
|
||||||
|
IsValidSpell(current_spell_id) &&
|
||||||
|
spells[current_spell_id].spell_group == spell_group
|
||||||
|
) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
// removes all buffs
|
|
||||||
void Mob::BuffFadeAll()
|
void Mob::BuffFadeAll()
|
||||||
{
|
{
|
||||||
|
bool recalc_bonus = false;
|
||||||
int buff_count = GetMaxTotalSlots();
|
int buff_count = GetMaxTotalSlots();
|
||||||
for (int j = 0; j < buff_count; j++) {
|
for (int buff_slot = 0; buff_slot < buff_count; buff_slot++) {
|
||||||
if(buffs[j].spellid != SPELL_UNKNOWN)
|
if (IsValidSpell(buffs[buff_slot].spellid)) {
|
||||||
BuffFadeBySlot(j, false);
|
BuffFadeBySlot(buff_slot, false);
|
||||||
|
recalc_bonus = true;
|
||||||
}
|
}
|
||||||
//we tell BuffFadeBySlot not to recalc, so we can do it only once when were done
|
}
|
||||||
|
|
||||||
|
if (recalc_bonus) {
|
||||||
CalcBonuses();
|
CalcBonuses();
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void Mob::BuffFadeNonPersistDeath()
|
void Mob::BuffFadeNonPersistDeath()
|
||||||
{
|
{
|
||||||
|
bool recalc_bonus = false;
|
||||||
int buff_count = GetMaxTotalSlots();
|
int buff_count = GetMaxTotalSlots();
|
||||||
for (int j = 0; j < buff_count; j++) {
|
for (int buff_slot = 0; buff_slot < buff_count; buff_slot++) {
|
||||||
if (buffs[j].spellid != SPELL_UNKNOWN && !IsPersistDeathSpell(buffs[j].spellid))
|
auto current_spell_id = buffs[buff_slot].spellid;
|
||||||
BuffFadeBySlot(j, false);
|
if (
|
||||||
|
IsValidSpell(current_spell_id) &&
|
||||||
|
!IsPersistDeathSpell(current_spell_id)
|
||||||
|
) {
|
||||||
|
BuffFadeBySlot(buff_slot, false);
|
||||||
|
recalc_bonus = true;
|
||||||
}
|
}
|
||||||
//we tell BuffFadeBySlot not to recalc, so we can do it only once when were done
|
}
|
||||||
|
|
||||||
|
if (recalc_bonus) {
|
||||||
CalcBonuses();
|
CalcBonuses();
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void Mob::BuffFadeBeneficial() {
|
||||||
|
bool recalc_bonus = false;
|
||||||
|
int buff_count = GetMaxTotalSlots();
|
||||||
|
for (int buff_slot = 0; buff_slot < buff_count; buff_slot++) {
|
||||||
|
auto current_spell_id = buffs[buff_slot].spellid;
|
||||||
|
if (
|
||||||
|
IsValidSpell(current_spell_id) &&
|
||||||
|
IsBeneficialSpell(current_spell_id)
|
||||||
|
) {
|
||||||
|
BuffFadeBySlot(buff_slot, false);
|
||||||
|
recalc_bonus = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (recalc_bonus) {
|
||||||
|
CalcBonuses();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void Mob::BuffFadeDetrimental() {
|
void Mob::BuffFadeDetrimental() {
|
||||||
|
bool recalc_bonus = false;
|
||||||
int buff_count = GetMaxTotalSlots();
|
int buff_count = GetMaxTotalSlots();
|
||||||
for (int j = 0; j < buff_count; j++) {
|
for (int buff_slot = 0; buff_slot < buff_count; buff_slot++) {
|
||||||
if(buffs[j].spellid != SPELL_UNKNOWN) {
|
auto current_spell_id = buffs[buff_slot].spellid;
|
||||||
if(IsDetrimentalSpell(buffs[j].spellid))
|
if (
|
||||||
BuffFadeBySlot(j, false);
|
IsValidSpell(current_spell_id) &&
|
||||||
|
IsDetrimentalSpell(current_spell_id)
|
||||||
|
) {
|
||||||
|
BuffFadeBySlot(buff_slot, false);
|
||||||
|
recalc_bonus = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
//we tell BuffFadeBySlot not to recalc, so we can do it only once when were done
|
|
||||||
|
if (recalc_bonus) {
|
||||||
CalcBonuses();
|
CalcBonuses();
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void Mob::BuffFadeDetrimentalByCaster(Mob *caster)
|
void Mob::BuffFadeDetrimentalByCaster(Mob *caster)
|
||||||
{
|
{
|
||||||
if(!caster)
|
if(!caster) {
|
||||||
return;
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool recalc_bonus = false;
|
||||||
int buff_count = GetMaxTotalSlots();
|
int buff_count = GetMaxTotalSlots();
|
||||||
for (int j = 0; j < buff_count; j++) {
|
for (int buff_slot = 0; buff_slot < buff_count; buff_slot++) {
|
||||||
if(buffs[j].spellid != SPELL_UNKNOWN) {
|
auto current_spell_id = buffs[buff_slot].spellid;
|
||||||
if(IsDetrimentalSpell(buffs[j].spellid))
|
if (
|
||||||
{
|
IsValidSpell(current_spell_id) &&
|
||||||
//this is a pretty terrible way to do this but
|
IsDetrimentalSpell(current_spell_id) &&
|
||||||
//there really isn't another way till I rewrite the basics
|
caster->GetID() == buffs[buff_slot].casterid
|
||||||
Mob * c = entity_list.GetMob(buffs[j].casterid);
|
) {
|
||||||
if(c && c == caster)
|
BuffFadeBySlot(buff_slot, false);
|
||||||
BuffFadeBySlot(j, false);
|
recalc_bonus = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
//we tell BuffFadeBySlot not to recalc, so we can do it only once when were done
|
if (recalc_bonus) {
|
||||||
CalcBonuses();
|
CalcBonuses();
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void Mob::BuffFadeBySitModifier()
|
void Mob::BuffFadeBySitModifier()
|
||||||
{
|
{
|
||||||
bool r_bonus = false;
|
bool recalc_bonus = false;
|
||||||
uint32 buff_count = GetMaxTotalSlots();
|
int buff_count = GetMaxTotalSlots();
|
||||||
for(uint32 j = 0; j < buff_count; ++j)
|
for (int buff_slot = 0; buff_slot < buff_count; buff_slot++) {
|
||||||
{
|
auto current_spell_id = buffs[buff_slot].spellid;
|
||||||
if(buffs[j].spellid != SPELL_UNKNOWN)
|
if (
|
||||||
{
|
IsValidSpell(current_spell_id) &&
|
||||||
if(spells[buffs[j].spellid].disallow_sit)
|
spells[current_spell_id].disallow_sit
|
||||||
{
|
) {
|
||||||
BuffFadeBySlot(j, false);
|
BuffFadeBySlot(buff_slot, false);
|
||||||
r_bonus = true;
|
recalc_bonus = true;
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if(r_bonus)
|
if (recalc_bonus) {
|
||||||
{
|
|
||||||
CalcBonuses();
|
CalcBonuses();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// removes the buff matching spell_id
|
|
||||||
void Mob::BuffFadeBySpellID(uint16 spell_id)
|
void Mob::BuffFadeBySpellID(uint16 spell_id)
|
||||||
{
|
{
|
||||||
|
bool recalc_bonus = false;
|
||||||
int buff_count = GetMaxTotalSlots();
|
int buff_count = GetMaxTotalSlots();
|
||||||
for (int j = 0; j < buff_count; j++)
|
for (int buff_slot = 0; buff_slot < buff_count; buff_slot++) {
|
||||||
{
|
if (buffs[buff_slot].spellid == spell_id) {
|
||||||
if (buffs[j].spellid == spell_id)
|
BuffFadeBySlot(buff_slot, false);
|
||||||
BuffFadeBySlot(j, false);
|
recalc_bonus = true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//we tell BuffFadeBySlot not to recalc, so we can do it only once when were done
|
if (recalc_bonus) {
|
||||||
CalcBonuses();
|
CalcBonuses();
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void Mob::BuffFadeBySpellIDAndCaster(uint16 spell_id, uint16 caster_id)
|
void Mob::BuffFadeBySpellIDAndCaster(uint16 spell_id, uint16 caster_id)
|
||||||
{
|
{
|
||||||
bool recalc_bonus = false;
|
bool recalc_bonus = false;
|
||||||
auto buff_count = GetMaxTotalSlots();
|
auto buff_count = GetMaxTotalSlots();
|
||||||
for (int i = 0; i < buff_count; ++i) {
|
for (int buff_slot = 0; buff_slot < buff_count; buff_slot++) {
|
||||||
if (buffs[i].spellid == spell_id && buffs[i].casterid == caster_id) {
|
if (
|
||||||
BuffFadeBySlot(i, false);
|
buffs[buff_slot].spellid == spell_id &&
|
||||||
|
buffs[buff_slot].casterid == caster_id
|
||||||
|
) {
|
||||||
|
BuffFadeBySlot(buff_slot, false);
|
||||||
recalc_bonus = true;
|
recalc_bonus = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (recalc_bonus)
|
if (recalc_bonus) {
|
||||||
CalcBonuses();
|
CalcBonuses();
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// removes buffs containing effectid, skipping skipslot
|
void Mob::BuffFadeByEffect(int effect_id, int slot_to_skip)
|
||||||
void Mob::BuffFadeByEffect(int effect_id, int skipslot)
|
|
||||||
{
|
{
|
||||||
int i;
|
bool recalc_bonus = false;
|
||||||
|
|
||||||
int buff_count = GetMaxTotalSlots();
|
int buff_count = GetMaxTotalSlots();
|
||||||
for(i = 0; i < buff_count; i++)
|
for(int buff_slot = 0; buff_slot < buff_count; buff_slot++) {
|
||||||
{
|
auto current_spell_id = buffs[buff_slot].spellid;
|
||||||
if(buffs[i].spellid == SPELL_UNKNOWN)
|
if (
|
||||||
continue;
|
IsValidSpell(current_spell_id) &&
|
||||||
if(IsEffectInSpell(buffs[i].spellid, effect_id) && i != skipslot)
|
IsEffectInSpell(current_spell_id, effect_id) &&
|
||||||
BuffFadeBySlot(i, false);
|
buff_slot != slot_to_skip
|
||||||
|
) {
|
||||||
|
BuffFadeBySlot(buff_slot, false);
|
||||||
|
recalc_bonus = true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//we tell BuffFadeBySlot not to recalc, so we can do it only once when were done
|
if (recalc_bonus) {
|
||||||
CalcBonuses();
|
CalcBonuses();
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
bool Mob::IsAffectedByBuff(uint16 spell_id)
|
bool Mob::IsAffectedByBuff(uint16 spell_id)
|
||||||
{
|
{
|
||||||
int buff_count = GetMaxTotalSlots();
|
return FindBuff(spell_id);
|
||||||
for (int i = 0; i < buff_count; ++i)
|
|
||||||
if (buffs[i].spellid == spell_id)
|
|
||||||
return true;
|
|
||||||
|
|
||||||
return false;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
bool Mob::IsAffectedByBuffByGlobalGroup(GlobalGroup group)
|
bool Mob::IsAffectedByBuffByGlobalGroup(GlobalGroup group)
|
||||||
{
|
{
|
||||||
int buff_count = GetMaxTotalSlots();
|
int buff_count = GetMaxTotalSlots();
|
||||||
for (int i = 0; i < buff_count; ++i) {
|
for (int buff_slot = 0; buff_slot < buff_count; buff_slot++) {
|
||||||
if (buffs[i].spellid == SPELL_UNKNOWN)
|
auto current_spell_id = buffs[buff_slot].spellid;
|
||||||
continue;
|
if (
|
||||||
if (spells[buffs[i].spellid].spell_category == static_cast<int>(group))
|
IsValidSpell(current_spell_id) &&
|
||||||
|
spells[current_spell_id].spell_category == static_cast<int>(group)
|
||||||
|
) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user