[Cleanup] "equipped" not "equiped", "dual" not "duel". (#3149)

* [Cleanup] "equipped" not "equiped", "dual" not "duel".

# Notes
- These are spelled incorrectly.

* Update spdat.h

* Formatting further.

* Update api_service.cpp
This commit is contained in:
Alex King 2023-03-27 17:55:37 -04:00 committed by GitHub
parent 99f8e6cef5
commit 26c267db1b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
15 changed files with 293 additions and 296 deletions

View File

@ -504,7 +504,7 @@ enum SpellRestriction
HAS_NO_ILLUSIONS_OF_GRANDEUR_BUFF = 12519, // HAS_NO_ILLUSIONS_OF_GRANDEUR_BUFF = 12519, //
IS_HP_ABOVE_50_PCT = 16010, // IS_HP_ABOVE_50_PCT = 16010, //
IS_HP_UNDER_50_PCT = 16031, // IS_HP_UNDER_50_PCT = 16031, //
IS_OFF_HAND_EQUIPED = 27672, // You must be wielding a weapon or shield in your offhand to use this ability. IS_OFF_HAND_EQUIPPED = 27672, // You must be wielding a weapon or shield in your offhand to use this ability.
HAS_NO_PACT_OF_FATE_RECOURSE_BUFF = 29556, // This spell will not work while Pact of Fate Recourse is active. | caster restriction | HAS_NO_PACT_OF_FATE_RECOURSE_BUFF = 29556, // This spell will not work while Pact of Fate Recourse is active. | caster restriction |
HAS_NO_SHROUD_OF_PRAYER_BUFF = 32339, // Your target cannot receive another Quiet Prayer this soon. HAS_NO_SHROUD_OF_PRAYER_BUFF = 32339, // Your target cannot receive another Quiet Prayer this soon.
IS_MANA_BELOW_20_PCT = 38311, // This ability requires you to be at or below 20% of your maximum mana. IS_MANA_BELOW_20_PCT = 38311, // This ability requires you to be at or below 20% of your maximum mana.
@ -1211,7 +1211,7 @@ typedef enum {
#define SE_Double_Backstab_Front 473 // implemented - Chance to double backstab from front #define SE_Double_Backstab_Front 473 // implemented - Chance to double backstab from front
#define SE_Pet_Crit_Melee_Damage_Pct_Owner 474 // implemenetd - Critical damage mod applied to pets from owner #define SE_Pet_Crit_Melee_Damage_Pct_Owner 474 // implemenetd - Critical damage mod applied to pets from owner
#define SE_Trigger_Spell_Non_Item 475 // implemented - Trigger spell on cast only if not from item click. #define SE_Trigger_Spell_Non_Item 475 // implemented - Trigger spell on cast only if not from item click.
#define SE_Weapon_Stance 476 // implemented, @Misc, Apply a specific spell buffs automatically depending 2Hander, Shield or Duel Wield is equiped, base: spellid, base: 0=2H 1=Shield 2=DW, max: none #define SE_Weapon_Stance 476 // implemented, @Misc, Apply a specific spell buffs automatically depending 2Hander, Shield or Dual Wield is equipped, base: spellid, base: 0=2H 1=Shield 2=DW, max: none
#define SE_Hatelist_To_Top_Index 477 // Implemented - Chance to be set to top of rampage list #define SE_Hatelist_To_Top_Index 477 // Implemented - Chance to be set to top of rampage list
#define SE_Hatelist_To_Tail_Index 478 // Implemented - Chance to be set to bottom of rampage list #define SE_Hatelist_To_Tail_Index 478 // Implemented - Chance to be set to bottom of rampage list
#define SE_Ff_Value_Min 479 // implemented, @Ff, Minimum base value of a spell that can be focused, base: spells to be focused base1 value #define SE_Ff_Value_Min 479 // implemented, @Ff, Minimum base value of a spell that can be focused, base: spells to be focused base1 value

View File

@ -471,11 +471,11 @@ Json::Value ApiGetMobListDetail(EQ::Net::WebsocketServerConnection *connection,
row["has_primary_aggro"] = mob->HasPrimaryAggro(); row["has_primary_aggro"] = mob->HasPrimaryAggro();
row["has_project_illusion"] = mob->HasProjectIllusion(); row["has_project_illusion"] = mob->HasProjectIllusion();
row["has_projectile_attack"] = mob->HasProjectileAttack(); row["has_projectile_attack"] = mob->HasProjectileAttack();
row["has_shield_equiped"] = mob->HasShieldEquiped(); row["has_shield_equipped"] = mob->HasShieldEquipped();
row["has_special_abilities"] = mob->HasSpecialAbilities(); row["has_special_abilities"] = mob->HasSpecialAbilities();
row["has_tar_reflection"] = mob->HasTargetReflection(); row["has_tar_reflection"] = mob->HasTargetReflection();
row["has_temp_pets_active"] = mob->HasTempPetsActive(); row["has_temp_pets_active"] = mob->HasTempPetsActive();
row["has_two_hand_blunt_equiped"] = mob->HasTwoHandBluntEquiped(); row["has_two_hand_blunt_equipped"] = mob->HasTwoHandBluntEquipped();
row["has_two_hander_equipped"] = mob->HasTwoHanderEquipped(); row["has_two_hander_equipped"] = mob->HasTwoHanderEquipped();
row["hate_summon"] = mob->HateSummon(); row["hate_summon"] = mob->HateSummon();
row["helm_texture"] = mob->GetHelmTexture(); row["helm_texture"] = mob->GetHelmTexture();

View File

@ -592,7 +592,7 @@ bool Mob::AvoidDamage(Mob *other, DamageHitInfo &hit)
} }
// Try Shield Block OR TwoHandBluntBlockCheck // Try Shield Block OR TwoHandBluntBlockCheck
if (HasShieldEquiped() && (aabonuses.ShieldBlock || spellbonuses.ShieldBlock || itembonuses.ShieldBlock) && (InFront || bBlockFromRear)) { if (HasShieldEquipped() && (aabonuses.ShieldBlock || spellbonuses.ShieldBlock || itembonuses.ShieldBlock) && (InFront || bBlockFromRear)) {
int chance = aabonuses.ShieldBlock + spellbonuses.ShieldBlock + itembonuses.ShieldBlock; int chance = aabonuses.ShieldBlock + spellbonuses.ShieldBlock + itembonuses.ShieldBlock;
if (counter_block || counter_all) { if (counter_block || counter_all) {
float counter = (counter_block + counter_all) / 100.0f; float counter = (counter_block + counter_all) / 100.0f;
@ -604,7 +604,7 @@ bool Mob::AvoidDamage(Mob *other, DamageHitInfo &hit)
} }
} }
if (HasTwoHandBluntEquiped() && (aabonuses.TwoHandBluntBlock || spellbonuses.TwoHandBluntBlock || itembonuses.TwoHandBluntBlock) && (InFront || bBlockFromRear)) { if (HasTwoHandBluntEquipped() && (aabonuses.TwoHandBluntBlock || spellbonuses.TwoHandBluntBlock || itembonuses.TwoHandBluntBlock) && (InFront || bBlockFromRear)) {
int chance = aabonuses.TwoHandBluntBlock + itembonuses.TwoHandBluntBlock + spellbonuses.TwoHandBluntBlock; int chance = aabonuses.TwoHandBluntBlock + itembonuses.TwoHandBluntBlock + spellbonuses.TwoHandBluntBlock;
if (counter_block || counter_all) { if (counter_block || counter_all) {
float counter = (counter_block + counter_all) / 100.0f; float counter = (counter_block + counter_all) / 100.0f;
@ -874,7 +874,7 @@ int Mob::ACSum(bool skip_caps)
int ac = 0; // this should be base AC whenever shrouds come around int ac = 0; // this should be base AC whenever shrouds come around
ac += itembonuses.AC; // items + food + tribute ac += itembonuses.AC; // items + food + tribute
int shield_ac = 0; int shield_ac = 0;
if (HasShieldEquiped() && IsOfClientBot()) { if (HasShieldEquipped() && IsOfClientBot()) {
auto inst = (IsClient()) ? GetInv().GetItem(EQ::invslot::slotSecondary) : CastToBot()->GetBotItem(EQ::invslot::slotSecondary); auto inst = (IsClient()) ? GetInv().GetItem(EQ::invslot::slotSecondary) : CastToBot()->GetBotItem(EQ::invslot::slotSecondary);
if (inst) { if (inst) {
if (inst->GetItemRecommendedLevel(true) <= GetLevel()) { if (inst->GetItemRecommendedLevel(true) <= GetLevel()) {
@ -1555,7 +1555,7 @@ bool Mob::Attack(Mob* other, int Hand, bool bRiposte, bool IsStrikethrough, bool
if (Hand == EQ::invslot::slotPrimary || Hand == EQ::invslot::slotSecondary) if (Hand == EQ::invslot::slotPrimary || Hand == EQ::invslot::slotSecondary)
my_hit.base_damage = DoDamageCaps(my_hit.base_damage); my_hit.base_damage = DoDamageCaps(my_hit.base_damage);
auto shield_inc = spellbonuses.ShieldEquipDmgMod + itembonuses.ShieldEquipDmgMod + aabonuses.ShieldEquipDmgMod; auto shield_inc = spellbonuses.ShieldEquipDmgMod + itembonuses.ShieldEquipDmgMod + aabonuses.ShieldEquipDmgMod;
if (shield_inc > 0 && HasShieldEquiped() && Hand == EQ::invslot::slotPrimary) { if (shield_inc > 0 && HasShieldEquipped() && Hand == EQ::invslot::slotPrimary) {
my_hit.base_damage = my_hit.base_damage * (100 + shield_inc) / 100; my_hit.base_damage = my_hit.base_damage * (100 + shield_inc) / 100;
hate = hate * (100 + shield_inc) / 100; hate = hate * (100 + shield_inc) / 100;
} }
@ -5995,7 +5995,7 @@ void Mob::DoShieldDamageOnShielder(Mob *shield_target, int64 hit_damage_done, EQ
} }
int mitigation = shielder->GetShielderMitigation(); //Default shielder mitigates 25 pct of damage taken, this can be increased up to max 50 by equipping a shield item int mitigation = shielder->GetShielderMitigation(); //Default shielder mitigates 25 pct of damage taken, this can be increased up to max 50 by equipping a shield item
if (shielder->IsClient() && shielder->HasShieldEquiped()) { if (shielder->IsClient() && shielder->HasShieldEquipped()) {
EQ::ItemInstance* inst = shielder->CastToClient()->GetInv().GetItem(EQ::invslot::slotSecondary); EQ::ItemInstance* inst = shielder->CastToClient()->GetInv().GetItem(EQ::invslot::slotSecondary);
if (inst) { if (inst) {
const EQ::ItemData* shield = inst->GetItem(); const EQ::ItemData* shield = inst->GetItem();

View File

@ -145,10 +145,10 @@ int Mob::CalcRecommendedLevelBonus(uint8 current_level, uint8 recommended_level,
void Mob::CalcItemBonuses(StatBonuses* b) { void Mob::CalcItemBonuses(StatBonuses* b) {
ClearItemFactionBonuses(); ClearItemFactionBonuses();
SetShieldEquiped(false); SetShieldEquipped(false);
SetTwoHandBluntEquiped(false); SetTwoHandBluntEquipped(false);
SetTwoHanderEquipped(false); SetTwoHanderEquipped(false);
SetDuelWeaponsEquiped(false); SetDualWeaponsEquipped(false);
int16 i; int16 i;
@ -178,13 +178,13 @@ void Mob::CalcItemBonuses(StatBonuses* b) {
item->ItemType == EQ::item::ItemTypeShield && item->ItemType == EQ::item::ItemTypeShield &&
i == EQ::invslot::slotSecondary i == EQ::invslot::slotSecondary
) { ) {
SetShieldEquiped(true); SetShieldEquipped(true);
} else if ( } else if (
item && item &&
item->ItemType == EQ::item::ItemType2HBlunt && item->ItemType == EQ::item::ItemType2HBlunt &&
i == EQ::invslot::slotPrimary i == EQ::invslot::slotPrimary
) { ) {
SetTwoHandBluntEquiped(true); SetTwoHandBluntEquipped(true);
SetTwoHanderEquipped(true); SetTwoHanderEquipped(true);
} else if ( } else if (
item && item &&
@ -196,7 +196,7 @@ void Mob::CalcItemBonuses(StatBonuses* b) {
} }
if (CanThisClassDualWield()) { if (CanThisClassDualWield()) {
SetDuelWeaponsEquiped(true); SetDualWeaponsEquipped(true);
} }
if (IsOfClientBot()) { if (IsOfClientBot()) {

View File

@ -1112,7 +1112,7 @@ void Bot::GenerateAppearance() {
uint16 Bot::GetPrimarySkillValue() { uint16 Bot::GetPrimarySkillValue() {
EQ::skills::SkillType skill = EQ::skills::HIGHEST_SKILL; //because nullptr == 0, which is 1H Slashing, & we want it to return 0 from GetSkill EQ::skills::SkillType skill = EQ::skills::HIGHEST_SKILL; //because nullptr == 0, which is 1H Slashing, & we want it to return 0 from GetSkill
if (bool equiped = m_inv.GetItem(EQ::invslot::slotPrimary); !equiped) { if (bool equipped = m_inv.GetItem(EQ::invslot::slotPrimary); !equipped) {
skill = EQ::skills::SkillHandtoHand; skill = EQ::skills::SkillHandtoHand;
} else { } else {
uint8 type = m_inv.GetItem(EQ::invslot::slotPrimary)->GetItem()->ItemType; //is this the best way to do this? uint8 type = m_inv.GetItem(EQ::invslot::slotPrimary)->GetItem()->ItemType; //is this the best way to do this?
@ -4870,7 +4870,7 @@ int Bot::GetBaseSkillDamage(EQ::skills::SkillType skill, Mob *target)
float skill_bonus = skill_level / 10.0f; float skill_bonus = skill_level / 10.0f;
float ac_bonus = 0.0f; float ac_bonus = 0.0f;
const EQ::ItemInstance *inst = nullptr; const EQ::ItemInstance *inst = nullptr;
if (HasShieldEquiped()) if (HasShieldEquipped())
inst = GetBotItem(EQ::invslot::slotSecondary); inst = GetBotItem(EQ::invslot::slotSecondary);
else if (HasTwoHanderEquipped()) else if (HasTwoHanderEquipped())
inst = GetBotItem(EQ::invslot::slotPrimary); inst = GetBotItem(EQ::invslot::slotPrimary);

View File

@ -4323,9 +4323,9 @@ bool Client::GroupFollow(Client* inviter) {
uint16 Client::GetPrimarySkillValue() uint16 Client::GetPrimarySkillValue()
{ {
EQ::skills::SkillType skill = EQ::skills::HIGHEST_SKILL; //because nullptr == 0, which is 1H Slashing, & we want it to return 0 from GetSkill EQ::skills::SkillType skill = EQ::skills::HIGHEST_SKILL; //because nullptr == 0, which is 1H Slashing, & we want it to return 0 from GetSkill
bool equiped = m_inv.GetItem(EQ::invslot::slotPrimary); bool equipped = m_inv.GetItem(EQ::invslot::slotPrimary);
if (!equiped) if (!equipped)
skill = EQ::skills::SkillHandtoHand; skill = EQ::skills::SkillHandtoHand;
else { else {
@ -10710,11 +10710,11 @@ void Client::ApplyWeaponsStance()
FindBuff(spellbonuses.WeaponStance[WEAPON_STANCE_TYPE_2H])) { FindBuff(spellbonuses.WeaponStance[WEAPON_STANCE_TYPE_2H])) {
BuffFadeBySpellID(spellbonuses.WeaponStance[WEAPON_STANCE_TYPE_2H]); BuffFadeBySpellID(spellbonuses.WeaponStance[WEAPON_STANCE_TYPE_2H]);
} }
else if (!HasShieldEquiped() && IsBuffSpell(spellbonuses.WeaponStance[WEAPON_STANCE_TYPE_SHIELD]) && else if (!HasShieldEquipped() && IsBuffSpell(spellbonuses.WeaponStance[WEAPON_STANCE_TYPE_SHIELD]) &&
FindBuff(spellbonuses.WeaponStance[WEAPON_STANCE_TYPE_SHIELD])) { FindBuff(spellbonuses.WeaponStance[WEAPON_STANCE_TYPE_SHIELD])) {
BuffFadeBySpellID(spellbonuses.WeaponStance[WEAPON_STANCE_TYPE_SHIELD]); BuffFadeBySpellID(spellbonuses.WeaponStance[WEAPON_STANCE_TYPE_SHIELD]);
} }
else if (!HasDualWeaponsEquiped() && else if (!HasDualWeaponsEquipped() &&
IsBuffSpell(spellbonuses.WeaponStance[WEAPON_STANCE_TYPE_DUAL_WIELD]) && IsBuffSpell(spellbonuses.WeaponStance[WEAPON_STANCE_TYPE_DUAL_WIELD]) &&
FindBuff(spellbonuses.WeaponStance[WEAPON_STANCE_TYPE_DUAL_WIELD])) { FindBuff(spellbonuses.WeaponStance[WEAPON_STANCE_TYPE_DUAL_WIELD])) {
BuffFadeBySpellID(spellbonuses.WeaponStance[WEAPON_STANCE_TYPE_DUAL_WIELD]); BuffFadeBySpellID(spellbonuses.WeaponStance[WEAPON_STANCE_TYPE_DUAL_WIELD]);
@ -10726,14 +10726,14 @@ void Client::ApplyWeaponsStance()
} }
weaponstance.spellbonus_buff_spell_id = spellbonuses.WeaponStance[WEAPON_STANCE_TYPE_2H]; weaponstance.spellbonus_buff_spell_id = spellbonuses.WeaponStance[WEAPON_STANCE_TYPE_2H];
} }
else if (HasShieldEquiped() && IsBuffSpell(spellbonuses.WeaponStance[WEAPON_STANCE_TYPE_SHIELD])) { else if (HasShieldEquipped() && IsBuffSpell(spellbonuses.WeaponStance[WEAPON_STANCE_TYPE_SHIELD])) {
if (!FindBuff(spellbonuses.WeaponStance[WEAPON_STANCE_TYPE_SHIELD])) { if (!FindBuff(spellbonuses.WeaponStance[WEAPON_STANCE_TYPE_SHIELD])) {
SpellOnTarget(spellbonuses.WeaponStance[WEAPON_STANCE_TYPE_SHIELD], this); SpellOnTarget(spellbonuses.WeaponStance[WEAPON_STANCE_TYPE_SHIELD], this);
} }
weaponstance.spellbonus_buff_spell_id = spellbonuses.WeaponStance[WEAPON_STANCE_TYPE_SHIELD]; weaponstance.spellbonus_buff_spell_id = spellbonuses.WeaponStance[WEAPON_STANCE_TYPE_SHIELD];
} }
else if (HasDualWeaponsEquiped() && IsBuffSpell(spellbonuses.WeaponStance[WEAPON_STANCE_TYPE_DUAL_WIELD])) { else if (HasDualWeaponsEquipped() && IsBuffSpell(spellbonuses.WeaponStance[WEAPON_STANCE_TYPE_DUAL_WIELD])) {
if (!FindBuff(spellbonuses.WeaponStance[WEAPON_STANCE_TYPE_DUAL_WIELD])) { if (!FindBuff(spellbonuses.WeaponStance[WEAPON_STANCE_TYPE_DUAL_WIELD])) {
SpellOnTarget(spellbonuses.WeaponStance[WEAPON_STANCE_TYPE_DUAL_WIELD], this); SpellOnTarget(spellbonuses.WeaponStance[WEAPON_STANCE_TYPE_DUAL_WIELD], this);
@ -10776,11 +10776,11 @@ void Client::ApplyWeaponsStance()
FindBuff(itembonuses.WeaponStance[WEAPON_STANCE_TYPE_2H])) { FindBuff(itembonuses.WeaponStance[WEAPON_STANCE_TYPE_2H])) {
BuffFadeBySpellID(itembonuses.WeaponStance[WEAPON_STANCE_TYPE_2H]); BuffFadeBySpellID(itembonuses.WeaponStance[WEAPON_STANCE_TYPE_2H]);
} }
else if (!HasShieldEquiped() && IsBuffSpell(itembonuses.WeaponStance[WEAPON_STANCE_TYPE_SHIELD]) && else if (!HasShieldEquipped() && IsBuffSpell(itembonuses.WeaponStance[WEAPON_STANCE_TYPE_SHIELD]) &&
FindBuff(itembonuses.WeaponStance[WEAPON_STANCE_TYPE_SHIELD])) { FindBuff(itembonuses.WeaponStance[WEAPON_STANCE_TYPE_SHIELD])) {
BuffFadeBySpellID(itembonuses.WeaponStance[WEAPON_STANCE_TYPE_SHIELD]); BuffFadeBySpellID(itembonuses.WeaponStance[WEAPON_STANCE_TYPE_SHIELD]);
} }
else if (!HasDualWeaponsEquiped() && IsBuffSpell(itembonuses.WeaponStance[WEAPON_STANCE_TYPE_DUAL_WIELD]) && else if (!HasDualWeaponsEquipped() && IsBuffSpell(itembonuses.WeaponStance[WEAPON_STANCE_TYPE_DUAL_WIELD]) &&
FindBuff(itembonuses.WeaponStance[WEAPON_STANCE_TYPE_DUAL_WIELD])) { FindBuff(itembonuses.WeaponStance[WEAPON_STANCE_TYPE_DUAL_WIELD])) {
BuffFadeBySpellID(itembonuses.WeaponStance[WEAPON_STANCE_TYPE_DUAL_WIELD]); BuffFadeBySpellID(itembonuses.WeaponStance[WEAPON_STANCE_TYPE_DUAL_WIELD]);
} }
@ -10793,14 +10793,14 @@ void Client::ApplyWeaponsStance()
} }
weaponstance.itembonus_buff_spell_id = itembonuses.WeaponStance[WEAPON_STANCE_TYPE_2H]; weaponstance.itembonus_buff_spell_id = itembonuses.WeaponStance[WEAPON_STANCE_TYPE_2H];
} }
else if (HasShieldEquiped() && IsBuffSpell(itembonuses.WeaponStance[WEAPON_STANCE_TYPE_SHIELD])) { else if (HasShieldEquipped() && IsBuffSpell(itembonuses.WeaponStance[WEAPON_STANCE_TYPE_SHIELD])) {
if (!FindBuff(itembonuses.WeaponStance[WEAPON_STANCE_TYPE_SHIELD])) { if (!FindBuff(itembonuses.WeaponStance[WEAPON_STANCE_TYPE_SHIELD])) {
SpellOnTarget(itembonuses.WeaponStance[WEAPON_STANCE_TYPE_SHIELD], this); SpellOnTarget(itembonuses.WeaponStance[WEAPON_STANCE_TYPE_SHIELD], this);
} }
weaponstance.itembonus_buff_spell_id = itembonuses.WeaponStance[WEAPON_STANCE_TYPE_SHIELD]; weaponstance.itembonus_buff_spell_id = itembonuses.WeaponStance[WEAPON_STANCE_TYPE_SHIELD];
} }
else if (HasDualWeaponsEquiped() && IsBuffSpell(itembonuses.WeaponStance[WEAPON_STANCE_TYPE_DUAL_WIELD])) { else if (HasDualWeaponsEquipped() && IsBuffSpell(itembonuses.WeaponStance[WEAPON_STANCE_TYPE_DUAL_WIELD])) {
if (!FindBuff(itembonuses.WeaponStance[WEAPON_STANCE_TYPE_DUAL_WIELD])) { if (!FindBuff(itembonuses.WeaponStance[WEAPON_STANCE_TYPE_DUAL_WIELD])) {
SpellOnTarget(itembonuses.WeaponStance[WEAPON_STANCE_TYPE_DUAL_WIELD], this); SpellOnTarget(itembonuses.WeaponStance[WEAPON_STANCE_TYPE_DUAL_WIELD], this);
} }
@ -10833,12 +10833,12 @@ void Client::ApplyWeaponsStance()
BuffFadeBySpellID(aabonuses.WeaponStance[WEAPON_STANCE_TYPE_2H]); BuffFadeBySpellID(aabonuses.WeaponStance[WEAPON_STANCE_TYPE_2H]);
} }
else if (!HasShieldEquiped() && IsBuffSpell(aabonuses.WeaponStance[WEAPON_STANCE_TYPE_SHIELD]) && else if (!HasShieldEquipped() && IsBuffSpell(aabonuses.WeaponStance[WEAPON_STANCE_TYPE_SHIELD]) &&
FindBuff(aabonuses.WeaponStance[WEAPON_STANCE_TYPE_SHIELD])) { FindBuff(aabonuses.WeaponStance[WEAPON_STANCE_TYPE_SHIELD])) {
BuffFadeBySpellID(aabonuses.WeaponStance[WEAPON_STANCE_TYPE_SHIELD]); BuffFadeBySpellID(aabonuses.WeaponStance[WEAPON_STANCE_TYPE_SHIELD]);
} }
else if (!HasDualWeaponsEquiped() && IsBuffSpell(aabonuses.WeaponStance[WEAPON_STANCE_TYPE_DUAL_WIELD]) && else if (!HasDualWeaponsEquipped() && IsBuffSpell(aabonuses.WeaponStance[WEAPON_STANCE_TYPE_DUAL_WIELD]) &&
FindBuff(aabonuses.WeaponStance[WEAPON_STANCE_TYPE_DUAL_WIELD])) { FindBuff(aabonuses.WeaponStance[WEAPON_STANCE_TYPE_DUAL_WIELD])) {
BuffFadeBySpellID(aabonuses.WeaponStance[WEAPON_STANCE_TYPE_DUAL_WIELD]); BuffFadeBySpellID(aabonuses.WeaponStance[WEAPON_STANCE_TYPE_DUAL_WIELD]);
} }
@ -10851,14 +10851,14 @@ void Client::ApplyWeaponsStance()
weaponstance.aabonus_buff_spell_id = aabonuses.WeaponStance[WEAPON_STANCE_TYPE_2H]; weaponstance.aabonus_buff_spell_id = aabonuses.WeaponStance[WEAPON_STANCE_TYPE_2H];
} }
else if (HasShieldEquiped() && IsBuffSpell(aabonuses.WeaponStance[WEAPON_STANCE_TYPE_SHIELD])) { else if (HasShieldEquipped() && IsBuffSpell(aabonuses.WeaponStance[WEAPON_STANCE_TYPE_SHIELD])) {
if (!FindBuff(aabonuses.WeaponStance[WEAPON_STANCE_TYPE_SHIELD])) { if (!FindBuff(aabonuses.WeaponStance[WEAPON_STANCE_TYPE_SHIELD])) {
SpellOnTarget(aabonuses.WeaponStance[WEAPON_STANCE_TYPE_SHIELD], this); SpellOnTarget(aabonuses.WeaponStance[WEAPON_STANCE_TYPE_SHIELD], this);
} }
weaponstance.aabonus_buff_spell_id = aabonuses.WeaponStance[WEAPON_STANCE_TYPE_SHIELD]; weaponstance.aabonus_buff_spell_id = aabonuses.WeaponStance[WEAPON_STANCE_TYPE_SHIELD];
} }
else if (HasDualWeaponsEquiped() && IsBuffSpell(aabonuses.WeaponStance[WEAPON_STANCE_TYPE_DUAL_WIELD])) { else if (HasDualWeaponsEquipped() && IsBuffSpell(aabonuses.WeaponStance[WEAPON_STANCE_TYPE_DUAL_WIELD])) {
if (!FindBuff(aabonuses.WeaponStance[WEAPON_STANCE_TYPE_DUAL_WIELD])) { if (!FindBuff(aabonuses.WeaponStance[WEAPON_STANCE_TYPE_DUAL_WIELD])) {
SpellOnTarget(aabonuses.WeaponStance[WEAPON_STANCE_TYPE_DUAL_WIELD], this); SpellOnTarget(aabonuses.WeaponStance[WEAPON_STANCE_TYPE_DUAL_WIELD], this);

View File

@ -588,7 +588,7 @@ public:
//This calculates total Attack Rating to match very close to what the client should show //This calculates total Attack Rating to match very close to what the client should show
uint32 GetTotalATK(); uint32 GetTotalATK();
uint32 GetATKRating(); uint32 GetATKRating();
//This gets the skill value of the item type equiped in the Primary Slot //This gets the skill value of the item type equipped in the Primary Slot
uint16 GetPrimarySkillValue(); uint16 GetPrimarySkillValue();
bool Flurry(); bool Flurry();

View File

@ -2170,14 +2170,14 @@ bool Lua_Mob::IsTargetable() {
return self->IsTargetable(); return self->IsTargetable();
} }
bool Lua_Mob::HasShieldEquiped() { bool Lua_Mob::HasShieldEquipped() {
Lua_Safe_Call_Bool(); Lua_Safe_Call_Bool();
return self->HasShieldEquiped(); return self->HasShieldEquipped();
} }
bool Lua_Mob::HasTwoHandBluntEquiped() { bool Lua_Mob::HasTwoHandBluntEquipped() {
Lua_Safe_Call_Bool(); Lua_Safe_Call_Bool();
return self->HasTwoHandBluntEquiped(); return self->HasTwoHandBluntEquipped();
} }
bool Lua_Mob::HasTwoHanderEquipped() { bool Lua_Mob::HasTwoHanderEquipped() {
@ -3321,9 +3321,9 @@ luabind::scope lua_register_mob() {
.def("HasOwner", (bool(Lua_Mob::*)(void))&Lua_Mob::HasOwner) .def("HasOwner", (bool(Lua_Mob::*)(void))&Lua_Mob::HasOwner)
.def("HasPet", (bool(Lua_Mob::*)(void))&Lua_Mob::HasPet) .def("HasPet", (bool(Lua_Mob::*)(void))&Lua_Mob::HasPet)
.def("HasProcs", &Lua_Mob::HasProcs) .def("HasProcs", &Lua_Mob::HasProcs)
.def("HasShieldEquiped", (bool(Lua_Mob::*)(void))&Lua_Mob::HasShieldEquiped) .def("HasShieldEquipped", (bool(Lua_Mob::*)(void))&Lua_Mob::HasShieldEquipped)
.def("HasTimer", &Lua_Mob::HasTimer) .def("HasTimer", &Lua_Mob::HasTimer)
.def("HasTwoHandBluntEquiped", (bool(Lua_Mob::*)(void))&Lua_Mob::HasTwoHandBluntEquiped) .def("HasTwoHandBluntEquipped", (bool(Lua_Mob::*)(void))&Lua_Mob::HasTwoHandBluntEquipped)
.def("HasTwoHanderEquipped", (bool(Lua_Mob::*)(void))&Lua_Mob::HasTwoHanderEquipped) .def("HasTwoHanderEquipped", (bool(Lua_Mob::*)(void))&Lua_Mob::HasTwoHanderEquipped)
.def("Heal", &Lua_Mob::Heal) .def("Heal", &Lua_Mob::Heal)
.def("HealDamage", (void(Lua_Mob::*)(uint64))&Lua_Mob::HealDamage) .def("HealDamage", (void(Lua_Mob::*)(uint64))&Lua_Mob::HealDamage)

View File

@ -431,8 +431,8 @@ public:
uint8 GetNimbusEffect2(); uint8 GetNimbusEffect2();
uint8 GetNimbusEffect3(); uint8 GetNimbusEffect3();
bool IsTargetable(); bool IsTargetable();
bool HasShieldEquiped(); bool HasShieldEquipped();
bool HasTwoHandBluntEquiped(); bool HasTwoHandBluntEquipped();
bool HasTwoHanderEquipped(); bool HasTwoHanderEquipped();
uint32 GetHerosForgeModel(uint8 material_slot); uint32 GetHerosForgeModel(uint8 material_slot);
uint32 IsEliteMaterialItem(uint8 material_slot); uint32 IsEliteMaterialItem(uint8 material_slot);

View File

@ -136,6 +136,7 @@ Mob::Mob(
AI_Init(); AI_Init();
SetMoving(false); SetMoving(false);
moved = false; moved = false;
turning = false; turning = false;
m_RewindLocation = glm::vec3(); m_RewindLocation = glm::vec3();
@ -146,13 +147,16 @@ Mob::Mob(
clean_name[0] = 0; clean_name[0] = 0;
lastname[0] = 0; lastname[0] = 0;
if (in_name) { if (in_name) {
strn0cpy(name, in_name, 64); strn0cpy(name, in_name, 64);
strn0cpy(orig_name, in_name, 64); strn0cpy(orig_name, in_name, 64);
} }
if (in_lastname) { if (in_lastname) {
strn0cpy(lastname, in_lastname, 64); strn0cpy(lastname, in_lastname, 64);
} }
current_hp = in_cur_hp; current_hp = in_cur_hp;
max_hp = in_max_hp; max_hp = in_max_hp;
base_hp = in_max_hp; base_hp = in_max_hp;
@ -185,8 +189,7 @@ Mob::Mob(
fearspeed = 0.625f; fearspeed = 0.625f;
base_fearspeed = 25; base_fearspeed = 25;
// npcs // npcs
} } else {
else {
base_walkspeed = base_runspeed * 100 / 265; base_walkspeed = base_runspeed * 100 / 265;
walkspeed = ((float) base_walkspeed) * 0.025f; walkspeed = ((float) base_walkspeed) * 0.025f;
base_fearspeed = base_runspeed * 100 / 127; base_fearspeed = base_runspeed * 100 / 127;
@ -200,7 +203,6 @@ Mob::Mob(
m_PlayerState = 0; m_PlayerState = 0;
// sanity check // sanity check
if (runspeed < 0 || runspeed > 20) { if (runspeed < 0 || runspeed > 20) {
runspeed = 1.25f; runspeed = 1.25f;
@ -235,10 +237,10 @@ Mob::Mob(
slow_mitigation = 0; slow_mitigation = 0;
findable = false; findable = false;
trackable = true; trackable = true;
has_shieldequiped = false; has_shield_equipped = false;
has_twohandbluntequiped = false; has_two_hand_blunt_equipped = false;
has_twohanderequipped = false; has_two_hander_equipped = false;
has_duelweaponsequiped = false; has_dual_weapons_equipped = false;
can_facestab = false; can_facestab = false;
has_numhits = false; has_numhits = false;
has_MGB = false; has_MGB = false;
@ -246,12 +248,7 @@ Mob::Mob(
SpellPowerDistanceMod = 0; SpellPowerDistanceMod = 0;
last_los_check = false; last_los_check = false;
if (in_aa_title > 0) { aa_title = in_aa_title > 0 ? in_aa_title : 0xFF;
aa_title = in_aa_title;
}
else {
aa_title = 0xFF;
}
AC = in_ac; AC = in_ac;
ATK = in_atk; ATK = in_atk;

View File

@ -484,19 +484,19 @@ public:
void TempName(const char *newname = nullptr); void TempName(const char *newname = nullptr);
void SetTargetable(bool on); void SetTargetable(bool on);
bool IsTargetable() const { return m_targetable; } bool IsTargetable() const { return m_targetable; }
bool HasShieldEquiped() const { return has_shieldequiped; } bool HasShieldEquipped() const { return has_shield_equipped; }
inline void SetShieldEquiped(bool val) { has_shieldequiped = val; } inline void SetShieldEquipped(bool val) { has_shield_equipped = val; }
bool HasTwoHandBluntEquiped() const { return has_twohandbluntequiped; } bool HasTwoHandBluntEquipped() const { return has_two_hand_blunt_equipped; }
inline void SetTwoHandBluntEquiped(bool val) { has_twohandbluntequiped = val; } inline void SetTwoHandBluntEquipped(bool val) { has_two_hand_blunt_equipped = val; }
bool HasTwoHanderEquipped() { return has_twohanderequipped; } bool HasTwoHanderEquipped() { return has_two_hander_equipped; }
void SetTwoHanderEquipped(bool val) { has_twohanderequipped = val; } void SetTwoHanderEquipped(bool val) { has_two_hander_equipped = val; }
bool HasDualWeaponsEquiped() const { return has_duelweaponsequiped; } bool HasDualWeaponsEquipped() const { return has_dual_weapons_equipped; }
bool HasBowEquipped() const { return has_bowequipped; } bool HasBowEquipped() const { return has_bowequipped; }
void SetBowEquipped(bool val) { has_bowequipped = val; } void SetBowEquipped(bool val) { has_bowequipped = val; }
bool HasArrowEquipped() const { return has_arrowequipped; } bool HasArrowEquipped() const { return has_arrowequipped; }
void SetArrowEquipped(bool val) { has_arrowequipped = val; } void SetArrowEquipped(bool val) { has_arrowequipped = val; }
bool HasBowAndArrowEquipped() const { return HasBowEquipped() && HasArrowEquipped(); } bool HasBowAndArrowEquipped() const { return HasBowEquipped() && HasArrowEquipped(); }
inline void SetDuelWeaponsEquiped(bool val) { has_duelweaponsequiped = val; } inline void SetDualWeaponsEquipped(bool val) { has_dual_weapons_equipped = val; }
bool CanFacestab() { return can_facestab; } bool CanFacestab() { return can_facestab; }
void SetFacestab(bool val) { can_facestab = val; } void SetFacestab(bool val) { can_facestab = val; }
virtual uint8 ConvertItemTypeToSkillID(uint8 item_type); virtual uint8 ConvertItemTypeToSkillID(uint8 item_type);
@ -1699,10 +1699,10 @@ protected:
bool silenced; bool silenced;
bool amnesiad; bool amnesiad;
bool offhand; bool offhand;
bool has_shieldequiped; bool has_shield_equipped;
bool has_twohandbluntequiped; bool has_two_hand_blunt_equipped;
bool has_twohanderequipped; bool has_two_hander_equipped;
bool has_duelweaponsequiped; bool has_dual_weapons_equipped;
bool has_bowequipped = false; bool has_bowequipped = false;
bool has_arrowequipped = false; bool has_arrowequipped = false;
bool use_double_melee_round_dmg_bonus; bool use_double_melee_round_dmg_bonus;

View File

@ -2273,14 +2273,14 @@ bool Perl_Mob_IsTargetable(Mob* self) // @categories Stats and Attributes
return self->IsTargetable(); return self->IsTargetable();
} }
bool Perl_Mob_HasShieldEquiped(Mob* self) // @categories Stats and Attributes bool Perl_Mob_HasShieldEquipped(Mob* self) // @categories Stats and Attributes
{ {
return self->HasShieldEquiped(); return self->HasShieldEquipped();
} }
bool Perl_Mob_HasTwoHandBluntEquiped(Mob* self) // @categories Stats and Attributes bool Perl_Mob_HasTwoHandBluntEquipped(Mob* self) // @categories Stats and Attributes
{ {
return self->HasTwoHandBluntEquiped(); return self->HasTwoHandBluntEquipped();
} }
bool Perl_Mob_HasTwoHanderEquipped(Mob* self) // @categories Stats and Attributes bool Perl_Mob_HasTwoHanderEquipped(Mob* self) // @categories Stats and Attributes
@ -3257,9 +3257,9 @@ void perl_register_mob()
package.add("HasOwner", &Perl_Mob_HasOwner); package.add("HasOwner", &Perl_Mob_HasOwner);
package.add("HasPet", &Perl_Mob_HasPet); package.add("HasPet", &Perl_Mob_HasPet);
package.add("HasProcs", &Perl_Mob_HasProcs); package.add("HasProcs", &Perl_Mob_HasProcs);
package.add("HasShieldEquiped", &Perl_Mob_HasShieldEquiped); package.add("HasShieldEquipped", &Perl_Mob_HasShieldEquipped);
package.add("HasTimer", &Perl_Mob_HasTimer); package.add("HasTimer", &Perl_Mob_HasTimer);
package.add("HasTwoHandBluntEquiped", &Perl_Mob_HasTwoHandBluntEquiped); package.add("HasTwoHandBluntEquipped", &Perl_Mob_HasTwoHandBluntEquipped);
package.add("HasTwoHanderEquipped", &Perl_Mob_HasTwoHanderEquipped); package.add("HasTwoHanderEquipped", &Perl_Mob_HasTwoHanderEquipped);
package.add("HateSummon", &Perl_Mob_HateSummon); package.add("HateSummon", &Perl_Mob_HateSummon);
package.add("Heal", &Perl_Mob_Heal); package.add("Heal", &Perl_Mob_Heal);

View File

@ -133,7 +133,7 @@ int Mob::GetBaseSkillDamage(EQ::skills::SkillType skill, Mob *target)
float ac_bonus = 0.0f; float ac_bonus = 0.0f;
const EQ::ItemInstance *inst = nullptr; const EQ::ItemInstance *inst = nullptr;
if (IsClient()) { if (IsClient()) {
if (HasShieldEquiped()) { if (HasShieldEquipped()) {
inst = CastToClient()->GetInv().GetItem(EQ::invslot::slotSecondary); inst = CastToClient()->GetInv().GetItem(EQ::invslot::slotSecondary);
} else if (HasTwoHanderEquipped()) { } else if (HasTwoHanderEquipped()) {
inst = CastToClient()->GetInv().GetItem(EQ::invslot::slotPrimary); inst = CastToClient()->GetInv().GetItem(EQ::invslot::slotPrimary);

View File

@ -8075,8 +8075,8 @@ bool Mob::PassCastRestriction(int value)
return true; return true;
break; break;
case IS_OFF_HAND_EQUIPED: case IS_OFF_HAND_EQUIPPED:
if (HasShieldEquiped() || CanThisClassDualWield()) if (HasShieldEquipped() || CanThisClassDualWield())
return true; return true;
break; break;
@ -9284,7 +9284,7 @@ void Mob::SendCastRestrictionMessage(int requirement_id, bool target_requirement
case IS_HP_UNDER_50_PCT: case IS_HP_UNDER_50_PCT:
Message(Chat::Red, fmt::format("{} This target must be at oe below 50 pct of its maximum hit points.", msg).c_str()); Message(Chat::Red, fmt::format("{} This target must be at oe below 50 pct of its maximum hit points.", msg).c_str());
break; break;
case IS_OFF_HAND_EQUIPED: case IS_OFF_HAND_EQUIPPED:
Message(Chat::Red, fmt::format("{} You must be wielding a weapon or shield in your offhand to use this ability.", msg).c_str()); Message(Chat::Red, fmt::format("{} You must be wielding a weapon or shield in your offhand to use this ability.", msg).c_str());
break; break;
case HAS_NO_PACT_OF_FATE_RECOURSE_BUFF: case HAS_NO_PACT_OF_FATE_RECOURSE_BUFF:

View File

@ -920,7 +920,7 @@ int64 Mob::TuneClientAttack(Mob* other, bool no_avoid, bool no_hit_chance, int h
if (Hand == EQ::invslot::slotPrimary || Hand == EQ::invslot::slotSecondary) if (Hand == EQ::invslot::slotPrimary || Hand == EQ::invslot::slotSecondary)
my_hit.base_damage = CastToClient()->DoDamageCaps(my_hit.base_damage); my_hit.base_damage = CastToClient()->DoDamageCaps(my_hit.base_damage);
auto shield_inc = spellbonuses.ShieldEquipDmgMod + itembonuses.ShieldEquipDmgMod + aabonuses.ShieldEquipDmgMod; auto shield_inc = spellbonuses.ShieldEquipDmgMod + itembonuses.ShieldEquipDmgMod + aabonuses.ShieldEquipDmgMod;
if (shield_inc > 0 && HasShieldEquiped() && Hand == EQ::invslot::slotPrimary) { if (shield_inc > 0 && HasShieldEquipped() && Hand == EQ::invslot::slotPrimary) {
my_hit.base_damage = my_hit.base_damage * (100 + shield_inc) / 100; my_hit.base_damage = my_hit.base_damage * (100 + shield_inc) / 100;
hate = hate * (100 + shield_inc) / 100; hate = hate * (100 + shield_inc) / 100;
} }
@ -1040,7 +1040,7 @@ int64 Mob::TuneACSum(bool skip_caps, int ac_override, int add_ac)
} }
int shield_ac = 0; int shield_ac = 0;
if (HasShieldEquiped() && IsOfClientBot()) { if (HasShieldEquipped() && IsOfClientBot()) {
auto inst = (IsClient()) ? GetInv().GetItem(EQ::invslot::slotSecondary) : CastToBot()->GetBotItem(EQ::invslot::slotSecondary); auto inst = (IsClient()) ? GetInv().GetItem(EQ::invslot::slotSecondary) : CastToBot()->GetBotItem(EQ::invslot::slotSecondary);
if (inst) { if (inst) {
if (inst->GetItemRecommendedLevel(true) <= GetLevel()) { if (inst->GetItemRecommendedLevel(true) <= GetLevel()) {