[Spells] Invisibility updates and rework (#1991)

* updates pre merge

* update

* Update spell_effects.cpp

* Update mob.h

* test

* test

* updates

* updates

* save

* update

* working solid

* animal and undead start

* progress

* updates

* rename

* set invis appearance on bonus

* remove fade buff state check

* update IsViisble check

* optimizing

* don't break bots

* debug remover

* Update ruletypes.h

* perl adds

* Update client_packet.cpp

* update

* done

* remove debugs

* Update client_packet.cpp

* update

* [Spells] Invisibility updates and rework

lua support

* [Spells] Invisibility updates and rework

lua
This commit is contained in:
KayenEQ
2022-02-15 00:18:02 -05:00
committed by GitHub
parent 51c8771bd2
commit b938e6223c
18 changed files with 369 additions and 188 deletions
+36 -19
View File
@@ -147,8 +147,8 @@ public:
uint32 in_drakkin_details,
EQ::TintProfile in_armor_tint,
uint8 in_aa_title,
uint8 in_see_invis, // see through invis
uint8 in_see_invis_undead, // see through invis vs. undead
uint16 in_see_invis, // see through invis
uint16 in_see_invis_undead, // see through invis vs. undead
uint8 in_see_hide,
uint8 in_see_improved_hide,
int32 in_hp_regen,
@@ -226,10 +226,6 @@ public:
virtual inline bool IsBerserk() { return false; } // only clients
void RogueEvade(Mob *other);
void CommonOutgoingHitSuccess(Mob *defender, DamageHitInfo &hit, ExtraAttackOptions *opts = nullptr);
void BreakInvisibleSpells();
virtual void CancelSneakHide();
void CommonBreakInvisible();
void CommonBreakInvisibleFromCombat();
bool HasDied();
virtual bool CheckDualWield();
void DoMainHandAttackRounds(Mob *target, ExtraAttackOptions *opts = nullptr);
@@ -246,6 +242,39 @@ public:
return;
}
//Invisible
bool IsInvisible(Mob* other = 0) const;
void SetInvisible(uint8 state, bool set_on_bonus_calc = false);
void CalcSeeInvisibleLevel();
void CalcInvisibleLevel();
void ZeroInvisibleVars(uint8 invisible_type);
inline uint8 GetSeeInvisibleLevelFromNPCStat(uint16 in_see_invis);
void BreakInvisibleSpells();
virtual void CancelSneakHide();
void CommonBreakInvisible();
void CommonBreakInvisibleFromCombat();
inline uint8 GetInvisibleLevel() const { return invisible; }
inline uint8 GetInvisibleUndeadLevel() const { return invisible_undead; }
inline bool SeeHide() const { return see_hide; }
inline bool SeeImprovedHide() const { return see_improved_hide; }
inline uint8 SeeInvisibleUndead() const { return see_invis_undead; }
inline uint8 SeeInvisible() const { return see_invis; }
inline void SetInnateSeeInvisible(uint8 val) { innate_see_invis = val; }
inline void SetSeeInvisibleUndead(uint8 val) { see_invis_undead = val; }
uint32 tmHidden; // timestamp of hide, only valid while hidden == true
uint8 invisible, nobuff_invisible, invisible_undead, invisible_animals;
uint8 see_invis, innate_see_invis, see_invis_undead; //TODO: do we need a see_invis_animal ?
bool sneaking, hidden, improved_hidden;
bool see_hide, see_improved_hide;
/**
************************************************
* Appearance
@@ -254,16 +283,8 @@ public:
EQ::InternalTextureProfile mob_texture_profile = {};
bool IsInvisible(Mob* other = 0) const;
EQ::skills::SkillType AttackAnimation(int Hand, const EQ::ItemInstance* weapon, EQ::skills::SkillType skillinuse = EQ::skills::Skill1HBlunt);
inline bool GetSeeInvisible(uint8 see_invis);
inline bool SeeHide() const { return see_hide; }
inline bool SeeImprovedHide() const { return see_improved_hide; }
inline bool SeeInvisibleUndead() const { return see_invis_undead; }
inline uint8 SeeInvisible() const { return see_invis; }
int32 GetTextureProfileMaterial(uint8 material_slot) const;
int32 GetTextureProfileColor(uint8 material_slot) const;
int32 GetTextureProfileHeroForgeModel(uint8 material_slot) const;
@@ -282,7 +303,6 @@ public:
void SendLevelAppearance();
void SendStunAppearance();
void SendTargetable(bool on, Client *specific_target = nullptr);
void SetInvisible(uint8 state);
void SetMobTextureProfile(uint8 material_slot, uint16 texture, uint32 color = 0, uint32 hero_forge_model = 0);
//Spell
@@ -974,10 +994,7 @@ public:
inline const bodyType GetOrigBodyType() const { return orig_bodytype; }
void SetBodyType(bodyType new_body, bool overwrite_orig);
uint32 tmHidden; // timestamp of hide, only valid while hidden == true
uint8 invisible, see_invis;
bool invulnerable, invisible_undead, invisible_animals, sneaking, hidden, improved_hidden;
bool see_invis_undead, see_hide, see_improved_hide;
bool invulnerable;
bool qglobal;
virtual void SetAttackTimer();