Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,15 @@ PoisonedBehavior::~PoisonedBehavior( void )
void PoisonedBehavior::onDamage( DamageInfo *damageInfo )
{
if( damageInfo->in.m_damageType == DAMAGE_POISON )
{
#if !RETAIL_COMPATIBLE_CRC
// TheSuperHackers @bugfix bobtista 11/17/2025 Ignore damage with INVALID_ID source to prevent infinite loop from DoT
if( damageInfo->in.m_sourceID != INVALID_ID )
startPoisonedEffects( damageInfo );
#else
startPoisonedEffects( damageInfo );
#endif
}
}

// ------------------------------------------------------------------------------------------------
Expand Down Expand Up @@ -118,8 +126,14 @@ UpdateSleepTime PoisonedBehavior::update()
// If it is time to do damage, then do it and reset the damage timer
DamageInfo damage;
damage.in.m_amount = m_poisonDamageAmount;
#if !RETAIL_COMPATIBLE_CRC
// TheSuperHackers @bugfix bobtista 11/17/2025 Use INVALID_ID to prevent infinite loop while allowing poison resistance to work
damage.in.m_sourceID = INVALID_ID;
damage.in.m_damageType = DAMAGE_POISON;
#else
damage.in.m_sourceID = m_poisonSource;
damage.in.m_damageType = DAMAGE_UNRESISTABLE; // Not poison, as that will infect us again
#endif
damage.in.m_deathType = m_deathType;
getObject()->attemptDamage( &damage );

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,15 @@ PoisonedBehavior::~PoisonedBehavior( void )
void PoisonedBehavior::onDamage( DamageInfo *damageInfo )
{
if( damageInfo->in.m_damageType == DAMAGE_POISON )
{
#if !RETAIL_COMPATIBLE_CRC
// TheSuperHackers @bugfix bobtista 11/17/2025 Ignore damage with INVALID_ID source to prevent infinite loop from DoT
if( damageInfo->in.m_sourceID != INVALID_ID )
startPoisonedEffects( damageInfo );
#else
startPoisonedEffects( damageInfo );
#endif
}
}

// ------------------------------------------------------------------------------------------------
Expand Down Expand Up @@ -118,9 +126,16 @@ UpdateSleepTime PoisonedBehavior::update()
// If it is time to do damage, then do it and reset the damage timer
DamageInfo damage;
damage.in.m_amount = m_poisonDamageAmount;
#if !RETAIL_COMPATIBLE_CRC
// TheSuperHackers @bugfix bobtista 11/17/2025 Use INVALID_ID to prevent infinite loop while allowing poison resistance to work
damage.in.m_sourceID = INVALID_ID;
damage.in.m_damageType = DAMAGE_POISON;
damage.in.m_damageFXOverride = DAMAGE_POISON;
#else
damage.in.m_sourceID = m_poisonSource;
damage.in.m_damageType = DAMAGE_UNRESISTABLE; // Not poison, as that will infect us again
damage.in.m_damageFXOverride = DAMAGE_POISON; // but this will ensure that the right effect is played
#endif
damage.in.m_deathType = m_deathType;
getObject()->attemptDamage( &damage );

Expand Down
Loading