mirror of
https://github.com/EQEmu/Server.git
synced 2025-12-14 11:31:30 +00:00
Support for spells_new field 'viral_range'
This commit is contained in:
parent
5afd6b8628
commit
adb8175654
@ -4612,10 +4612,13 @@ Client *EntityList::FindCorpseDragger(uint16 CorpseID)
|
|||||||
return nullptr;
|
return nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
Mob *EntityList::GetTargetForVirus(Mob *spreader)
|
Mob *EntityList::GetTargetForVirus(Mob *spreader, int range)
|
||||||
{
|
{
|
||||||
int max_spread_range = RuleI(Spells, VirusSpreadDistance);
|
int max_spread_range = RuleI(Spells, VirusSpreadDistance);
|
||||||
|
|
||||||
|
if (range)
|
||||||
|
max_spread_range = range;
|
||||||
|
|
||||||
std::vector<Mob *> TargetsInRange;
|
std::vector<Mob *> TargetsInRange;
|
||||||
|
|
||||||
auto it = mob_list.begin();
|
auto it = mob_list.begin();
|
||||||
|
|||||||
@ -134,7 +134,7 @@ public:
|
|||||||
Mob *GetMob(const char* name);
|
Mob *GetMob(const char* name);
|
||||||
Mob *GetMobByNpcTypeID(uint32 get_id);
|
Mob *GetMobByNpcTypeID(uint32 get_id);
|
||||||
bool IsMobSpawnedByNpcTypeID(uint32 get_id);
|
bool IsMobSpawnedByNpcTypeID(uint32 get_id);
|
||||||
Mob *GetTargetForVirus(Mob* spreader);
|
Mob *GetTargetForVirus(Mob* spreader, int range);
|
||||||
inline NPC *GetNPCByID(uint16 id)
|
inline NPC *GetNPCByID(uint16 id)
|
||||||
{ return npc_list.count(id) ? npc_list.at(id) : nullptr; }
|
{ return npc_list.count(id) ? npc_list.at(id) : nullptr; }
|
||||||
NPC *GetNPCByNPCTypeID(uint32 npc_id);
|
NPC *GetNPCByNPCTypeID(uint32 npc_id);
|
||||||
|
|||||||
@ -4349,7 +4349,7 @@ void Mob::SpreadVirus(uint16 spell_id, uint16 casterID)
|
|||||||
// Only spread in zones without perm buffs
|
// Only spread in zones without perm buffs
|
||||||
if(!zone->BuffTimersSuspended()) {
|
if(!zone->BuffTimersSuspended()) {
|
||||||
for(int i = 0; i < num_targs; i++) {
|
for(int i = 0; i < num_targs; i++) {
|
||||||
target = entity_list.GetTargetForVirus(this);
|
target = entity_list.GetTargetForVirus(this, spells[spell_id].viral_range);
|
||||||
if(target) {
|
if(target) {
|
||||||
// Only spreads to the uninfected
|
// Only spreads to the uninfected
|
||||||
if(!target->FindBuff(spell_id)) {
|
if(!target->FindBuff(spell_id)) {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user