mirror of
https://github.com/EQEmu/Server.git
synced 2025-12-13 06:21:28 +00:00
commit
f15ba46c24
24
zone/mob.cpp
24
zone/mob.cpp
@ -404,10 +404,11 @@ Mob::Mob(const char* in_name,
|
||||
pStandingPetOrder = SPO_Follow;
|
||||
pseudo_rooted = false;
|
||||
|
||||
see_invis = in_see_invis;
|
||||
see_invis_undead = in_see_invis_undead != 0;
|
||||
see_hide = in_see_hide != 0;
|
||||
see_improved_hide = in_see_improved_hide != 0;
|
||||
see_invis = GetSeeInvisible(in_see_invis);
|
||||
see_invis_undead = GetSeeInvisible(in_see_invis_undead);
|
||||
see_hide = GetSeeInvisible(in_see_hide);
|
||||
see_improved_hide = GetSeeInvisible(in_see_improved_hide);
|
||||
|
||||
qglobal = in_qglobal != 0;
|
||||
|
||||
// Bind wound
|
||||
@ -5679,6 +5680,21 @@ float Mob::HeadingAngleToMob(float other_x, float other_y)
|
||||
return (90.0f - angle + 270.0f) * 511.5f * 0.0027777778f;
|
||||
}
|
||||
|
||||
bool Mob::GetSeeInvisible(uint8 see_invis)
|
||||
{
|
||||
if(see_invis > 0)
|
||||
{
|
||||
if(see_invis == 1)
|
||||
return true;
|
||||
else
|
||||
{
|
||||
if (zone->random.Int(0, 99) < see_invis)
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
int32 Mob::GetSpellStat(uint32 spell_id, const char *identifier, uint8 slot)
|
||||
{
|
||||
if (!IsValidSpell(spell_id))
|
||||
|
||||
@ -256,6 +256,7 @@ public:
|
||||
inline bool SeeInvisibleUndead() const { return see_invis_undead; }
|
||||
inline bool SeeHide() const { return see_hide; }
|
||||
inline bool SeeImprovedHide() const { return see_improved_hide; }
|
||||
inline bool GetSeeInvisible(uint8 see_invis);
|
||||
bool IsInvisible(Mob* other = 0) const;
|
||||
void SetInvisible(uint8 state);
|
||||
EQEmu::skills::SkillType AttackAnimation(int Hand, const EQEmu::ItemInstance* weapon, EQEmu::skills::SkillType skillinuse = EQEmu::skills::Skill1HBlunt);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user