mirror of
https://github.com/EQEmu/Server.git
synced 2025-12-13 23:01:30 +00:00
[Code] Add IsCloseToBanker method (#4462)
* [Code] Add IsCloseToBanker method * Update mob.cpp
This commit is contained in:
parent
453106439f
commit
a91e03fa43
14
zone/mob.cpp
14
zone/mob.cpp
@ -5491,7 +5491,7 @@ int Mob::GetHaste()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
h += spellbonuses.hastetype3;
|
h += spellbonuses.hastetype3;
|
||||||
}
|
}
|
||||||
|
|
||||||
h += extra_haste; //GM granted haste.
|
h += extra_haste; //GM granted haste.
|
||||||
@ -8611,3 +8611,15 @@ void Mob::SetExtraHaste(int haste, bool need_to_save)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool Mob::IsCloseToBanker()
|
||||||
|
{
|
||||||
|
for (auto &e: entity_list.GetCloseMobList(this)) {
|
||||||
|
auto mob = e.second;
|
||||||
|
if (mob && mob->IsNPC() && mob->GetClass() == Class::Banker) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|||||||
@ -1477,6 +1477,8 @@ public:
|
|||||||
|
|
||||||
DataBucketKey GetScopedBucketKeys();
|
DataBucketKey GetScopedBucketKeys();
|
||||||
|
|
||||||
|
bool IsCloseToBanker();
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
void CommonDamage(Mob* other, int64 &damage, const uint16 spell_id, const EQ::skills::SkillType attack_skill, bool &avoidable, const int8 buffslot, const bool iBuffTic, eSpecialAttacks specal = eSpecialAttacks::None);
|
void CommonDamage(Mob* other, int64 &damage, const uint16 spell_id, const EQ::skills::SkillType attack_skill, bool &avoidable, const int8 buffslot, const bool iBuffTic, eSpecialAttacks specal = eSpecialAttacks::None);
|
||||||
static uint16 GetProcID(uint16 spell_id, uint8 effect_index);
|
static uint16 GetProcID(uint16 spell_id, uint8 effect_index);
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user