mirror of
https://github.com/EQEmu/Server.git
synced 2026-06-26 11:27:17 +00:00
Fix casting for GetIllusionBlock checks
This commit is contained in:
+1
-1
@@ -647,7 +647,7 @@ public:
|
|||||||
uint8 GetUltimateSpellTypeMinThreshold(uint16 spell_type, Mob* tar);
|
uint8 GetUltimateSpellTypeMinThreshold(uint16 spell_type, Mob* tar);
|
||||||
uint8 GetUltimateSpellTypeMaxThreshold(uint16 spell_type, Mob* tar);
|
uint8 GetUltimateSpellTypeMaxThreshold(uint16 spell_type, Mob* tar);
|
||||||
void SetIllusionBlock(bool value) { _illusionBlock = value; }
|
void SetIllusionBlock(bool value) { _illusionBlock = value; }
|
||||||
bool GetIllusionBlock() const { return _illusionBlock; }
|
bool GetIllusionBlock() const override { return _illusionBlock; }
|
||||||
bool GetShowHelm() const { return _showHelm; }
|
bool GetShowHelm() const { return _showHelm; }
|
||||||
void SetShowHelm(bool show_helm) { _showHelm = show_helm; }
|
void SetShowHelm(bool show_helm) { _showHelm = show_helm; }
|
||||||
bool GetBehindMob() const { return _behindMobStatus; }
|
bool GetBehindMob() const { return _behindMobStatus; }
|
||||||
|
|||||||
+1
-1
@@ -2299,7 +2299,7 @@ public:
|
|||||||
void SetSpellTypeRecastTimer(uint16 spell_type, uint32 recast_time) { m_bot_spell_settings[spell_type].recast_timer.Start(recast_time); }
|
void SetSpellTypeRecastTimer(uint16 spell_type, uint32 recast_time) { m_bot_spell_settings[spell_type].recast_timer.Start(recast_time); }
|
||||||
|
|
||||||
void SetIllusionBlock(bool value) { _illusionBlock = value; }
|
void SetIllusionBlock(bool value) { _illusionBlock = value; }
|
||||||
bool GetIllusionBlock() const { return _illusionBlock; }
|
bool GetIllusionBlock() const override { return _illusionBlock; }
|
||||||
|
|
||||||
private:
|
private:
|
||||||
bool bot_owner_options[_booCount];
|
bool bot_owner_options[_booCount];
|
||||||
|
|||||||
@@ -514,6 +514,7 @@ public:
|
|||||||
void ApplySpellBuff(int spell_id, int duration = 0, int level_override = -1);
|
void ApplySpellBuff(int spell_id, int duration = 0, int level_override = -1);
|
||||||
int GetBuffStatValueBySpell(int32 spell_id, const char* stat_identifier);
|
int GetBuffStatValueBySpell(int32 spell_id, const char* stat_identifier);
|
||||||
int GetBuffStatValueBySlot(uint8 slot, const char* stat_identifier);
|
int GetBuffStatValueBySlot(uint8 slot, const char* stat_identifier);
|
||||||
|
virtual bool GetIllusionBlock() const { return false; }
|
||||||
|
|
||||||
//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; }
|
||||||
|
|||||||
@@ -1481,7 +1481,7 @@ bool Mob::SpellEffect(Mob* caster, uint16 spell_id, float partial, int level_ove
|
|||||||
snprintf(effect_desc, _EDLEN, "Illusion: race %d", effect_value);
|
snprintf(effect_desc, _EDLEN, "Illusion: race %d", effect_value);
|
||||||
#endif
|
#endif
|
||||||
if (caster && caster->IsOfClientBot()) {
|
if (caster && caster->IsOfClientBot()) {
|
||||||
auto target = IsClient() ? CastToClient() : CastToBot();
|
Mob* target = IsClient() ? static_cast<Mob*>(CastToClient()) : static_cast<Mob*>(CastToBot());
|
||||||
|
|
||||||
if (target && target->GetIllusionBlock()) {
|
if (target && target->GetIllusionBlock()) {
|
||||||
break;
|
break;
|
||||||
@@ -1498,7 +1498,7 @@ bool Mob::SpellEffect(Mob* caster, uint16 spell_id, float partial, int level_ove
|
|||||||
snprintf(effect_desc, _EDLEN, "Illusion Copy");
|
snprintf(effect_desc, _EDLEN, "Illusion Copy");
|
||||||
#endif
|
#endif
|
||||||
if (caster && caster->IsOfClientBot()) {
|
if (caster && caster->IsOfClientBot()) {
|
||||||
auto target = IsClient() ? CastToClient() : CastToBot();
|
Mob* target = IsClient() ? static_cast<Mob*>(CastToClient()) : static_cast<Mob*>(CastToBot());
|
||||||
|
|
||||||
if (target && target->GetIllusionBlock()) {
|
if (target && target->GetIllusionBlock()) {
|
||||||
break;
|
break;
|
||||||
|
|||||||
Reference in New Issue
Block a user