mirror of
https://github.com/ErikasKontenis/SabrehavenServer.git
synced 2025-04-30 01:29:21 +02:00
fix issue if monster is immunte to element then do not apply condition effects:
https://github.com/TwistedScorpio/Nostalrius/issues/21
This commit is contained in:
parent
b0f1fd5239
commit
c46ab0d012
@ -873,6 +873,10 @@ bool ConditionDamage::startCondition(Creature* creature)
|
||||
bool ConditionDamage::executeCondition(Creature* creature, int32_t)
|
||||
{
|
||||
if (conditionType == CONDITION_FIRE) {
|
||||
if (creature->isImmune(CONDITION_FIRE)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
const int32_t r_cycle = cycle;
|
||||
if (r_cycle) {
|
||||
if (count <= 0) {
|
||||
@ -886,6 +890,10 @@ bool ConditionDamage::executeCondition(Creature* creature, int32_t)
|
||||
return false;
|
||||
}
|
||||
} else if (conditionType == CONDITION_POISON) {
|
||||
if (creature->isImmune(CONDITION_POISON)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
const int32_t r_cycle = cycle;
|
||||
if (r_cycle) {
|
||||
if (count <= 0) {
|
||||
@ -904,6 +912,10 @@ bool ConditionDamage::executeCondition(Creature* creature, int32_t)
|
||||
return false;
|
||||
}
|
||||
} else if (conditionType == CONDITION_ENERGY) {
|
||||
if (creature->isImmune(CONDITION_ENERGY)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
const int32_t r_cycle = cycle;
|
||||
if (r_cycle) {
|
||||
if (count <= 0) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user