mirror of
https://github.com/EQEmu/Server.git
synced 2026-05-16 18:52:22 +00:00
[Spells] Rework of Virus Effect code (#1593)
* start of rework * functional * virus updates * Update npc.cpp * updates * updates * update v2 * pre remove old code * removed old code1 * remove debugs * description * Update spell_effects.cpp * changed function name * remove unused var * merge error fix * fix formating issue * Update spdat.cpp * Update spell_effects.cpp * Convert virus entity range code to use vectors and GetCloseMobList * Formatting [skip ci] Co-authored-by: Akkadius <akkadius1@gmail.com>
This commit is contained in:
@@ -1572,3 +1572,26 @@ int GetSpellStatValue(uint32 spell_id, const char* stat_identifier, uint8 slot)
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
bool IsVirusSpell(int32 spell_id)
|
||||
{
|
||||
if (GetViralMinSpreadTime(spell_id) && GetViralMaxSpreadTime(spell_id) && GetViralSpreadRange(spell_id)){
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
int32 GetViralMinSpreadTime(int32 spell_id)
|
||||
{
|
||||
return spells[spell_id].viral_targets;
|
||||
}
|
||||
|
||||
int32 GetViralMaxSpreadTime(int32 spell_id)
|
||||
{
|
||||
return spells[spell_id].viral_timer;
|
||||
}
|
||||
|
||||
int32 GetViralSpreadRange(int32 spell_id)
|
||||
{
|
||||
return spells[spell_id].viral_range;
|
||||
}
|
||||
|
||||
+6
-2
@@ -1342,8 +1342,8 @@ struct SPDat_Spell_Struct
|
||||
/* 188 */ //int npc_usefulness; // -- NPC_USEFULNESS
|
||||
/* 189 */ int MinResist; // -- MIN_RESIST
|
||||
/* 190 */ int MaxResist; // -- MAX_RESIST
|
||||
/* 191 */ uint8 viral_targets; // -- MIN_SPREAD_TIME
|
||||
/* 192 */ uint8 viral_timer; // -- MAX_SPREAD_TIME
|
||||
/* 191 */ int viral_targets; // -- MIN_SPREAD_TIME
|
||||
/* 192 */ int viral_timer; // -- MAX_SPREAD_TIME
|
||||
/* 193 */ int NimbusEffect; // -- DURATION_PARTICLE_EFFECT
|
||||
/* 194 */ float directional_start; //Cone Start Angle: -- CONE_START_ANGLE
|
||||
/* 195 */ float directional_end; // Cone End Angle: -- CONE_END_ANGLE
|
||||
@@ -1509,6 +1509,10 @@ bool IsCastWhileInvis(uint16 spell_id);
|
||||
bool IsEffectIgnoredInStacking(int spa);
|
||||
bool IsFocusLimit(int spa);
|
||||
bool SpellRequiresTarget(int targettype);
|
||||
bool IsVirusSpell(int32 spell_id);
|
||||
int GetViralMinSpreadTime(int32 spell_id);
|
||||
int GetViralMaxSpreadTime(int32 spell_id);
|
||||
int GetViralSpreadRange(int32 spell_id);
|
||||
bool IsInstrumentModAppliedToSpellEffect(int32 spell_id, int effect);
|
||||
|
||||
int CalcPetHp(int levelb, int classb, int STA = 75);
|
||||
|
||||
Reference in New Issue
Block a user